Do not callback with empty result cache

This commit is contained in:
DataHoarder 2022-01-31 07:22:24 +01:00
parent 140e062e33
commit 8946208378

View file

@ -69,7 +69,9 @@ public:
analyze(audio_block, audio_block_length, callback, callback_data);
}
callback(callback_data, resultCache.data(), resultCache.size(), static_cast<int>(numberOfBandsCache));
if(!resultCache.empty()){
callback(callback_data, resultCache.data(), resultCache.size(), static_cast<int>(numberOfBandsCache));
}
}
int64_t analysis_support() const {