Search
lxdream.org :: lxdream/src/aica/audio.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/audio.c
changeset 463:0655796f9bb5
prev434:8af49a412d92
next465:3bd7be575792
author nkeynes
date Wed Oct 24 21:24:09 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Implement channel position readback
file annotate diff log raw
1.1 --- a/src/aica/audio.c Tue Oct 09 11:37:36 2007 +0000
1.2 +++ b/src/aica/audio.c Wed Oct 24 21:24:09 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: audio.c,v 1.9 2007-10-09 11:37:36 nkeynes Exp $
1.6 + * $Id: audio.c,v 1.10 2007-10-24 21:24:09 nkeynes Exp $
1.7 *
1.8 * Audio mixer core. Combines all the active streams into a single sound
1.9 * buffer for output.
1.10 @@ -208,9 +208,10 @@
1.11 channel->posn++;
1.12
1.13 if( channel->posn == channel->end ) {
1.14 - if( channel->loop )
1.15 + if( channel->loop ) {
1.16 channel->posn = channel->loop_start;
1.17 - else {
1.18 + channel->loop = LOOP_LOOPED;
1.19 + } else {
1.20 audio_stop_channel(i);
1.21 j = num_samples;
1.22 break;
1.23 @@ -231,9 +232,10 @@
1.24 channel->posn++;
1.25
1.26 if( channel->posn == channel->end ) {
1.27 - if( channel->loop )
1.28 + if( channel->loop ) {
1.29 channel->posn = channel->loop_start;
1.30 - else {
1.31 + channel->loop = LOOP_LOOPED;
1.32 + } else {
1.33 audio_stop_channel(i);
1.34 j = num_samples;
1.35 break;
1.36 @@ -254,6 +256,7 @@
1.37 if( channel->posn == channel->end ) {
1.38 if( channel->loop ) {
1.39 channel->posn = channel->loop_start;
1.40 + channel->loop = LOOP_LOOPED;
1.41 channel->adpcm_predict = 0;
1.42 channel->adpcm_step = 0;
1.43 } else {
.