summaryrefslogtreecommitdiff
path: root/contrib/python
diff options
context:
space:
mode:
authorStephen Sinclair <radarsat1@gmail.com>2017-06-09 15:44:51 -0400
committerStephen Sinclair <radarsat1@gmail.com>2017-06-09 15:45:30 -0400
commitbd5f15d2ab75644aeddcdc22539b265e3389b393 (patch)
tree4a5fc7e98bfdda89abeb8876e520ad9bd2f04a20 /contrib/python
parente786e45107b0f88cd3ab42ad223f94d4dfdb925a (diff)
Fix references to RtError / RtAudioError in pyrtaudio
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/pyrtaudio/rtaudiomodule.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/contrib/python/pyrtaudio/rtaudiomodule.cpp b/contrib/python/pyrtaudio/rtaudiomodule.cpp
index 40a87e5..93d3c73 100644
--- a/contrib/python/pyrtaudio/rtaudiomodule.cpp
+++ b/contrib/python/pyrtaudio/rtaudiomodule.cpp
@@ -48,7 +48,7 @@ extern "C" {
PyObject *callback_func;
} PyRtAudio;
- static PyObject *RtAudioError;
+ static PyObject *RtAudioErrorException;
static int callback(void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *data )
@@ -151,9 +151,9 @@ extern "C" {
else if(!strcmp(api, "directsound"))
self->dac = new RtAudio(RtAudio::WINDOWS_DS);
}
- catch (RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch (RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
@@ -261,9 +261,9 @@ extern "C" {
self->dac->closeStream();
self->dac->openStream(&oParams, &iParams, self->_format, fs, &bf, &callback, self, &options);
}
- catch ( RtError& error ) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch ( RtAudioError& error ) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
@@ -281,9 +281,9 @@ extern "C" {
self->dac->closeStream();
Py_CLEAR(self->callback_func);
}
- catch(RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch(RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
@@ -297,9 +297,9 @@ extern "C" {
try {
self->dac->startStream();
}
- catch(RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch(RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
@@ -315,9 +315,9 @@ extern "C" {
try {
self->dac->stopStream();
}
- catch(RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch(RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
@@ -332,9 +332,9 @@ extern "C" {
try {
self->dac->abortStream();
}
- catch(RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch(RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
Py_RETURN_NONE;
@@ -430,9 +430,9 @@ extern "C" {
return info_dict;
}
- catch(RtError &error) {
- PyErr_SetString(RtAudioError, error.getMessage().c_str());
- Py_INCREF(RtAudioError);
+ catch(RtAudioError &error) {
+ PyErr_SetString(RtAudioErrorException, error.getMessage().c_str());
+ Py_INCREF(RtAudioErrorException);
return NULL;
}
}
@@ -598,8 +598,8 @@ extern "C" {
Py_INCREF(&RtAudio_type);
PyModule_AddObject(module, "RtAudio", (PyObject *)&RtAudio_type);
- RtAudioError = PyErr_NewException("rtaudio.RtError", NULL, NULL);
- Py_INCREF(RtAudioError);
- PyModule_AddObject(module, "RtError", RtAudioError);
+ RtAudioErrorException = PyErr_NewException("rtaudio.RtError", NULL, NULL);
+ Py_INCREF(RtAudioErrorException);
+ PyModule_AddObject(module, "RtError", RtAudioErrorException);
}
}