diff options
author | Max Horn | 2009-12-09 18:05:20 +0000 |
---|---|---|
committer | Max Horn | 2009-12-09 18:05:20 +0000 |
commit | 84f3c98fad7d351611c879dddc86cd309b4f5281 (patch) | |
tree | 5d7b271f32a9bf095b71030a866fdd752718c783 | |
parent | 414e6ffef30e8b86f3054bc89c092b96d3f8757d (diff) | |
download | scummvm-rg350-84f3c98fad7d351611c879dddc86cd309b4f5281.tar.gz scummvm-rg350-84f3c98fad7d351611c879dddc86cd309b4f5281.tar.bz2 scummvm-rg350-84f3c98fad7d351611c879dddc86cd309b4f5281.zip |
Remove the Audio::Mixer parameter from the midi/music plugins
svn-id: r46315
-rw-r--r-- | backends/midi/alsa.cpp | 8 | ||||
-rw-r--r-- | backends/midi/camd.cpp | 8 | ||||
-rw-r--r-- | backends/midi/coreaudio.cpp | 8 | ||||
-rw-r--r-- | backends/midi/coremidi.cpp | 8 | ||||
-rw-r--r-- | backends/midi/dmedia.cpp | 8 | ||||
-rw-r--r-- | backends/midi/seq.cpp | 8 | ||||
-rw-r--r-- | backends/midi/stmidi.cpp | 8 | ||||
-rw-r--r-- | backends/midi/timidity.cpp | 8 | ||||
-rw-r--r-- | backends/midi/windows.cpp | 8 | ||||
-rw-r--r-- | backends/midi/ypa1.cpp | 8 | ||||
-rw-r--r-- | backends/midi/zodiac.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | sound/mididrv.cpp | 32 | ||||
-rw-r--r-- | sound/mididrv.h | 34 | ||||
-rw-r--r-- | sound/musicplugin.h | 3 | ||||
-rw-r--r-- | sound/null.cpp | 12 | ||||
-rw-r--r-- | sound/softsynth/adlib.cpp | 10 | ||||
-rw-r--r-- | sound/softsynth/mt32.cpp | 10 | ||||
-rw-r--r-- | sound/softsynth/ym2612.cpp | 10 |
19 files changed, 100 insertions, 101 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index ff84744569..c38537248c 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -269,7 +269,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; #define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits)) @@ -315,17 +315,17 @@ MusicDevices AlsaMusicPlugin::getDevices() const { return devices; } -Common::Error AlsaMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error AlsaMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_ALSA(); return Common::kNoError; } -MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_ALSA_create() { MidiDriver *mididriver; AlsaMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 24d211281c..e4ca3569f2 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -177,7 +177,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices CamdMusicPlugin::getDevices() const { @@ -188,17 +188,17 @@ MusicDevices CamdMusicPlugin::getDevices() const { return devices; } -Common::Error CamdMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error CamdMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_CAMD(); return Common::kNoError; } -MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_CAMD_create() { MidiDriver *mididriver; CamdMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 21c918b205..df02f62c32 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -218,7 +218,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices CoreAudioMusicPlugin::getDevices() const { @@ -229,17 +229,17 @@ MusicDevices CoreAudioMusicPlugin::getDevices() const { return devices; } -Common::Error CoreAudioMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error CoreAudioMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_CORE(); return Common::kNoError; } -MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_CORE_create() { MidiDriver *mididriver; CoreAudioMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index e63788d154..a1191c5129 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -190,7 +190,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices CoreMIDIMusicPlugin::getDevices() const { @@ -201,17 +201,17 @@ MusicDevices CoreMIDIMusicPlugin::getDevices() const { return devices; } -Common::Error CoreMIDIMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error CoreMIDIMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_CoreMIDI(); return Common::kNoError; } -MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_CoreMIDI_create() { MidiDriver *mididriver; CoreMIDIMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index fc4c3d52c1..1ec79d8513 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -199,7 +199,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices DMediaMusicPlugin::getDevices() const { @@ -224,17 +224,17 @@ MusicDevices DMediaMusicPlugin::getDevices() const { return devices; } -Common::Error DMediaMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error DMediaMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_DMEDIA(); return Common::kNoError; } -MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_DMEDIA_create() { MidiDriver *mididriver; DMediaMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 3522975679..55c8239562 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -184,7 +184,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices SeqMusicPlugin::getDevices() const { @@ -195,17 +195,17 @@ MusicDevices SeqMusicPlugin::getDevices() const { return devices; } -Common::Error SeqMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error SeqMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_SEQ(); return Common::kNoError; } -MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_SEQ_create() { MidiDriver *mididriver; SeqMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/stmidi.cpp b/backends/midi/stmidi.cpp index 154f4aacf6..2885b102d8 100644 --- a/backends/midi/stmidi.cpp +++ b/backends/midi/stmidi.cpp @@ -122,7 +122,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) + Common::Error createInstance(MidiDriver **mididriver) const; }; @@ -134,17 +134,17 @@ MusicDevices StMidiMusicPlugin::getDevices() const { return devices; } -Common::Error StMidiMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error StMidiMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_STMIDI(); return Common::kNoError; } -MidiDriver *MidiDriver_STMIDI_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_STMIDI_create() { MidiDriver *mididriver; StMidiMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index d533dab770..584518d736 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -532,7 +532,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices TimidityMusicPlugin::getDevices() const { @@ -541,17 +541,17 @@ MusicDevices TimidityMusicPlugin::getDevices() const { return devices; } -Common::Error TimidityMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error TimidityMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_TIMIDITY(); return Common::kNoError; } -MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_TIMIDITY_create() { MidiDriver *mididriver; TimidityMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index ba9e35187a..036029644e 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -158,7 +158,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices WindowsMusicPlugin::getDevices() const { @@ -169,17 +169,17 @@ MusicDevices WindowsMusicPlugin::getDevices() const { return devices; } -Common::Error WindowsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error WindowsMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_WIN(); return Common::kNoError; } -MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_WIN_create() { MidiDriver *mididriver; WindowsMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index ab49136121..fe65d02c10 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -117,7 +117,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices YamahaPa1MusicPlugin::getDevices() const { @@ -128,17 +128,17 @@ MusicDevices YamahaPa1MusicPlugin::getDevices() const { return devices; } -Common::Error YamahaPa1MusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error YamahaPa1MusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_YamahaPa1(); return Common::kNoError; } -MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_YamahaPa1_create() { MidiDriver *mididriver; YamahaPa1MusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index 1b3b578aab..b9cb46912a 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -135,7 +135,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices ZodiacMusicPlugin::getDevices() const { @@ -146,17 +146,17 @@ MusicDevices ZodiacMusicPlugin::getDevices() const { return devices; } -Common::Error ZodiacMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error ZodiacMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_Zodiac(); return Common::kNoError; } -MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_Zodiac_create() { MidiDriver *mididriver; ZodiacMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 6e9582b3a7..0fc43b8e22 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1753,7 +1753,7 @@ void ScummEngine::setupMusic(int midi) { nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); bool multi_midi = ConfMan.getBool("multi_midi") && _musicType != MDT_NONE && (midi & MDT_ADLIB); if (_musicType == MDT_ADLIB || multi_midi) { - adlibMidiDriver = MidiDriver_ADLIB_create(_mixer); + adlibMidiDriver = MidiDriver_ADLIB_create(); adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0); } diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index d328536d5e..c7e7b757ba 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -226,11 +226,11 @@ MidiDriverType MidiDriver::detectMusicDriver(int flags) { MidiDriver *MidiDriver::createMidi(int midiDriver) { switch (midiDriver) { - case MD_NULL: return MidiDriver_NULL_create(g_system->getMixer()); + case MD_NULL: return MidiDriver_NULL_create(); - case MD_ADLIB: return MidiDriver_ADLIB_create(g_system->getMixer()); + case MD_ADLIB: return MidiDriver_ADLIB_create(); - case MD_TOWNS: return MidiDriver_YM2612_create(g_system->getMixer()); + case MD_TOWNS: return MidiDriver_YM2612_create(); // Right now PC Speaker and PCjr are handled // outside the MidiDriver architecture, so @@ -240,45 +240,45 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) { case MD_PCJR: return NULL; #ifdef USE_FLUIDSYNTH - case MD_FLUIDSYNTH: return MidiDriver_FluidSynth_create(g_system->getMixer()); + case MD_FLUIDSYNTH: return MidiDriver_FluidSynth_create(); #endif #ifdef USE_MT32EMU - case MD_MT32: return MidiDriver_MT32_create(g_system->getMixer()); + case MD_MT32: return MidiDriver_MT32_create(); #endif #if defined(PALMOS_MODE) #if defined(COMPILE_CLIE) - case MD_YPA1: return MidiDriver_YamahaPa1_create(g_system->getMixer()); + case MD_YPA1: return MidiDriver_YamahaPa1_create(); #elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM)) - case MD_ZODIAC: return MidiDriver_Zodiac_create(g_system->getMixer()); + case MD_ZODIAC: return MidiDriver_Zodiac_create(); #endif #endif #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) - case MD_WINDOWS: return MidiDriver_WIN_create(g_system->getMixer()); + case MD_WINDOWS: return MidiDriver_WIN_create(); #endif #if defined(__MINT__) - case MD_STMIDI: return MidiDriver_STMIDI_create(g_system->getMixer()); + case MD_STMIDI: return MidiDriver_STMIDI_create(); #endif #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOSX) && !defined(__MAEMO__) && !defined(__MINT__) - case MD_SEQ: return MidiDriver_SEQ_create(g_system->getMixer()); + case MD_SEQ: return MidiDriver_SEQ_create(); #endif #if defined(UNIX) - case MD_TIMIDITY: return MidiDriver_TIMIDITY_create(g_system->getMixer()); + case MD_TIMIDITY: return MidiDriver_TIMIDITY_create(); #endif #if defined(IRIX) - case MD_DMEDIA: return MidiDriver_DMEDIA_create(g_system->getMixer()); + case MD_DMEDIA: return MidiDriver_DMEDIA_create(); #endif #if defined(MACOSX) - case MD_COREAUDIO: return MidiDriver_CORE_create(g_system->getMixer()); - case MD_COREMIDI: return MidiDriver_CoreMIDI_create(g_system->getMixer()); + case MD_COREAUDIO: return MidiDriver_CORE_create(); + case MD_COREMIDI: return MidiDriver_CoreMIDI_create(); #endif #if defined(UNIX) && defined(USE_ALSA) - case MD_ALSA: return MidiDriver_ALSA_create(g_system->getMixer()); + case MD_ALSA: return MidiDriver_ALSA_create(); #endif #if defined(__amigaos4__) - case MD_CAMD: return MidiDriver_CAMD_create(g_system->getMixer()); + case MD_CAMD: return MidiDriver_CAMD_create(); #endif } diff --git a/sound/mididrv.h b/sound/mididrv.h index c908f55e4a..10813f7300 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -273,26 +273,26 @@ public: // Factory functions, for faster compile -extern MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_STMIDI_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_NULL_create(); +extern MidiDriver *MidiDriver_ADLIB_create(); +extern MidiDriver *MidiDriver_WIN_create(); +extern MidiDriver *MidiDriver_STMIDI_create(); +extern MidiDriver *MidiDriver_SEQ_create(); +extern MidiDriver *MidiDriver_TIMIDITY_create(); +extern MidiDriver *MidiDriver_QT_create(); +extern MidiDriver *MidiDriver_CORE_create(); +extern MidiDriver *MidiDriver_CoreMIDI_create(); +extern MidiDriver *MidiDriver_ALSA_create(); +extern MidiDriver *MidiDriver_DMEDIA_create(); +extern MidiDriver *MidiDriver_CAMD_create(); +extern MidiDriver *MidiDriver_YM2612_create(); #ifdef USE_FLUIDSYNTH -extern MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_FluidSynth_create(); #endif #ifdef USE_MT32EMU -extern MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_MT32_create(); #endif -extern MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_YamahaPa1_create(); +extern MidiDriver *MidiDriver_Zodiac_create(); #endif diff --git a/sound/musicplugin.h b/sound/musicplugin.h index cc0d2ec7a8..df97494a90 100644 --- a/sound/musicplugin.h +++ b/sound/musicplugin.h @@ -98,12 +98,11 @@ public: * the currently active ConfMan target. That is, the MusicPluginObject * should query the ConfMan singleton for the device name, port, etc. * - * @param mixer Pointer to the global Mixer object * @param mididriver Pointer to a pointer which the MusicPluginObject sets * to the newly create MidiDriver, or 0 in case of an error * @return a Common::Error describing the error which occurred, or kNoError */ - virtual Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0; + virtual Common::Error createInstance(MidiDriver **mididriver) const = 0; }; diff --git a/sound/null.cpp b/sound/null.cpp index fb5cbf806a..00a5f5e488 100644 --- a/sound/null.cpp +++ b/sound/null.cpp @@ -46,10 +46,10 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; -Common::Error NullMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +Common::Error NullMusicPlugin::createInstance(MidiDriver **mididriver) const { *mididriver = new MidiDriver_NULL(); return Common::kNoError; @@ -62,18 +62,18 @@ MusicDevices NullMusicPlugin::getDevices() const { return devices; } -MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_NULL_create() { MidiDriver *mididriver; NullMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } #ifdef DISABLE_ADLIB -MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { - return MidiDriver_NULL_create(mixer); +MidiDriver *MidiDriver_ADLIB_create() { + return MidiDriver_NULL_create(); } #endif diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp index 9d4ac1e0c0..3f887f1f5b 100644 --- a/sound/softsynth/adlib.cpp +++ b/sound/softsynth/adlib.cpp @@ -1594,7 +1594,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices AdlibEmuMusicPlugin::getDevices() const { @@ -1603,17 +1603,17 @@ MusicDevices AdlibEmuMusicPlugin::getDevices() const { return devices; } -Common::Error AdlibEmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { - *mididriver = new MidiDriver_ADLIB(mixer); +Common::Error AdlibEmuMusicPlugin::createInstance(MidiDriver **mididriver) const { + *mididriver = new MidiDriver_ADLIB(g_system->getMixer()); return Common::kNoError; } -MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_ADLIB_create() { MidiDriver *mididriver; AdlibEmuMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index f3e768d08d..dde6b4f559 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -497,7 +497,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices MT32EmuMusicPlugin::getDevices() const { @@ -506,13 +506,13 @@ MusicDevices MT32EmuMusicPlugin::getDevices() const { return devices; } -Common::Error MT32EmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { - *mididriver = new MidiDriver_MT32(mixer); +Common::Error MT32EmuMusicPlugin::createInstance(MidiDriver **mididriver) const { + *mididriver = new MidiDriver_MT32(g_system->getMixer()); return Common::kNoError; } -MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_MT32_create() { // HACK: It will stay here until engine plugin loader overhaul if (ConfMan.hasKey("extrapath")) SearchMan.addDirectory("extrapath", ConfMan.get("extrapath")); @@ -520,7 +520,7 @@ MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) { MidiDriver *mididriver; MT32EmuMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 7dac630ef9..b03488855b 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -766,7 +766,7 @@ public: } MusicDevices getDevices() const; - Common::Error createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + Common::Error createInstance(MidiDriver **mididriver) const; }; MusicDevices TownsEmuMusicPlugin::getDevices() const { @@ -775,17 +775,17 @@ MusicDevices TownsEmuMusicPlugin::getDevices() const { return devices; } -Common::Error TownsEmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { - *mididriver = new MidiDriver_YM2612(mixer); +Common::Error TownsEmuMusicPlugin::createInstance(MidiDriver **mididriver) const { + *mididriver = new MidiDriver_YM2612(g_system->getMixer()); return Common::kNoError; } -MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer) { +MidiDriver *MidiDriver_YM2612_create() { MidiDriver *mididriver; TownsEmuMusicPlugin p; - p.createInstance(mixer, &mididriver); + p.createInstance(&mididriver); return mididriver; } |