Use size of provided buffer for stream write.

This commit is contained in:
Jared Boone 2016-04-06 11:16:48 -07:00
parent b3e2e89e51
commit 0d8971cd7d

View File

@ -97,7 +97,7 @@ void AudioOutput::fill_audio_buffer(const buffer_f32_t& audio, const bool send_t
audio_int[i] = sample_saturated; audio_int[i] = sample_saturated;
} }
if( send_to_fifo ) { 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); feed_audio_stats(audio);