Beispiel #1
0
/* Mixes together the channels into one sound.
   Returns # of channels currently playing *any* sound
   Therefore, return 0 means to channels have a sample, therefore no
   sound is playing
*/ 
int Chan_mixAll( Mix *mix, Channel *chan )
    {
    int result  = 0,i=0;
    
    result  = Chan_copyIn( chan,  mix);

    /* we want to loop for S_num_channels-2 */
    for(i=2;i<S_num_channels;i++)
    	result += Chan_mixIn( ++chan, mix);
    	
    result += Chan_finalMixIn( ++chan, mix);
    
    return result;
    }
// Mixes together the channels into one sound.
//   Returns # of channels currently playing *any* sound
//   Therefore, return 0 means to channels have a sample, therefore no
//   sound is playing 
int Chan_mixAll( Mix *mix, Channel *chan )
{
  int result  = 0,i=0;
    
  result  = Chan_copyIn( chan,  mix);


  for(i=2;i<S_num_channels;i++){

    result += Chan_mixIn( ++chan, mix);
  }


  result += Chan_finalMixIn( ++chan, mix);
    
  return result;

} // end of function