]> Shamusworld >> Repos - apple2/blobdiff - src/sound.cpp
Fixed misc. bugs preventing certain games from working, added pause mode.
[apple2] / src / sound.cpp
index 0d794c997ede1d06bf42c9efd866375a2f86a9da..4cab23ec0aad0ec7a353e97869cf6ed53d1e5179 100755 (executable)
@@ -147,6 +147,20 @@ void SoundDone(void)
 }
 
 
+void SoundPause(void)
+{
+       if (soundInitialized)
+               SDL_PauseAudioDevice(device, 1);
+}
+
+
+void SoundResume(void)
+{
+       if (soundInitialized)
+               SDL_PauseAudioDevice(device, 0);
+}
+
+
 //
 // Sound card callback handler
 //
@@ -162,7 +176,7 @@ static void SDLSoundCallback(void * /*userdata*/, Uint8 * buffer8, int length8)
 
        // Let's try using a mutex for shared resource consumption...
 //Actually, I think Lock/UnlockAudio() does this already...
-WriteLog("SDLSoundCallback: soundBufferPos = %i\n", soundBufferPos);
+//WriteLog("SDLSoundCallback: soundBufferPos = %i\n", soundBufferPos);
        SDL_mutexP(mutex2);
 
        // Recast this as a 16-bit type...