mixer.c
changeset 158 954c719d0359
parent 157 3d87d169927f
child 163 1e195b569764
equal deleted inserted replaced
157:3d87d169927f 158:954c719d0359
   618 			}
   618 			}
   619 		}
   619 		}
   620 
   620 
   621 		/* Queue up the audio data for this channel */
   621 		/* Queue up the audio data for this channel */
   622 		if ( which >= 0 ) {
   622 		if ( which >= 0 ) {
       
   623 			Uint32 sdl_ticks = SDL_GetTicks();
   623 			if (Mix_Playing(which))
   624 			if (Mix_Playing(which))
   624 				Mix_ChannelDonePlaying(which);
   625 				Mix_ChannelDonePlaying(which);
   625 			Uint32 sdl_ticks = SDL_GetTicks();
       
   626 			mix_channel[which].samples = chunk->abuf;
   626 			mix_channel[which].samples = chunk->abuf;
   627 			mix_channel[which].playing = chunk->alen;
   627 			mix_channel[which].playing = chunk->alen;
   628 			mix_channel[which].looping = loops;
   628 			mix_channel[which].looping = loops;
   629 			mix_channel[which].chunk = chunk;
   629 			mix_channel[which].chunk = chunk;
   630 			mix_channel[which].paused = 0;
   630 			mix_channel[which].paused = 0;
   684 			}
   684 			}
   685 		}
   685 		}
   686 
   686 
   687 		/* Queue up the audio data for this channel */
   687 		/* Queue up the audio data for this channel */
   688 		if ( which >= 0 ) {
   688 		if ( which >= 0 ) {
       
   689 			Uint32 sdl_ticks = SDL_GetTicks();
   689 			if (Mix_Playing(which))
   690 			if (Mix_Playing(which))
   690 				Mix_ChannelDonePlaying(which);
   691 				Mix_ChannelDonePlaying(which);
   691 			Uint32 sdl_ticks = SDL_GetTicks();
       
   692 			mix_channel[which].samples = chunk->abuf;
   692 			mix_channel[which].samples = chunk->abuf;
   693 			mix_channel[which].playing = chunk->alen;
   693 			mix_channel[which].playing = chunk->alen;
   694 			mix_channel[which].looping = loops;
   694 			mix_channel[which].looping = loops;
   695 			mix_channel[which].chunk = chunk;
   695 			mix_channel[which].chunk = chunk;
   696 			mix_channel[which].paused = 0;
   696 			mix_channel[which].paused = 0;