From e02b20ef5eccede731104ae08cd2c35cb54d4baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kara=C5=9B?= <s176030@student.pg.edu.pl> Date: Sun, 14 Nov 2021 23:26:11 +0100 Subject: [PATCH] minor fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Damian KaraĹ <s176030@student.pg.edu.pl> --- src/cpp/ALSA_support.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp index 64dcc0b..83f69dc 100644 --- a/src/cpp/ALSA_support.cpp +++ b/src/cpp/ALSA_support.cpp @@ -894,6 +894,8 @@ bool DSP::ALSA_object_t::get_wave_in_raw_buffer(DSP::e::SampleType &InSampleType InSampleTypeALSA = InSampleType; // DSP::e::SampleType::ST_uchar should be given snd_pcm_sframes_t rc; + wave_in_raw_buffer.resize(NoOfAudioInputBuffers); + // one spare buffer for (unsigned int ind = 0; ind < DSP::NoOfAudioInputBuffers - 1; ind++) { @@ -930,8 +932,7 @@ bool DSP::ALSA_object_t::get_wave_in_raw_buffer(DSP::e::SampleType &InSampleType DSP::log << "Short read. Current rc = " << rc << "." << endl; #endif // AUDIO_DEBUG_MESSAGES_ON - wave_in_raw_buffer.resize(NoOfAudioInputBuffers); - wave_in_raw_buffer.data() = pcm_buffer[ind]; + wave_in_raw_buffer.push_back(*pcm_buffer[ind]); } else -- GitLab