diff --git a/CHANGELOG b/CHANGELOG index fb8f48a1a1f79eff15bf206b781f1cd9cc30fcc1..1a9a251edd9109cc6c82eb68339cd7115dfcdb9d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ TODO:: - best correction: remove unconnected autospliter outputs when its output block is deleted (or its output is freed) - TODO: create minimal example: source => two output blocks : delete one and check scheme for Noname blocks before reconnection - NOTE: if the last output of autosplitter is cleared the autospliter block should be deleted also. +- BUG (minor): DSP::Component::GetHtmlNodeLabel_DOTfile should not add '\\' before space (at least). New nodes drawing doend't need escaping (needs more tests) - DSP::u::Zeroinserter => add variant with possibility to define number of inputs SOUND_support_t::get_wave_in_raw_buffer - zastÄ piÄ metodÄ zawierajÄ cÄ konwersjÄ typu, ew. rozbudowaÄ konwersjÄ w DSP::u::AudioInput @@ -16,7 +17,11 @@ TODO:: LAST DONE: CHANGES: -- ver. 0.20.032 <b>2023.11.11</b> Fixed: +- ver. 0.20.033 <b>2023.11.11</b> Fixed: + - DSP::u::OutputBuffer - added setting OutputBuffer inputs' clocks (SetBlockInputClock) as equal to ParentClock to allow clock mismatch check when buffers ParentClock dows not match the inputs' clocks. + - PROBLEM: the ParentClock match to InputClock is not checked for DSP::u::OutputBuffer which might lead user to not notice that expected NotificationClock is incorectly selected. + - Solution: Set OutputBuffer inputs' clocks as equal to ParentClock + - Note: The similar solusion can be applicable to other blocks with notification clocks and no outputs. - DSP::Component::AddOutputLine - can now reuse free output line instead of adding new one - This is minimal correction for the bug causing autospliter to have unconnected outputs after block deletion. The unconnected output will now be reused on new connection. diff --git a/src/cpp/DSP_IO.cpp b/src/cpp/DSP_IO.cpp index eefaa453a9d7c85877a271359516ac873bc70da1..8b87ee77c522122b74e09a83f13a3adaecdbcace 100644 --- a/src/cpp/DSP_IO.cpp +++ b/src/cpp/DSP_IO.cpp @@ -4887,6 +4887,7 @@ DSP::u::OutputBuffer::OutputBuffer(unsigned int BufferSize_in, unsigned int NoOf UserData_ptr = NULL; UserCallbackID = (CallbackIdentifier & DSP::CallbackID_mask); + // Set OutputBuffer inputs' clocks as equal to ParentClock if ((ParentClock != NULL) && (func_ptr != NULL)) { if (NotificationsStep > 1) @@ -4897,6 +4898,9 @@ DSP::u::OutputBuffer::OutputBuffer(unsigned int BufferSize_in, unsigned int NoOf RegisterForNotification(NotificationClock); } + for (unsigned int ind = 0; ind < NoOfInputs; ind++) + SetBlockInputClock(ind, ParentClock); + Execute_ptr = &InputExecute; if (NotificationFunction_ptr != NULL) @@ -4955,6 +4959,9 @@ DSP::u::OutputBuffer::OutputBuffer(unsigned int BufferSize_in, unsigned int NoOf RegisterForNotification(OutputClock); } + for (unsigned int ind = 0; ind < NoOfInputs; ind++) + SetBlockInputClock(ind, ParentClock); + /////////////////////////////////////////////// OutputsValues.clear(); OutputsValues.resize(NoOfOutputs, 0.0); @@ -5006,6 +5013,9 @@ DSP::u::OutputBuffer::OutputBuffer(unsigned int BufferSize_in, unsigned int NoOf else NotificationsStep = -1; + for (unsigned int ind = 0; ind < NoOfInputs; ind++) + SetBlockInputClock(ind, ParentClock); + if (func_ptr != NULL) { IsMultiClock = false; diff --git a/src/cpp/DSP_modules.cpp b/src/cpp/DSP_modules.cpp index 32e5b776411eec3d2fdb37631f47953fb05a2d20..605499de11340c14ba83c0ed042045d3c75cfcdd 100644 --- a/src/cpp/DSP_modules.cpp +++ b/src/cpp/DSP_modules.cpp @@ -2658,7 +2658,12 @@ void DSP::Block::SetBlockInputClock(unsigned int InputNo, DSP::Clock_ptr InputCl #ifdef __DEBUG__ if (InputClocks[InputNo] != NULL) { - DSP::log << DSP::e::LogMode::Error << "Input clock has been already set" << std::endl; + if (InputClocks[InputNo] != InputClock) { + DSP::log << DSP::e::LogMode::Error << GetName() << DSP::e::LogMode::second << "Different input clock has been already set to input number " << InputNo << std::endl; + } + // else { + // DSP::log << DSP::e::LogMode::Info << GetName() << DSP::e::LogMode::second << "Input clock has been already set to the same value" << std::endl; + // } } #endif // __DEBUG__ diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h index 303e897edaae181a665bbc3cf122923a27fbe21f..3df269b243f68f2e48dfd734d812bb20478fd2fd 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 32 // !!! without zeroes before, else this will be treated as octal number +#define DSP_VER_BUILD 33 // !!! without zeroes before, else this will be treated as octal number #define DSP_VER_YEAR 2023 #define DSP_VER DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD