22 #ifndef AUDIO_MIDIDRV_MS_H 23 #define AUDIO_MIDIDRV_MS_H 25 #include "common/mutex.h" 27 #include "audio/mididrv.h" 104 static const uint16 FADING_DELAY = 25 * 1000;
148 CONTROLLER_DEFAULT_PROGRAM,
149 CONTROLLER_DEFAULT_INSTRUMENT_BANK,
150 CONTROLLER_DEFAULT_DRUMKIT,
151 CONTROLLER_DEFAULT_CHANNEL_PRESSURE,
152 CONTROLLER_DEFAULT_PITCH_BEND,
153 CONTROLLER_DEFAULT_MODULATION,
154 CONTROLLER_DEFAULT_VOLUME,
155 CONTROLLER_DEFAULT_PANNING,
156 CONTROLLER_DEFAULT_EXPRESSION,
157 CONTROLLER_DEFAULT_SUSTAIN,
158 CONTROLLER_DEFAULT_RPN,
159 CONTROLLER_DEFAULT_PITCH_BEND_SENSITIVITY
176 uint16 neutralVolume;
178 uint16 fadeStartVolume;
180 uint16 fadeEndVolume;
182 int32 fadePassedTime;
196 int8 channelPressure;
206 int8 pitchBendSensitivity;
216 void send(uint32 b)
override;
217 void send(int8 source, uint32 b)
override = 0;
219 uint32
property(
int prop, uint32 param)
override;
288 void startFade(uint16 duration, uint16 targetVolume);
298 void startFade(uint8 source, uint16 duration, uint16 targetVolume);
412 virtual void stopAllNotes(uint8 source, uint8 channel) = 0;
425 _timer_param = timer_param;
426 _timer_proc = timer_proc;
456 const byte *_instrumentRemapping;
460 bool _userVolumeScaling;
463 uint16 _userMusicVolume;
464 uint16 _userSfxVolume;
483 bool isOpen()
const override {
return true; }
484 void close()
override;
486 MidiChannel *allocateChannel()
override {
return 0; }
487 MidiChannel *getPercussionChannel()
override {
return 0; }
490 void send(int8 source, uint32 b)
override { }
494 static void timerCallback(
void *data);
void stopAllNotes(uint8 source, uint8 channel) override
Definition: mididrv_ms.h:492
void setSourceVolume(uint16 volume)
Definition: mididrv_ms.h:140
void clearControllerDefault(ControllerDefaultType type)
void send(int8 source, uint32 b) override
Definition: mididrv_ms.h:490
uint32 getBaseTempo() override
Definition: mididrv_ms.h:485
Definition: mididrv_ms.h:114
virtual void deinitSource(uint8 source)
Definition: mididrv_ms.h:86
void setSourceNeutralVolume(uint16 volume)
Definition: mididrv_ms.h:132
void(* TimerProc)(void *refCon)
Definition: timer.h:42
virtual void stopAllNotes(uint8 source, uint8 channel)=0
Definition: mididrv_ms.h:118
virtual void stopAllNotes(bool stopSustainedNotes=false)
void setControllerDefaults(ControllerDefaultType type, int16 *values)
Definition: mididrv.h:309
ControllerDefaultType
Definition: mididrv_ms.h:147
void applySourceVolume(uint8 source) override
Definition: mididrv_ms.h:497
static const uint8 MAXIMUM_SOURCES
Definition: mididrv_ms.h:92
FadeAbortType
Definition: mididrv_ms.h:128
void setControllerDefault(ControllerDefaultType type)
SourceType
Definition: mididrv_ms.h:110
Definition: mididrv_ms.h:480
void startFade(uint16 duration, uint16 targetVolume)
void abortFade(FadeAbortType abortType=FADE_ABORT_TYPE_END_VOLUME)
void setTimerCallback(void *timer_param, Common::TimerManager::TimerProc timer_proc) override
Definition: mididrv_ms.h:424
Definition: mididrv.h:537
uint32 property(int prop, uint32 param) override
void send(uint32 b) override
Definition: mididrv_ms.h:191
static const uint16 DEFAULT_SOURCE_NEUTRAL_VOLUME
Definition: mididrv_ms.h:100
virtual void applySourceVolume(uint8 source)=0
Definition: mididrv_ms.h:136
bool isOpen() const override
Definition: mididrv_ms.h:483
Definition: mididrv_ms.h:164
void setInstrumentRemapping(const byte *instrumentRemapping)
virtual void send(uint32 b)=0
Definition: mididrv_ms.h:122
void setSourceType(SourceType type)