Added the number of log elements in the message
This commit is contained in:
parent
3b9683e66f
commit
3346bbee28
2 changed files with 11 additions and 10 deletions
|
|
@ -65,7 +65,7 @@ sfz::Logger::~Logger()
|
||||||
<< prefix
|
<< prefix
|
||||||
<< "_file_log.csv";
|
<< "_file_log.csv";
|
||||||
fs::path fileLogPath{ fs::current_path() / fileLogFilename.str() };
|
fs::path fileLogPath{ fs::current_path() / fileLogFilename.str() };
|
||||||
std::cout << "Logging file times to " << fileLogPath.filename() << '\n';
|
std::cout << "Logging " << fileTimes.size() << " file times to " << fileLogPath.filename() << '\n';
|
||||||
std::ofstream loadLogFile { fileLogPath.native() };
|
std::ofstream loadLogFile { fileLogPath.native() };
|
||||||
loadLogFile << "WaitDuration,LoadDuration,FileSize,FileName" << '\n';
|
loadLogFile << "WaitDuration,LoadDuration,FileSize,FileName" << '\n';
|
||||||
for (auto& time: fileTimes)
|
for (auto& time: fileTimes)
|
||||||
|
|
@ -81,7 +81,7 @@ sfz::Logger::~Logger()
|
||||||
<< prefix
|
<< prefix
|
||||||
<< "_callback_log.csv";
|
<< "_callback_log.csv";
|
||||||
fs::path callbackLogPath{ fs::current_path() / callbackLogFilename.str() };
|
fs::path callbackLogPath{ fs::current_path() / callbackLogFilename.str() };
|
||||||
std::cout << "Logging callback times to " << callbackLogPath.filename() << '\n';
|
std::cout << "Logging " << callbackTimes.size() << " callback times to " << callbackLogPath.filename() << '\n';
|
||||||
std::ofstream callbackLogFile { callbackLogPath.native() };
|
std::ofstream callbackLogFile { callbackLogPath.native() };
|
||||||
callbackLogFile << "Dispatch,RenderMethod,Data,Amplitude,Filters,Panning,NumVoices,NumSamples" << '\n';
|
callbackLogFile << "Dispatch,RenderMethod,Data,Amplitude,Filters,Panning,NumVoices,NumSamples" << '\n';
|
||||||
for (auto& time: callbackTimes)
|
for (auto& time: callbackTimes)
|
||||||
|
|
|
||||||
|
|
@ -410,21 +410,22 @@ void sfz::Synth::setSampleRate(float sampleRate) noexcept
|
||||||
void sfz::Synth::renderBlock(AudioSpan<float> buffer) noexcept
|
void sfz::Synth::renderBlock(AudioSpan<float> buffer) noexcept
|
||||||
{
|
{
|
||||||
ScopedFTZ ftz;
|
ScopedFTZ ftz;
|
||||||
|
|
||||||
|
|
||||||
|
if (freeWheeling)
|
||||||
|
resources.filePool.waitForBackgroundLoading();
|
||||||
|
|
||||||
|
AtomicGuard callbackGuard { inCallback };
|
||||||
|
if (!canEnterCallback)
|
||||||
|
return;
|
||||||
|
|
||||||
CallbackBreakdown callbackBreakdown;
|
CallbackBreakdown callbackBreakdown;
|
||||||
int numActiveVoices { 0 };
|
int numActiveVoices { 0 };
|
||||||
|
|
||||||
{ // Main render block
|
{ // Main render block
|
||||||
ScopedLogger logger { callbackBreakdown.renderMethod };
|
ScopedLogger logger { callbackBreakdown.renderMethod };
|
||||||
buffer.fill(0.0f);
|
buffer.fill(0.0f);
|
||||||
|
|
||||||
resources.filePool.cleanupPromises();
|
resources.filePool.cleanupPromises();
|
||||||
|
|
||||||
if (freeWheeling)
|
|
||||||
resources.filePool.waitForBackgroundLoading();
|
|
||||||
|
|
||||||
AtomicGuard callbackGuard { inCallback };
|
|
||||||
if (!canEnterCallback)
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto tempSpan = AudioSpan<float>(tempBuffer).first(buffer.getNumFrames());
|
auto tempSpan = AudioSpan<float>(tempBuffer).first(buffer.getNumFrames());
|
||||||
for (auto& voice : voices) {
|
for (auto& voice : voices) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue