Merge pull request #5103 from J08nY/issue-5102
RtAudio: proper under/overflow warning
This commit is contained in:
commit
ac4fdb391e
|
@ -32,8 +32,14 @@ const char* AudioDriverRtAudio::get_name() const {
|
||||||
int AudioDriverRtAudio::callback( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
int AudioDriverRtAudio::callback( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
|
||||||
double streamTime, RtAudioStreamStatus status, void *userData ) {
|
double streamTime, RtAudioStreamStatus status, void *userData ) {
|
||||||
|
|
||||||
if (status)
|
if (status) {
|
||||||
print_line("lost?");
|
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;
|
int32_t *buffer = (int32_t *) outputBuffer;
|
||||||
|
|
||||||
AudioDriverRtAudio *self = (AudioDriverRtAudio*)userData;
|
AudioDriverRtAudio *self = (AudioDriverRtAudio*)userData;
|
||||||
|
|
Loading…
Reference in New Issue