diff options
author | peter1138 <peter1138@openttd.org> | 2007-07-05 12:23:54 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-07-05 12:23:54 +0000 |
commit | 68c6add8ccd9aa32eb799a433aa8a3b05ec84a57 (patch) | |
tree | 52e0cc5b1e4eb6cf9aed8556873ee6833662e11f /src/sound/sdl_s.cpp | |
parent | b5079071762021ebfbb66a14eaa598e48d6a3234 (diff) | |
download | openttd-68c6add8ccd9aa32eb799a433aa8a3b05ec84a57.tar.xz |
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
Diffstat (limited to 'src/sound/sdl_s.cpp')
-rw-r--r-- | src/sound/sdl_s.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/sound/sdl_s.cpp b/src/sound/sdl_s.cpp index b90336866..f9f40d4e3 100644 --- a/src/sound/sdl_s.cpp +++ b/src/sound/sdl_s.cpp @@ -10,12 +10,14 @@ #include "sdl_s.h" #include <SDL.h> +static FSoundDriver_SDL iFSoundDriver_SDL; + static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len) { MxMixSamples(stream, len / 4); } -static const char *SdlSoundStart(const char * const *parm) +const char *SoundDriver_SDL::Start(const char * const *parm) { SDL_AudioSpec spec; @@ -32,15 +34,10 @@ static const char *SdlSoundStart(const char * const *parm) return NULL; } -static void SdlSoundStop() +void SoundDriver_SDL::Stop() { SDL_CALL SDL_CloseAudio(); SdlClose(SDL_INIT_AUDIO); } -const HalSoundDriver _sdl_sound_driver = { - SdlSoundStart, - SdlSoundStop, -}; - #endif /* WITH_SDL */ |