From 152e6c7f53bde3e5e81f0f8114bd66f2b9189f7d Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Mon, 1 Nov 1999 00:54:20 +0000 Subject: [PATCH] Updated Mix_Paused() to return the number of paused channels if called with which == -1 --- mixer.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/mixer.c b/mixer.c index b5bd082a..30ba92b6 100644 --- a/mixer.c +++ b/mixer.c @@ -733,10 +733,20 @@ void Mix_Resume(int which) int Mix_Paused(int which) { - if ( which < 0 || which > num_channels ) + if ( which > num_channels ) return(0); - - return channel[which].paused != 0; + if ( which < 0 ) { + int status = 0; + int i; + for( i=0; i < num_channels; ++i ) { + if ( channel[i].paused ) { + ++ status; + } + } + return(status); + } else { + return(channel[which].paused != 0); + } } /* Change the group of a channel */