diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-05-17 23:32:08 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-05-21 20:02:34 +0200 |
commit | 37bc2f806462b3c2a84891b3aad6db00e935da86 (patch) | |
tree | 9f832e8646ec0c4a4038f6c0642c853fbe02038a /src/music | |
parent | a49fdb7ebbb8d8ce96bcd7bd779b18bcd86d0643 (diff) | |
download | openttd-37bc2f806462b3c2a84891b3aad6db00e935da86.tar.xz |
Codechange: Use std::string in the driver and blitter selection code.
Diffstat (limited to 'src/music')
-rw-r--r-- | src/music/allegro_m.cpp | 2 | ||||
-rw-r--r-- | src/music/allegro_m.h | 2 | ||||
-rw-r--r-- | src/music/bemidi.cpp | 2 | ||||
-rw-r--r-- | src/music/bemidi.h | 2 | ||||
-rw-r--r-- | src/music/cocoa_m.cpp | 2 | ||||
-rw-r--r-- | src/music/cocoa_m.h | 2 | ||||
-rw-r--r-- | src/music/dmusic.cpp | 2 | ||||
-rw-r--r-- | src/music/dmusic.h | 2 | ||||
-rw-r--r-- | src/music/extmidi.cpp | 2 | ||||
-rw-r--r-- | src/music/extmidi.h | 2 | ||||
-rw-r--r-- | src/music/fluidsynth.cpp | 2 | ||||
-rw-r--r-- | src/music/fluidsynth.h | 2 | ||||
-rw-r--r-- | src/music/music_driver.hpp | 2 | ||||
-rw-r--r-- | src/music/null_m.h | 2 | ||||
-rw-r--r-- | src/music/os2_m.cpp | 2 | ||||
-rw-r--r-- | src/music/os2_m.h | 2 | ||||
-rw-r--r-- | src/music/win32_m.cpp | 2 | ||||
-rw-r--r-- | src/music/win32_m.h | 2 |
18 files changed, 18 insertions, 18 deletions
diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp index 4f90bce06..6d06ce87e 100644 --- a/src/music/allegro_m.cpp +++ b/src/music/allegro_m.cpp @@ -26,7 +26,7 @@ static MIDI *_midi = nullptr; */ extern int _allegro_instance_count; -const char *MusicDriver_Allegro::Start(const char * const *param) +const char *MusicDriver_Allegro::Start(const StringList ¶m) { if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) { DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error); diff --git a/src/music/allegro_m.h b/src/music/allegro_m.h index 1965626ca..b07a7073b 100644 --- a/src/music/allegro_m.h +++ b/src/music/allegro_m.h @@ -15,7 +15,7 @@ /** Allegro's music player. */ class MusicDriver_Allegro : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/bemidi.cpp b/src/music/bemidi.cpp index c3ea152da..4175f526b 100644 --- a/src/music/bemidi.cpp +++ b/src/music/bemidi.cpp @@ -24,7 +24,7 @@ static BMidiSynthFile midiSynthFile; /** Factory for BeOS' midi player. */ static FMusicDriver_BeMidi iFMusicDriver_BeMidi; -const char *MusicDriver_BeMidi::Start(const char * const *parm) +const char *MusicDriver_BeMidi::Start(const StringList &parm) { return nullptr; } diff --git a/src/music/bemidi.h b/src/music/bemidi.h index a524069db..8e96acc8d 100644 --- a/src/music/bemidi.h +++ b/src/music/bemidi.h @@ -15,7 +15,7 @@ /** The midi player for BeOS. */ class MusicDriver_BeMidi : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/cocoa_m.cpp b/src/music/cocoa_m.cpp index 9fec5ba15..a989cfe76 100644 --- a/src/music/cocoa_m.cpp +++ b/src/music/cocoa_m.cpp @@ -79,7 +79,7 @@ static void DoSetVolume() /** * Initialized the MIDI player, including QuickTime initialization. */ -const char *MusicDriver_Cocoa::Start(const char * const *parm) +const char *MusicDriver_Cocoa::Start(const StringList &parm) { if (NewMusicPlayer(&_player) != noErr) return "failed to create music player"; diff --git a/src/music/cocoa_m.h b/src/music/cocoa_m.h index aa477edda..046a60c38 100644 --- a/src/music/cocoa_m.h +++ b/src/music/cocoa_m.h @@ -14,7 +14,7 @@ class MusicDriver_Cocoa : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index 4a7461ee8..780666142 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -1071,7 +1071,7 @@ static const char *LoadDefaultDLSFile(const char *user_dls) } -const char *MusicDriver_DMusic::Start(const char * const *parm) +const char *MusicDriver_DMusic::Start(const StringList &parm) { /* Initialize COM */ if (FAILED(CoInitializeEx(nullptr, COINITBASE_MULTITHREADED))) return "COM initialization failed"; diff --git a/src/music/dmusic.h b/src/music/dmusic.h index bfbb07f16..616bf0120 100644 --- a/src/music/dmusic.h +++ b/src/music/dmusic.h @@ -17,7 +17,7 @@ class MusicDriver_DMusic : public MusicDriver { public: virtual ~MusicDriver_DMusic(); - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index b7e7e63b9..f88245250 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -36,7 +36,7 @@ /** Factory for the midi player that uses external players. */ static FMusicDriver_ExtMidi iFMusicDriver_ExtMidi; -const char *MusicDriver_ExtMidi::Start(const char * const * parm) +const char *MusicDriver_ExtMidi::Start(const StringList &parm) { if (strcmp(VideoDriver::GetInstance()->GetName(), "allegro") == 0 || strcmp(SoundDriver::GetInstance()->GetName(), "allegro") == 0) { diff --git a/src/music/extmidi.h b/src/music/extmidi.h index 495e9a72c..f43bbad17 100644 --- a/src/music/extmidi.h +++ b/src/music/extmidi.h @@ -22,7 +22,7 @@ private: void DoStop(); public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/fluidsynth.cpp b/src/music/fluidsynth.cpp index 64abe0e53..61686a441 100644 --- a/src/music/fluidsynth.cpp +++ b/src/music/fluidsynth.cpp @@ -50,7 +50,7 @@ static void RenderMusicStream(int16 *buffer, size_t samples) fluid_synth_write_s16(_midi.synth, samples, buffer, 0, 2, buffer, 1, 2); } -const char *MusicDriver_FluidSynth::Start(const char * const *param) +const char *MusicDriver_FluidSynth::Start(const StringList ¶m) { std::lock_guard<std::mutex> lock{ _midi.synth_mutex }; diff --git a/src/music/fluidsynth.h b/src/music/fluidsynth.h index 71d43fec4..91543662d 100644 --- a/src/music/fluidsynth.h +++ b/src/music/fluidsynth.h @@ -15,7 +15,7 @@ /** Music driver making use of FluidSynth. */ class MusicDriver_FluidSynth : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/music_driver.hpp b/src/music/music_driver.hpp index 601cc6d47..3953685bf 100644 --- a/src/music/music_driver.hpp +++ b/src/music/music_driver.hpp @@ -48,6 +48,6 @@ public: } }; -extern char *_ini_musicdriver; +extern std::string _ini_musicdriver; #endif /* MUSIC_MUSIC_DRIVER_HPP */ diff --git a/src/music/null_m.h b/src/music/null_m.h index 09f84e35c..3a034110d 100644 --- a/src/music/null_m.h +++ b/src/music/null_m.h @@ -15,7 +15,7 @@ /** The music player that does nothing. */ class MusicDriver_Null : public MusicDriver { public: - const char *Start(const char * const *param) override { return nullptr; } + const char *Start(const StringList ¶m) override { return nullptr; } void Stop() override { } diff --git a/src/music/os2_m.cpp b/src/music/os2_m.cpp index f66c2bd9e..473606567 100644 --- a/src/music/os2_m.cpp +++ b/src/music/os2_m.cpp @@ -80,7 +80,7 @@ bool MusicDriver_OS2::IsSongPlaying() return strcmp(buf, "playing") == 0 || strcmp(buf, "seeking") == 0; } -const char *MusicDriver_OS2::Start(const char * const *parm) +const char *MusicDriver_OS2::Start(const StringList &parm) { return 0; } diff --git a/src/music/os2_m.h b/src/music/os2_m.h index d0a4809b2..a60f5bbfc 100644 --- a/src/music/os2_m.h +++ b/src/music/os2_m.h @@ -15,7 +15,7 @@ /** OS/2's music player. */ class MusicDriver_OS2 : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index b4f656b14..249fc5b6d 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -362,7 +362,7 @@ void MusicDriver_Win32::SetVolume(byte vol) _midi.new_volume = vol; } -const char *MusicDriver_Win32::Start(const char * const *parm) +const char *MusicDriver_Win32::Start(const StringList &parm) { DEBUG(driver, 2, "Win32-MIDI: Start: initializing"); diff --git a/src/music/win32_m.h b/src/music/win32_m.h index 394c3d990..5101d2932 100644 --- a/src/music/win32_m.h +++ b/src/music/win32_m.h @@ -15,7 +15,7 @@ /** The Windows music player. */ class MusicDriver_Win32 : public MusicDriver { public: - const char *Start(const char * const *param) override; + const char *Start(const StringList ¶m) override; void Stop() override; |