From df38695779d4e8ab5c9ec0da02c5ef845a9e5e60 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Tue, 20 Oct 2015 20:47:08 -0700 Subject: [PATCH] HACKish commit to ignore SIGABRTs - FIXME TODO ... investigate why these are triggering occasionally on Droid builds --- src/audio/speaker.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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