diff options
author | Jamieson Christian | 2003-10-05 15:36:52 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-10-05 15:36:52 +0000 |
commit | a722d0601e4ae87b15fe09f62b3a1076c6c8646e (patch) | |
tree | 511293906e3b210764b047191d68278e4d8cf138 /sound | |
parent | 7174a32c8e877627c51da50b657083873aeef1e6 (diff) | |
download | scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.tar.gz scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.tar.bz2 scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.zip |
Preliminary preparation for new YM2612 FM emulator.
All the hooks are in, but actual implementation
needs to be checked for portability.
svn-id: r10615
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mididrv.cpp | 1 | ||||
-rw-r--r-- | sound/mididrv.h | 23 | ||||
-rw-r--r-- | sound/mpu401.h | 9 |
3 files changed, 13 insertions, 20 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 3f175ce1f6..d6ab13762c 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -54,6 +54,7 @@ static const struct MidiDriverDescription midiDrivers[] = { {"adlib", "Adlib", MD_ADLIB}, {"pcspk", "PC Speaker", MD_PCSPK}, {"pcjr", "IBM PCjr", MD_PCJR}, + {"towns", "FM Towns", MD_TOWNS}, #endif #if defined(__PALM_OS__) diff --git a/sound/mididrv.h b/sound/mididrv.h index 65043ff5f9..b82787b62d 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -44,8 +44,8 @@ enum { MD_ADLIB = 10, MD_PCSPK = 11, MD_PCJR = 12, - - MD_YPA1 = 100 // palmos + MD_TOWNS = 13, + MD_YPA1 = 14 // PalmOS }; /** @@ -144,16 +144,16 @@ public: // Control Change messages virtual void controlChange (byte control, byte value) = 0; - virtual void modulationWheel (byte value) = 0; - virtual void volume (byte value) = 0; - virtual void panPosition (byte value) = 0; + virtual void modulationWheel (byte value) { controlChange (1, value); } + virtual void volume (byte value) { controlChange (7, value); } + virtual void panPosition (byte value) { controlChange (10, value); } virtual void pitchBendFactor (byte value) = 0; - virtual void detune (byte value) = 0; - virtual void priority (byte value) = 0; - virtual void sustain (bool value) = 0; - virtual void effectLevel (byte value) = 0; - virtual void chorusLevel (byte value) = 0; - virtual void allNotesOff() = 0; + virtual void detune (byte value) { controlChange (17, value); } + virtual void priority (byte value) { controlChange (18, value); } + virtual void sustain (bool value) { controlChange (64, value ? 1 : 0); } + virtual void effectLevel (byte value) { controlChange (91, value); } + virtual void chorusLevel (byte value) { controlChange (93, value); } + virtual void allNotesOff() { controlChange (123, 0); } // SysEx messages virtual void sysEx_customInstrument (uint32 type, byte *instr) = 0; @@ -169,6 +169,7 @@ extern MidiDriver *MidiDriver_QT_create(); extern MidiDriver *MidiDriver_CORE_create(); extern MidiDriver *MidiDriver_ETUDE_create(); extern MidiDriver *MidiDriver_ALSA_create(); +extern MidiDriver *MidiDriver_YM2612_create(SoundMixer *mixer); extern MidiDriver *MidiDriver_YamahaPa1_create(); #endif diff --git a/sound/mpu401.h b/sound/mpu401.h index aef0ea9abb..c97726e6fb 100644 --- a/sound/mpu401.h +++ b/sound/mpu401.h @@ -59,16 +59,7 @@ public: // Control Change messages void controlChange (byte control, byte value); - void modulationWheel (byte value) { controlChange (1, value); } - void volume (byte value) { controlChange (7, value); } - void panPosition (byte value) { controlChange (10, value); } void pitchBendFactor (byte value); - void detune (byte value) { controlChange (17, value); } - void priority (byte value) { controlChange (18, value); } - void sustain (bool value) { controlChange (64, value ? 1 : 0); } - void effectLevel (byte value) { controlChange (91, value); } - void chorusLevel (byte value) { controlChange (93, value); } - void allNotesOff() { controlChange (123, 0); } // SysEx messages void sysEx_customInstrument (uint32 type, byte *instr); |