xtDevice.h (1111B)
1 #pragma once 2 3 #include "xt.h" 4 #include "xtState.h" 5 #include "xtSysexRemoteControl.h" 6 #include "xtWavePreview.h" 7 #include "wLib/wDevice.h" 8 9 namespace dsp56k 10 { 11 class EsxiClock; 12 } 13 14 namespace xt 15 { 16 class Device : public wLib::Device 17 { 18 public: 19 Device(const synthLib::DeviceCreateParams& _params); 20 21 float getSamplerate() const override; 22 bool isValid() const override; 23 bool getState(std::vector<uint8_t>& _state, synthLib::StateType _type) override; 24 bool setState(const std::vector<uint8_t>& _state, synthLib::StateType _type) override; 25 uint32_t getChannelCountIn() override; 26 uint32_t getChannelCountOut() override; 27 28 protected: 29 void readMidiOut(std::vector<synthLib::SMidiEvent>& _midiOut) override; 30 void processAudio(const synthLib::TAudioInputs& _inputs, const synthLib::TAudioOutputs& _outputs, size_t _samples) override; 31 bool sendMidi(const synthLib::SMidiEvent& _ev, std::vector<synthLib::SMidiEvent>& _response) override; 32 33 dsp56k::EsxiClock* getDspEsxiClock() const override; 34 private: 35 36 Xt m_xt; 37 WavePreview m_wavePreview; 38 State m_state; 39 SysexRemoteControl m_sysexRemote; 40 }; 41 }