From 5914d49cdbe85d348c005242d2c8b306406df97e Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Thu, 17 Oct 2024 23:24:53 +0100 Subject: [PATCH] fixed audio socket labelling --- plugin/peacock.cpp | 11 +++++++++++ plugin/peacock.hpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugin/peacock.cpp b/plugin/peacock.cpp index ca77b35..9eb09ac 100644 --- a/plugin/peacock.cpp +++ b/plugin/peacock.cpp @@ -28,6 +28,8 @@ Peacock::Peacock() : Plugin(paramCount, 0, 0), sampleRate(getSampleRate()) { ic29.buildTables(getSampleRate()); } + + void Peacock::runMidi(const MidiEvent *ev, uint32_t count, uint32_t timeLimit) { // handle MIDI events, starting at lastEvent and continuing until timeLimit uint32_t i; @@ -41,6 +43,15 @@ void Peacock::runMidi(const MidiEvent *ev, uint32_t count, uint32_t timeLimit) { lastEvent = i; } +void Peacock::initAudioPort(bool input, uint32_t index, AudioPort &port) { + port.groupId = kPortGroupStereo; + Plugin::initAudioPort(input, index, port); + + if (!input && index == 0) port.name = "Left Out"; + if (!input && index == 1) port.name = "Right Out"; +} + + void Peacock::run(const float **, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount) { // calculate an entire jack period's worth of samples // harder than it sounds because for short jack periods there may be many diff --git a/plugin/peacock.hpp b/plugin/peacock.hpp index 04c2d7c..9d690dc 100644 --- a/plugin/peacock.hpp +++ b/plugin/peacock.hpp @@ -71,7 +71,7 @@ class Peacock : public Plugin { int64_t getUniqueId() const override { return d_cconst('P', 'f', 'a', 'u'); } // Initialisation - // void initAudioPort(bool input, uint32_t index, AudioPort &port) override; + void initAudioPort(bool input, uint32_t index, AudioPort &port) override; void initParameter(uint32_t index, Parameter ¶meter) override; // void setParameterValue(uint32_t index, float value) override;