1433 static PyObject *
1434 pa_get_default_output_device(PyObject *self, PyObject *args)
1435 {
1436 PaDeviceIndex index;
1437
1438 if (!PyArg_ParseTuple(args, ""))
when PyArg_ParseTuple() succeeds
taking False path
1439 return NULL;
1440
1441 index = Pa_GetDefaultOutputDevice();
1442 if (index == paNoDevice) {
when considering range: -0x80000000 <= value <= -2
taking False path
1443 PyErr_SetString(PyExc_IOError, "No Default Output Device Available");
1444 return NULL;
1445 } else if (index < 0) {
taking True path
1446
1447 #ifdef VERBOSE
1448 fprintf(stderr, "An error occured while using the portaudio stream\n");
1449 fprintf(stderr, "Error number: %d\n", index);
1450 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(index));
1451 #endif
1452
1453 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
1454 Py_BuildValue("(s,i)",
1455 Pa_GetErrorText(index), index));
1456 return NULL;
memory leak: ob_refcnt of new ref from call to Py_BuildValue is 1 too high
was expecting final owned ob_refcnt of new ref from call to Py_BuildValue to be 0 since nothing references it but final ob_refcnt is refs: 1 owned, 1 borrowed
1457 }
1458
1459 return PyLong_FromLong(index);
1460 }