From 6cdc6f96c4ae1fc0bf9c2992413f75aa191ebfab Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 3 May 2005 06:02:53 +0000 Subject: [PATCH] Make sure track position goes past the end during last fast-forward op (bug #498) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1702 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/sound/trackplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc2/src/sc2code/libs/sound/trackplayer.c b/sc2/src/sc2code/libs/sound/trackplayer.c index 743a3e273..bbd808dcc 100644 --- a/sc2/src/sc2code/libs/sound/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/trackplayer.c @@ -82,7 +82,7 @@ JumpTrack (void) (sint32)cur_time - total_length; track_pos_changed = 1; scd->play_chain_ptr = last_chain; - recompute_track_pos(sound_sample, first_chain, total_length); + recompute_track_pos(sound_sample, first_chain, total_length + 1); UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex); PlayingTrack(); } @@ -780,7 +780,7 @@ FastForward_Smooth () soundSource[SPEECH_SOURCE].start_time -= ACCEL_SCROLL_SPEED; if ((sint32)cur_time - soundSource[SPEECH_SOURCE].start_time > total_length) soundSource[SPEECH_SOURCE].start_time = - (sint32)cur_time - total_length; + (sint32)cur_time - total_length - 1; offset = cur_time - soundSource[SPEECH_SOURCE].start_time; track_pos_changed = 1; recompute_track_pos(sound_sample, first_chain, offset);