mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 21:15:51 +02:00
Add logging for IAudioProcessor::process()
This is super verbose, but I'm sure it's going to be useful at some point.
This commit is contained in:
@@ -190,8 +190,10 @@ YaEventList::YaEventList(Steinberg::Vst::IEventList& event_list) {
|
||||
}
|
||||
}
|
||||
|
||||
YaEventList::~YaEventList() {
|
||||
FUNKNOWN_DTOR
|
||||
YaEventList::~YaEventList(){FUNKNOWN_DTOR}
|
||||
|
||||
size_t YaEventList::num_events() const {
|
||||
return events.size();
|
||||
}
|
||||
|
||||
void YaEventList::write_back_outputs(
|
||||
|
||||
@@ -227,6 +227,11 @@ class YaEventList : public Steinberg::Vst::IEventList {
|
||||
|
||||
DECLARE_FUNKNOWN_METHODS
|
||||
|
||||
/**
|
||||
* Return the number of events we store. Used in debug logs.
|
||||
*/
|
||||
size_t num_events() const;
|
||||
|
||||
/**
|
||||
* Write these events an output events queue on the `ProcessData` object
|
||||
* provided by the host.
|
||||
|
||||
@@ -41,6 +41,10 @@ IMPLEMENT_FUNKNOWN_METHODS(YaParameterChanges,
|
||||
Steinberg::Vst::IParameterChanges::iid)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
size_t YaParameterChanges::num_parameters() const {
|
||||
return queues.size();
|
||||
}
|
||||
|
||||
void YaParameterChanges::write_back_outputs(
|
||||
Steinberg::Vst::IParameterChanges& output_queues) const {
|
||||
for (auto& queue : queues) {
|
||||
|
||||
@@ -45,6 +45,12 @@ class YaParameterChanges : public Steinberg::Vst::IParameterChanges {
|
||||
|
||||
DECLARE_FUNKNOWN_METHODS
|
||||
|
||||
/**
|
||||
* Return the number of parameter we have parameter change queues for. Used
|
||||
* in debug logs.
|
||||
*/
|
||||
size_t num_parameters() const;
|
||||
|
||||
/**
|
||||
* Write these changes back to an output parameter changes queue on the
|
||||
* `ProcessData` object provided by the host.
|
||||
|
||||
@@ -92,6 +92,11 @@ Steinberg::Vst::AudioBusBuffers YaAudioBusBuffers::get() {
|
||||
return reconstructed_buffers;
|
||||
}
|
||||
|
||||
size_t YaAudioBusBuffers::num_channels() const {
|
||||
return std::visit([&](const auto& buffers) { return buffers.size(); },
|
||||
buffers);
|
||||
}
|
||||
|
||||
void YaAudioBusBuffers::write_back_outputs(
|
||||
Steinberg::Vst::AudioBusBuffers& output_buffers) const {
|
||||
output_buffers.silenceFlags = silence_flags;
|
||||
|
||||
@@ -72,6 +72,11 @@ class YaAudioBusBuffers {
|
||||
*/
|
||||
Steinberg::Vst::AudioBusBuffers get();
|
||||
|
||||
/**
|
||||
* Return the number of channels in `buffers`. Only used for debug logs.
|
||||
*/
|
||||
size_t num_channels() const;
|
||||
|
||||
/**
|
||||
* Write these buffers and the silence flag back to an `AudioBusBuffers
|
||||
* object provided by the host.
|
||||
@@ -203,7 +208,6 @@ class YaProcessData {
|
||||
// of the `output*` fields defined below it
|
||||
}
|
||||
|
||||
private:
|
||||
// These fields are input and context data read from the original
|
||||
// `ProcessData` object
|
||||
|
||||
@@ -266,6 +270,7 @@ class YaProcessData {
|
||||
*/
|
||||
std::optional<Steinberg::Vst::ProcessContext> process_context;
|
||||
|
||||
private:
|
||||
// These are the same fields as in `YaProcessDataResponse`. We'll generate
|
||||
// these as part of creating `reconstructed_process_data`, and they will be
|
||||
// moved into a response object during `move_outputs_to_response()`.
|
||||
|
||||
Reference in New Issue
Block a user