From 0d8971cd7d43fc8bfc8d854940a340c5c034343f Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Wed, 6 Apr 2016 11:16:48 -0700 Subject: [PATCH] Use size of provided buffer for stream write. --- firmware/baseband/audio_output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/baseband/audio_output.cpp b/firmware/baseband/audio_output.cpp index a7047319..05d56d20 100644 --- a/firmware/baseband/audio_output.cpp +++ b/firmware/baseband/audio_output.cpp @@ -97,7 +97,7 @@ void AudioOutput::fill_audio_buffer(const buffer_f32_t& audio, const bool send_t audio_int[i] = sample_saturated; } if( send_to_fifo ) { - stream.write(audio_int.data(), audio_int.size() * sizeof(int16_t)); + stream.write(audio_int.data(), audio_buffer.count * sizeof(audio_int[0])); } feed_audio_stats(audio);