Merge branch 'main' into analogue

This commit is contained in:
Gordon JC Pearce 2024-10-18 23:57:55 +01:00
commit 4f6127cf14
2 changed files with 12 additions and 1 deletions

View File

@ -28,6 +28,8 @@ Peacock::Peacock() : Plugin(paramCount, 0, 0), sampleRate(getSampleRate()) {
ic29.buildTables(getSampleRate()); ic29.buildTables(getSampleRate());
} }
void Peacock::runMidi(const MidiEvent *ev, uint32_t count, uint32_t timeLimit) { void Peacock::runMidi(const MidiEvent *ev, uint32_t count, uint32_t timeLimit) {
// handle MIDI events, starting at lastEvent and continuing until timeLimit // handle MIDI events, starting at lastEvent and continuing until timeLimit
uint32_t i; uint32_t i;
@ -41,6 +43,15 @@ void Peacock::runMidi(const MidiEvent *ev, uint32_t count, uint32_t timeLimit) {
lastEvent = i; 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) { 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 // calculate an entire jack period's worth of samples
// harder than it sounds because for short jack periods there may be many // harder than it sounds because for short jack periods there may be many

View File

@ -71,7 +71,7 @@ class Peacock : public Plugin {
int64_t getUniqueId() const override { return d_cconst('P', 'f', 'a', 'u'); } int64_t getUniqueId() const override { return d_cconst('P', 'f', 'a', 'u'); }
// Initialisation // 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 &parameter) override; void initParameter(uint32_t index, Parameter &parameter) override;
void setParameterValue(uint32_t index, float value) override; void setParameterValue(uint32_t index, float value) override;