Updated Mix_Paused() to return the number of paused channels if called
authorStephane Peter
Mon, 01 Nov 1999 00:54:20 +0000
changeset 142500ac56c440
parent 13 1e489d8b97d8
child 15 7463b2125f11
Updated Mix_Paused() to return the number of paused channels if called
with which == -1
mixer.c
     1.1 --- a/mixer.c	Mon Nov 01 00:40:43 1999 +0000
     1.2 +++ b/mixer.c	Mon Nov 01 00:54:20 1999 +0000
     1.3 @@ -733,10 +733,20 @@
     1.4  
     1.5  int Mix_Paused(int which)
     1.6  {
     1.7 -	if ( which < 0 || which > num_channels )
     1.8 +	if ( which > num_channels )
     1.9  		return(0);
    1.10 -
    1.11 -	return channel[which].paused != 0;
    1.12 +	if ( which < 0 ) {
    1.13 +		int status = 0;
    1.14 +		int i;
    1.15 +		for( i=0; i < num_channels; ++i ) {
    1.16 +			if ( channel[i].paused ) {
    1.17 +				++ status;
    1.18 +			}
    1.19 +		}
    1.20 +		return(status);
    1.21 +	} else {
    1.22 +		return(channel[which].paused != 0);
    1.23 +	}
    1.24  }
    1.25  
    1.26  /* Change the group of a channel */