RtAudio: proper under/overflow warning

fix #5102
This commit is contained in:
J08nY 2016-06-08 11:26:54 +02:00
parent 9f94d3fbac
commit 39260f9dca
No known key found for this signature in database
GPG Key ID: 7F4A448FE68F329D
1 changed files with 8 additions and 2 deletions

View File

@ -32,8 +32,14 @@ const char* AudioDriverRtAudio::get_name() const {
int AudioDriverRtAudio::callback( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
double streamTime, RtAudioStreamStatus status, void *userData ) {
if (status)
print_line("lost?");
if (status) {
if (status & RTAUDIO_INPUT_OVERFLOW) {
WARN_PRINT("RtAudio input overflow!");
}
if (status & RTAUDIO_OUTPUT_UNDERFLOW) {
WARN_PRINT("RtAudio output underflow!");
}
}
int32_t *buffer = (int32_t *) outputBuffer;
AudioDriverRtAudio *self = (AudioDriverRtAudio*)userData;