From c6896c85ca182e69c3cb43e5078765c538350442 Mon Sep 17 00:00:00 2001 From: Marek Blok <Marek.Blok@pg.edu.pl> Date: Wed, 15 Sep 2021 13:02:06 +0200 Subject: [PATCH] ver. 0.20.010 - small fixes --- CHANGELOG | 4 ++++ examples/hello.cpp | 4 ++++ src/cpp/WMM_support.cpp | 4 ++-- src/include/DSP_lib.h | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0b860c4..cadb94a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,10 @@ TODO:: LAST DONE: CHANGES: +- ver. 0.20.010 - <b>2021.09.15</b> Changed: + - Fixed: DSP::WMM_object_t::stop_playback fix + - Fixed: hello.cpp - using different wav file path if test_echo() is used + - ver. 0.20.009 - <b>2021.09.10</b> Changed: - Fixed: DSP::WMM_object_t and DSP::SOUND_object_t now send to sound card all pending data and wait for finish before closing diff --git a/examples/hello.cpp b/examples/hello.cpp index 2e0fcc5..2f9b40f 100644 --- a/examples/hello.cpp +++ b/examples/hello.cpp @@ -25,7 +25,11 @@ int test_hello(void) MasterClock=DSP::Clock::CreateMasterClock(); +#ifndef INCLUDE_DSPE_EXAMPLES DSP::u::WaveInput AudioIn(MasterClock, "DSPElib.wav", "."); +#else + DSP::u::WaveInput AudioIn(MasterClock, "DSPElib.wav", "../examples"); +#endif // INCLUDE_DSPE_EXAMPLES Fp = AudioIn.GetSamplingRate(); DSP::u::AudioOutput AudioOut(Fp); diff --git a/src/cpp/WMM_support.cpp b/src/cpp/WMM_support.cpp index f935df6..abf2e1d 100644 --- a/src/cpp/WMM_support.cpp +++ b/src/cpp/WMM_support.cpp @@ -143,9 +143,9 @@ bool DSP::WMM_object_t::stop_playback(void) { // if there are still buffers that haven't been yet sent to sound card then do it now if (IsPlayingNow == false) { - if (NextBufferOutInd == DSP::NoOfAudioOutputBuffers - 2) //all but one spare buffer are filled up + if (NextBufferOutInd > 0) //all but one spare buffer are filled up { // send all data from buffers to soundcard to start playback - for (unsigned int ind=0; ind < DSP::NoOfAudioOutputBuffers-1; ind++) //one spare buffer + for (unsigned int ind=0; ind < NextBufferOutInd; ind++) //one spare buffer { result=waveOutWrite(hWaveOut, &(waveHeaderOut[ind]), sizeof(WAVEHDR)); diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h index e0ff366..53fc9bb 100644 --- a/src/include/DSP_lib.h +++ b/src/include/DSP_lib.h @@ -11,7 +11,7 @@ #define DSP_VER_MAJOR 0 #define DSP_VER_MINOR 20 -#define DSP_VER_BUILD 9 // !!! without zeroes before, else this will be treated as octal number +#define DSP_VER_BUILD 10 // !!! without zeroes before, else this will be treated as octal number #define DSP_VER_YEAR 2021 #define DSP_VER DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD -- GitLab