Skip to content

Commit

Permalink
Merge 3b9dd9a into 9702ff1
Browse files Browse the repository at this point in the history
  • Loading branch information
m13253 committed May 10, 2019
2 parents 9702ff1 + 3b9dd9a commit c0a3048
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 0 additions & 8 deletions pysoundio/_soundiox.c
Expand Up @@ -596,10 +596,6 @@ pysoundio__get_input_device(PyObject *self, PyObject *args)
return NULL;

rc.input_device = soundio_get_input_device(rc.soundio, device_index);
if (rc.input_device->probe_error) {
PyErr_SetString(PySoundIoError, "Unable to probe device\n");
return NULL;
}

return PyLong_FromVoidPtr(rc.input_device);
}
Expand All @@ -613,10 +609,6 @@ pysoundio__get_output_device(PyObject *self, PyObject *args)
return NULL;

rc.output_device = soundio_get_output_device(rc.soundio, device_index);
if (rc.output_device->probe_error) {
PyErr_SetString(PySoundIoError, "Unable to probe device\n");
return NULL;
}

return PyLong_FromVoidPtr(rc.output_device);
}
Expand Down
6 changes: 4 additions & 2 deletions pysoundio/pysoundio.py
Expand Up @@ -251,7 +251,8 @@ def list_devices(self):
'layouts': self.get_layouts(device),
'software_latency_min': pydevice.contents.software_latency_min,
'software_latency_max': pydevice.contents.software_latency_max,
'software_latency_current': pydevice.contents.software_latency_current
'software_latency_current': pydevice.contents.software_latency_current,
'probe_error': PySoundIoError(soundio.strerror(pydevice.contents.probe_error)) if pydevice.contents.probe_error else None
})
soundio.device_unref(device)

Expand All @@ -266,7 +267,8 @@ def list_devices(self):
'layouts': self.get_layouts(device),
'software_latency_min': pydevice.contents.software_latency_min,
'software_latency_max': pydevice.contents.software_latency_max,
'software_latency_current': pydevice.contents.software_latency_current
'software_latency_current': pydevice.contents.software_latency_current,
'probe_error': PySoundIoError(soundio.strerror(pydevice.contents.probe_error)) if pydevice.contents.probe_error else None
})
soundio.device_unref(device)

Expand Down

0 comments on commit c0a3048

Please sign in to comment.