1319 static PyObject *
1320 pa_host_api_device_index_to_device_index(PyObject *self, PyObject *args)
1321 {
1322 PaHostApiIndex apiIndex;
1323 int hostApiDeviceindex;
1324 PaDeviceIndex devIndex;
1325
1326
1327 if (!PyArg_ParseTuple(args, "ii", &apiIndex, &hostApiDeviceindex))
when PyArg_ParseTuple() succeeds
taking False path
1328 return NULL;
1329
1330 devIndex = Pa_HostApiDeviceIndexToDeviceIndex(apiIndex, hostApiDeviceindex);
1331 if (devIndex < 0) {
when considering range: -0x80000000 <= value <= -1
taking True path
1332
1333 #ifdef VERBOSE
1334 fprintf(stderr, "An error occured while using the portaudio stream\n");
1335 fprintf(stderr, "Error number: %d\n", devIndex);
1336 fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(devIndex));
1337 #endif
1338
1339 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
1340 Py_BuildValue("(s,i)",
1341 Pa_GetErrorText(devIndex), devIndex));
1342 return NULL;
1343 }
1344
1345 return PyLong_FromLong(devIndex);
1346 }