gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

dummydevice.h (1192B)


      1 #pragma once
      2 
      3 #include "synthLib/device.h"
      4 
      5 namespace pluginLib
      6 {
      7 	class DummyDevice : public synthLib::Device
      8 	{
      9 	public:
     10 		explicit DummyDevice(const synthLib::DeviceCreateParams& _params);
     11 
     12 		float getSamplerate() const override { return 44100.0f; }
     13 		bool isValid() const override { return true; }
     14 #if !SYNTHLIB_DEMO_MODE
     15 		bool getState(std::vector<uint8_t>& _state, synthLib::StateType _type) override { return false; }
     16 		bool setState(const std::vector<uint8_t>& _state, synthLib::StateType _type) override { return false; }
     17 #endif
     18 		uint32_t getChannelCountIn() override { return 2; }
     19 		uint32_t getChannelCountOut() override { return 2; }
     20 
     21 		bool setDspClockPercent(uint32_t _percent) override { return false; }
     22 		uint32_t getDspClockPercent() const override { return 100; }
     23 		uint64_t getDspClockHz() const override { return 100000000; }
     24 
     25 	protected:
     26 		void readMidiOut(std::vector<synthLib::SMidiEvent>& _midiOut) override {}
     27 		void processAudio(const synthLib::TAudioInputs& _inputs, const synthLib::TAudioOutputs& _outputs, size_t _samples) override;
     28 		bool sendMidi(const synthLib::SMidiEvent& _ev, std::vector<synthLib::SMidiEvent>& _response) override { return false; }
     29 	};
     30 }