mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-09 22:02:10 +02:00
Prevent allocations caused by Logger::log_trace
C++ would always construct an `std::string` from the string constant every iteration. Since this also happened when `YABRIDGE_DEBUG_LEVEL` is not set to 2, this ended up causing unnecessary allocations.
This commit is contained in:
@@ -663,27 +663,27 @@ void Vst2PluginBridge::process(AEffect* /*plugin*/,
|
||||
// Technically either `Vst2PluginBridge::process()` or
|
||||
// `Vst2PluginBridge::process_replacing()` could actually call the other
|
||||
// function on the plugin depending on what the plugin supports.
|
||||
logger.log_trace(">> process() :: start");
|
||||
logger.log_trace([]() { return ">> process() :: start"; });
|
||||
do_process<float, false>(inputs, outputs, sample_frames);
|
||||
logger.log_trace(" process() :: end");
|
||||
logger.log_trace([]() { return " process() :: end"; });
|
||||
}
|
||||
|
||||
void Vst2PluginBridge::process_replacing(AEffect* /*plugin*/,
|
||||
float** inputs,
|
||||
float** outputs,
|
||||
int sample_frames) {
|
||||
logger.log_trace(">> processReplacing() :: start");
|
||||
logger.log_trace([]() { return ">> processReplacing() :: start"; });
|
||||
do_process<float, true>(inputs, outputs, sample_frames);
|
||||
logger.log_trace(" processReplacing() :: end");
|
||||
logger.log_trace([]() { return " processReplacing() :: end"; });
|
||||
}
|
||||
|
||||
void Vst2PluginBridge::process_double_replacing(AEffect* /*plugin*/,
|
||||
double** inputs,
|
||||
double** outputs,
|
||||
int sample_frames) {
|
||||
logger.log_trace(">> processDoubleReplacing() :: start");
|
||||
logger.log_trace([]() { return ">> processDoubleReplacing() :: start"; });
|
||||
do_process<double, true>(inputs, outputs, sample_frames);
|
||||
logger.log_trace(" processDoubleReplacing() :: end");
|
||||
logger.log_trace([]() { return " processDoubleReplacing() :: end"; });
|
||||
}
|
||||
|
||||
float Vst2PluginBridge::get_parameter(AEffect* /*plugin*/, int index) {
|
||||
|
||||
Reference in New Issue
Block a user