aboutsummaryrefslogtreecommitdiff
path: root/src/audio.c
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-03 21:37:27 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-03 21:37:27 +0000
commit054957c9b7d6e45f1dc8282da94c09e9d51dae1e (patch)
tree2893547dc781244a0be4085de1b45036c6757145 /src/audio.c
parente70c21ed62fe20c7e7bcfa323ead4ebc0a513340 (diff)
Properly seamless mixing
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@127 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index d252086..9cfc384 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -60,7 +60,7 @@ static void audio_mix(void *data, Uint8 *stream8, int len) {
stream[j] += samp * a->sounds[i].volume;
}
- if ( a->sounds[i].dpos == a->sounds[i].dlen ) {
+ if ( a->sounds[i].dpos == a->sounds[i].dlen-2 ) {
if ( a->sounds[i].repeat ) {
a->sounds[i].dpos = 0;
if ( a->debug ) printf("AU: Channel %i: Looping at offset %i/%i\n", i, j, len);