2527 static PyObject *
2528 pa_get_stream_read_available(PyObject *self, PyObject *args)
2529 {
2530 signed long frames;
2531 PyObject *stream_arg;
2532 _pyAudio_Stream *streamObject;
2533 PaStream *stream;
2534
2535 if (!PyArg_ParseTuple(args, "O!", &_pyAudio_StreamType, &stream_arg))
when PyArg_ParseTuple() succeeds
taking False path
2536 return NULL;
2537
2538 streamObject = (_pyAudio_Stream *) stream_arg;
2539
2540 if (!_is_open(streamObject)) {
when considering value == (int)0 from src/_portaudiomodule.c:2540
taking True path
2541 PyErr_SetObject(PyExc_IOError,
when Py_BuildValue() succeeds
calling PyErr_SetObject()
new ref from call to Py_BuildValue was allocated at: PyErr_SetObject(PyExc_IOError,
ob_refcnt is now refs: 1 owned
ob_refcnt is now refs: 1 owned, 1 borrowed
2542 Py_BuildValue("(s,i)",
2543 "Stream closed",
2544 paBadStreamPtr));
2545 return NULL;
2546 }
2547
2548 stream = streamObject->stream;
2549 frames = Pa_GetStreamReadAvailable(stream);
2550 return PyLong_FromLong(frames);
2551 }