summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY <johny@neuromancer.sk>2016-06-08 11:26:54 +0200
committerJ08nY <johny@neuromancer.sk>2016-06-08 12:25:40 +0200
commit39260f9dca60d9637cf00264d8ae51e027cb1a51 (patch)
tree1e9496771baeaef81ccde511ef95a47fdc8db5b5
parent9f94d3fbace543bb723b49d3a3a7d97e0da65f41 (diff)
RtAudio: proper under/overflow warning
fix #5102
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp
index 335f4b632f..b172ef6e09 100644
--- a/drivers/rtaudio/audio_driver_rtaudio.cpp
+++ b/drivers/rtaudio/audio_driver_rtaudio.cpp
@@ -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;