Misc speaker codepath tweaks

This commit is contained in:
Aaron Culliney 2015-07-12 13:01:25 -07:00
parent 432d2fb563
commit 2a0a9c03b7

View File

@ -185,9 +185,11 @@ static void _speaker_update(/*bool toggled*/) {
if (NUM_CHANNELS == 2) { if (NUM_CHANNELS == 2) {
samples_buffer[samples_buffer_idx++] = speaker_data; samples_buffer[samples_buffer_idx++] = speaker_data;
} }
#if !defined(ANDROID)
if (speaker_going_silent && speaker_data) { if (speaker_going_silent && speaker_data) {
speaker_data -= SPKR_SILENT_STEP; speaker_data -= SPKR_SILENT_STEP;
} }
#endif
--num_samples; --num_samples;
} }
@ -200,10 +202,6 @@ static void _speaker_update(/*bool toggled*/) {
remainder_buffer[remainder_buffer_idx] = speaker_data; remainder_buffer[remainder_buffer_idx] = speaker_data;
++remainder_buffer_idx; ++remainder_buffer_idx;
} }
#if 0
} else if (toggled && samples_count) {
samples_buffer[samples_buffer_idx-1] = 0;
#endif
} }
if (UNLIKELY(samples_buffer_idx >= channelsSampleRateHz)) { if (UNLIKELY(samples_buffer_idx >= channelsSampleRateHz)) {