Portaudio exceptions

* Ignore exceptions >= 0
pull/1/head
Robert Stiles 2013-08-02 14:32:23 -05:00 zatwierdzone przez David Freese
rodzic f13f26c352
commit 957a1b49bf
1 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -432,11 +432,13 @@ void modem::ModulateXmtr(double *buffer, int len)
unsigned n = 4;
while (scard->Write(buffer, len) == 0 && --n);
if (n == 0)
throw SndException("Sound write failed");
throw SndException(-99, "Sound write failed");
}
catch (const SndException& e) {
LOG_ERROR("%s", e.what());
throw;
if(e.error() < 0) {
LOG_ERROR("%s", e.what());
throw;
}
return;
}
@ -458,11 +460,13 @@ void modem::ModulateStereo(double *left, double *right, int len)
unsigned n = 4;
while (scard->Write_stereo(left, right, len) == 0 && --n);
if (n == 0)
throw SndException("Sound write failed");
throw SndException(-99, "Sound write failed");
}
catch (const SndException& e) {
LOG_ERROR("%s", e.what());
throw;
if(e.error() < 0) {
LOG_ERROR("%s", e.what());
throw;
}
return;
}