From eb80e59bffc0ea6f1406128572a8a13889b71d56 Mon Sep 17 00:00:00 2001 From: jthedering <51533355+jthedering@users.noreply.github.com> Date: Tue, 2 Sep 2014 19:49:43 +0000 Subject: [PATCH] Version 0.9.1 Fixed: When a completely empty (0-byte) configuration file was being read, the reading process got into an endless loop. --- FilterEngine.cpp | 10 +--------- FilterEngine.h | 1 - version.h | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/FilterEngine.cpp b/FilterEngine.cpp index 4626a69..5737c34 100644 --- a/FilterEngine.cpp +++ b/FilterEngine.cpp @@ -60,7 +60,6 @@ FilterEngine::FilterEngine() capture = false; inputChannelCount = 0; lastInputWasSilent = false; - lastInputSize = -1; threadHandle = NULL; currentConfig = NULL; nextConfig = NULL; @@ -353,7 +352,7 @@ void FilterEngine::loadConfig(const wstring& path) addFilters(newFilters); } - while(!inputStream.eof()) + while(inputStream.good()) { string encodedLine; getline(inputStream, encodedLine); @@ -420,13 +419,6 @@ void FilterEngine::process(float *output, float *input, unsigned frameCount) { bool inputSilent = true; - if(lastInputSize != frameCount) - { - if(lastInputSize != -1) - LogF(L"Input size changed from %d to %d", lastInputSize, frameCount); - lastInputSize = frameCount; - } - for (unsigned i = 0; i < frameCount * realChannelCount; i++) { if(input[i] != 0) diff --git a/FilterEngine.h b/FilterEngine.h index 63c9905..eadf49a 100644 --- a/FilterEngine.h +++ b/FilterEngine.h @@ -104,7 +104,6 @@ private: void* shutdownEvent; stdext::hash_set watchRegistryKeys; bool lastInputWasSilent; - unsigned lastInputSize; stdext::hash_map channelNameToPosMap; stdext::hash_map channelPosToNameMap; }; diff --git a/version.h b/version.h index 3075d22..19d0115 100644 --- a/version.h +++ b/version.h @@ -1,3 +1,3 @@ #define MAJOR 0 #define MINOR 9 -#define REVISION 0 +#define REVISION 1