From 49a0b017cfdf0d839ea459ec7e7b2db4996130bd 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 19:54:22 +0100 Subject: [PATCH] ALSA_support: Prepare buffer to be filled 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 | 11 +++++++++-- src/include/ALSA_support.h | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp index cb2bdb3..d7acc0c 100644 --- a/src/cpp/ALSA_support.cpp +++ b/src/cpp/ALSA_support.cpp @@ -94,7 +94,7 @@ unsigned int DSP::ALSA_object_t::select_output_device_by_number(const unsigned i bool DSP::ALSA_object_t::is_input_callback_supported(void) { - return true; + return false; } bool DSP::ALSA_object_t::is_output_callback_supported(void) @@ -106,6 +106,7 @@ void DSP::ALSA_object_t::log_driver_data() { #ifdef AUDIO_DEBUG_MESSAGES_ON + //! For logging int val; DSP::log << "ALSA library version: " << SND_LIB_VERSION_STR << endl; @@ -146,7 +147,8 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) int rc; //! Errors controller in set_snd_pcm_format() function int errc; - + + //! Local configuration space handler snd_pcm_hw_params_t *params; //! For logging @@ -888,6 +890,11 @@ bool DSP::ALSA_object_t::start_recording(void) bool DSP::ALSA_object_t::get_wave_in_raw_buffer(DSP::e::SampleType &InSampleType, std::vector<char> &wave_in_raw_buffer) { assert(!"DSP::ALSA_object_t::get_wave_in_raw_buffer not implemented yet"); + + InSampleTypeALSA = InSampleType; + + snd_pcm_sframes_t rc; + return true; } diff --git a/src/include/ALSA_support.h b/src/include/ALSA_support.h index db07f8f..0bd6078 100644 --- a/src/include/ALSA_support.h +++ b/src/include/ALSA_support.h @@ -76,6 +76,9 @@ namespace DSP { //! just samples snd_pcm_uframes_t audio_inbuffer_size_in_frames; // M.B. more meaningful variable name + + //! Type of samples in WaveInBuffers + DSP::e::SampleType InSampleTypeALSA; //! We always use the non-blocking mode in DSPElib bool non_blocking_mode; -- GitLab