Codechange: Use std::string in the driver and blitter selection code.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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 ¶m);
|
||||
|
||||
void Stop();
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
class SoundDriver_Cocoa : public SoundDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
const char *GetName() const override { return "cocoa"; }
|
||||
|
@@ -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 ¶m) override { return nullptr; }
|
||||
|
||||
void Stop() override { }
|
||||
const char *GetName() const override { return "null"; }
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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 ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
const char *GetName() const override { return "sdl"; }
|
||||
|
@@ -26,6 +26,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
extern char *_ini_sounddriver;
|
||||
extern std::string _ini_sounddriver;
|
||||
|
||||
#endif /* SOUND_SOUND_DRIVER_HPP */
|
||||
|
@@ -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;
|
||||
|
@@ -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 ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
const char *GetName() const override { return "win32"; }
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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 ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
const char *GetName() const override { return "xaudio2"; }
|
||||
|
Reference in New Issue
Block a user