Fix broken audio stats when audio is muted.

This commit is contained in:
Jared Boone 2016-01-10 11:34:06 -08:00
parent 4ea84301c6
commit eb5b2d7d30
3 changed files with 9 additions and 3 deletions

View file

@ -54,8 +54,14 @@ void BasebandProcessor::fill_audio_buffer(const buffer_s16_t& audio) {
feed_audio_stats(audio);
}
void BasebandProcessor::mute_audio() {
void BasebandProcessor::mute_audio(const buffer_s16_t& audio) {
i2s::i2s0::tx_mute();
for(size_t i=0; i<audio.count; i++) {
audio.p[i] = 0;
}
feed_audio_stats(audio);
}
void BasebandProcessor::feed_audio_stats(const buffer_s16_t& audio) {