summaryrefslogtreecommitdiff
path: root/src/sound/cocoa_s.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-05 12:23:54 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-05 12:23:54 +0000
commit5e85e8c5e03105e43cf9f2216e993c0596d7dfec (patch)
tree52e0cc5b1e4eb6cf9aed8556873ee6833662e11f /src/sound/cocoa_s.cpp
parent7884a07b43fd293a2ca5b39b64df98b700959874 (diff)
downloadopenttd-5e85e8c5e03105e43cf9f2216e993c0596d7dfec.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/cocoa_s.cpp')
-rw-r--r--src/sound/cocoa_s.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/sound/cocoa_s.cpp b/src/sound/cocoa_s.cpp
index 246cbcecf..0c1e793f9 100644
--- a/src/sound/cocoa_s.cpp
+++ b/src/sound/cocoa_s.cpp
@@ -36,6 +36,7 @@
#undef Point
#undef Rect
+static FSoundDriver_Cocoa iFSoundDriver_Cocoa;
static AudioUnit _outputAudioUnit;
@@ -48,7 +49,7 @@ static OSStatus audioCallback(void *inRefCon, AudioUnitRenderActionFlags inActio
}
-static const char *CocoaSoundStart(const char * const *parm)
+const char *SoundDriver_Cocoa::Start(const char * const *parm)
{
Component comp;
ComponentDescription desc;
@@ -116,7 +117,7 @@ static const char *CocoaSoundStart(const char * const *parm)
}
-static void CocoaSoundStop()
+void SoundDriver_Cocoa::Stop()
{
struct AudioUnitInputCallback callback;
@@ -140,10 +141,4 @@ static void CocoaSoundStop()
}
}
-
-const HalSoundDriver _cocoa_sound_driver = {
- CocoaSoundStart,
- CocoaSoundStop,
-};
-
#endif /* WITH_COCOA */