summaryrefslogtreecommitdiff
path: root/src/sound
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-05-17 23:32:08 +0200
committerMichael Lutz <michi@icosahedron.de>2020-05-21 20:02:34 +0200
commit37bc2f806462b3c2a84891b3aad6db00e935da86 (patch)
tree9f832e8646ec0c4a4038f6c0642c853fbe02038a /src/sound
parenta49fdb7ebbb8d8ce96bcd7bd779b18bcd86d0643 (diff)
downloadopenttd-37bc2f806462b3c2a84891b3aad6db00e935da86.tar.xz
Codechange: Use std::string in the driver and blitter selection code.
Diffstat (limited to 'src/sound')
-rw-r--r--src/sound/allegro_s.cpp2
-rw-r--r--src/sound/allegro_s.h2
-rw-r--r--src/sound/cocoa_s.cpp2
-rw-r--r--src/sound/cocoa_s.h2
-rw-r--r--src/sound/null_s.h2
-rw-r--r--src/sound/sdl2_s.cpp2
-rw-r--r--src/sound/sdl_s.cpp2
-rw-r--r--src/sound/sdl_s.h2
-rw-r--r--src/sound/sound_driver.hpp2
-rw-r--r--src/sound/win32_s.cpp2
-rw-r--r--src/sound/win32_s.h2
-rw-r--r--src/sound/xaudio2_s.cpp2
-rw-r--r--src/sound/xaudio2_s.h2
13 files changed, 13 insertions, 13 deletions
diff --git a/src/sound/allegro_s.cpp b/src/sound/allegro_s.cpp
index f7fa5df08..09198100b 100644
--- a/src/sound/allegro_s.cpp
+++ b/src/sound/allegro_s.cpp
@@ -50,7 +50,7 @@ void SoundDriver_Allegro::MainLoop()
*/
extern int _allegro_instance_count;
-const char *SoundDriver_Allegro::Start(const char * const *parm)
+const char *SoundDriver_Allegro::Start(const StringList &parm)
{
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/sound/allegro_s.h b/src/sound/allegro_s.h
index 307d10fca..6d40c5876 100644
--- a/src/sound/allegro_s.h
+++ b/src/sound/allegro_s.h
@@ -15,7 +15,7 @@
/** Implementation of the allegro sound driver. */
class SoundDriver_Allegro : public SoundDriver {
public:
- const char *Start(const char * const *param);
+ const char *Start(const StringList &param);
void Stop();
diff --git a/src/sound/cocoa_s.cpp b/src/sound/cocoa_s.cpp
index cb1bc59e8..f5003a23c 100644
--- a/src/sound/cocoa_s.cpp
+++ b/src/sound/cocoa_s.cpp
@@ -44,7 +44,7 @@ static OSStatus audioCallback(void *inRefCon, AudioUnitRenderActionFlags *inActi
}
-const char *SoundDriver_Cocoa::Start(const char * const *parm)
+const char *SoundDriver_Cocoa::Start(const StringList &parm)
{
struct AURenderCallbackStruct callback;
AudioStreamBasicDescription requestedDesc;
diff --git a/src/sound/cocoa_s.h b/src/sound/cocoa_s.h
index 43646504d..dca542191 100644
--- a/src/sound/cocoa_s.h
+++ b/src/sound/cocoa_s.h
@@ -14,7 +14,7 @@
class SoundDriver_Cocoa : public SoundDriver {
public:
- const char *Start(const char * const *param) override;
+ const char *Start(const StringList &param) override;
void Stop() override;
const char *GetName() const override { return "cocoa"; }
diff --git a/src/sound/null_s.h b/src/sound/null_s.h
index 5b883dde1..c01eae32a 100644
--- a/src/sound/null_s.h
+++ b/src/sound/null_s.h
@@ -15,7 +15,7 @@
/** Implementation of the null sound driver. */
class SoundDriver_Null : public SoundDriver {
public:
- const char *Start(const char * const *param) override { return nullptr; }
+ const char *Start(const StringList &param) override { return nullptr; }
void Stop() override { }
const char *GetName() const override { return "null"; }
diff --git a/src/sound/sdl2_s.cpp b/src/sound/sdl2_s.cpp
index 0b4e6c086..9d1e47fab 100644
--- a/src/sound/sdl2_s.cpp
+++ b/src/sound/sdl2_s.cpp
@@ -31,7 +31,7 @@ static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len)
MxMixSamples(stream, len / 4);
}
-const char *SoundDriver_SDL::Start(const char * const *parm)
+const char *SoundDriver_SDL::Start(const StringList &parm)
{
SDL_AudioSpec spec;
SDL_AudioSpec spec_actual;
diff --git a/src/sound/sdl_s.cpp b/src/sound/sdl_s.cpp
index aac786dab..737192a7e 100644
--- a/src/sound/sdl_s.cpp
+++ b/src/sound/sdl_s.cpp
@@ -31,7 +31,7 @@ static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len)
MxMixSamples(stream, len / 4);
}
-const char *SoundDriver_SDL::Start(const char * const *parm)
+const char *SoundDriver_SDL::Start(const StringList &parm)
{
SDL_AudioSpec spec;
diff --git a/src/sound/sdl_s.h b/src/sound/sdl_s.h
index 4f746107c..2b3be4d14 100644
--- a/src/sound/sdl_s.h
+++ b/src/sound/sdl_s.h
@@ -15,7 +15,7 @@
/** Implementation of the SDL sound driver. */
class SoundDriver_SDL : public SoundDriver {
public:
- const char *Start(const char * const *param) override;
+ const char *Start(const StringList &param) override;
void Stop() override;
const char *GetName() const override { return "sdl"; }
diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp
index f1a0519f8..6de66d74e 100644
--- a/src/sound/sound_driver.hpp
+++ b/src/sound/sound_driver.hpp
@@ -26,6 +26,6 @@ public:
}
};
-extern char *_ini_sounddriver;
+extern std::string _ini_sounddriver;
#endif /* SOUND_SOUND_DRIVER_HPP */
diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp
index f45a619b5..4551778bd 100644
--- a/src/sound/win32_s.cpp
+++ b/src/sound/win32_s.cpp
@@ -58,7 +58,7 @@ static DWORD WINAPI SoundThread(LPVOID arg)
return 0;
}
-const char *SoundDriver_Win32::Start(const char * const *parm)
+const char *SoundDriver_Win32::Start(const StringList &parm)
{
WAVEFORMATEX wfex;
wfex.wFormatTag = WAVE_FORMAT_PCM;
diff --git a/src/sound/win32_s.h b/src/sound/win32_s.h
index be48a055c..6f8f9791d 100644
--- a/src/sound/win32_s.h
+++ b/src/sound/win32_s.h
@@ -15,7 +15,7 @@
/** Implementation of the sound driver for Windows. */
class SoundDriver_Win32 : public SoundDriver {
public:
- const char *Start(const char * const *param) override;
+ const char *Start(const StringList &param) override;
void Stop() override;
const char *GetName() const override { return "win32"; }
diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp
index 8b9afbd1b..5aa058040 100644
--- a/src/sound/xaudio2_s.cpp
+++ b/src/sound/xaudio2_s.cpp
@@ -126,7 +126,7 @@ static StreamingVoiceContext* _voice_context = nullptr;
* @return An error message if unsuccessful, or nullptr otherwise.
*
*/
-const char *SoundDriver_XAudio2::Start(const char * const *parm)
+const char *SoundDriver_XAudio2::Start(const StringList &parm)
{
HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
diff --git a/src/sound/xaudio2_s.h b/src/sound/xaudio2_s.h
index 70b4d80cc..9fcd26fd0 100644
--- a/src/sound/xaudio2_s.h
+++ b/src/sound/xaudio2_s.h
@@ -15,7 +15,7 @@
/** Implementation of the XAudio2 sound driver. */
class SoundDriver_XAudio2 : public SoundDriver {
public:
- const char *Start(const char * const *param) override;
+ const char *Start(const StringList &param) override;
void Stop() override;
const char *GetName() const override { return "xaudio2"; }