From 79698ecfd9e025f28350566d2b89b223688a1b45 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 21 Sep 2009 22:20:33 +0000 Subject: Implement pausing of music. Subversion-branch: /branches/opl-branch Subversion-revision: 1688 --- src/i_oplmusic.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/i_oplmusic.c') diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index 4ac52754..7bfdc04d 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -1363,10 +1363,28 @@ static void I_OPL_PlaySong(void *handle, int looping) static void I_OPL_PauseSong(void) { + unsigned int i; + if (!music_initialised) { return; } + + // Pause OPL callbacks. + + OPL_SetPaused(1); + + // Turn off all main instrument voices (not percussion). + // This is what Vanilla does. + + for (i=0; i