From 5dfe6aaccb181ea8fdc3ecf2137366dd034e9c62 Mon Sep 17 00:00:00 2001 From: rekado Date: Mon, 14 Jan 2013 07:43:06 +0800 Subject: instantiate LV2::Synth, not AudioEffectX --- src/mdaPiano.cpp | 11 ++--------- src/mdaPiano.h | 7 ++++--- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp index 7d68d66..562dac9 100644 --- a/src/mdaPiano.cpp +++ b/src/mdaPiano.cpp @@ -43,7 +43,8 @@ mdaPianoProgram::mdaPianoProgram() } -mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, NPROGS, NPARAMS) +mdaPiano::mdaPiano(double rate) + : LV2::Synth(NPROGS, NPARAMS) { Fs = 44100.0f; iFs = 1.0f/Fs; cmax = 0x7F; //just in case... @@ -57,14 +58,6 @@ mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, setProgram(0); } - if(audioMaster) - { - setNumInputs(0); - setNumOutputs(NOUTS); - canProcessReplacing(); - isSynth(); - setUniqueID('MDAp'); /// - } //Waveform data and keymapping is hard-wired in *this* version kgrp[ 0].root = 36; kgrp[ 0].high = 37; kgrp[ 0].pos = 0; kgrp[ 0].end = 36275; kgrp[ 0].loop = 14774; diff --git a/src/mdaPiano.h b/src/mdaPiano.h index 8f2c7b3..750fd6c 100644 --- a/src/mdaPiano.h +++ b/src/mdaPiano.h @@ -5,6 +5,8 @@ #include +#include + #define NPARAMS 12 //number of parameters #define NPROGS 8 //number of programs #define NOUTS 2 //number of outputs @@ -56,10 +58,9 @@ struct KGRP //keygroup VstInt32 loop; }; -class mdaPiano : public AudioEffectX -{ +class mdaPiano : public LV2::Synth { public: - mdaPiano(audioMasterCallback audioMaster); + mdaPiano(double rate); ~mdaPiano(); virtual void process(float **inputs, float **outputs, VstInt32 sampleframes); -- cgit v1.2.3