diff --git a/src/audio/speaker.c b/src/audio/speaker.c index 13cb3283..b2bc1eb8 100644 --- a/src/audio/speaker.c +++ b/src/audio/speaker.c @@ -190,9 +190,11 @@ static void _speaker_update(/*bool toggled*/) { } } - if (UNLIKELY(samples_buffer_idx >= channelsSampleRateHz)) { - assert(samples_buffer_idx == channelsSampleRateHz && "should be at exactly the end, no further"); - ERRLOG("OOPS, overflow in speaker samples buffer"); + if (UNLIKELY(samples_buffer_idx > channelsSampleRateHz)) { + //assert(samples_buffer_idx == channelsSampleRateHz && "should be at exactly the end, no further"); + if (UNLIKELY(samples_buffer_idx > channelsSampleRateHz)) { + ERRLOG("OOPS, possible overflow in speaker samples buffer ... samples_buffer_idx:%lu channelsSampleRateHz:%lu", samples_buffer_idx, channelsSampleRateHz); + } } } @@ -215,7 +217,7 @@ static void _submit_samples_buffer_fullspeed(void) { if (err) { return; } - assert(bytes_queued <= bufferTotalSize); + ////assert(bytes_queued <= bufferTotalSize); -- wtf failing on Desktop on launch if (bytes_queued >= bufferSizeIdealMax) { return; @@ -255,7 +257,7 @@ static unsigned int _submit_samples_buffer(const unsigned long num_channel_sampl if (err) { return num_channel_samples; } - assert(bytes_queued <= bufferTotalSize); + ////assert(bytes_queued <= bufferTotalSize); -- this is failing on desktop FIXME TODO ... // // calculate CPU cycles feedback adjustment to prevent system audio buffer under/overflow