aboutsummaryrefslogtreecommitdiffstats
path: root/src/media/UAudioPlayback_SoftMixer.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-21 22:47:23 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-21 22:47:23 +0000
commit4d414b0a788982775b0c8081b888156ad6a10497 (patch)
tree4f1b9cd56cd3cecc3319b950442983688dc1c126 /src/media/UAudioPlayback_SoftMixer.pas
parent898eb68e995d88f3e64040b7db08ab158159abe1 (diff)
downloadusdx-4d414b0a788982775b0c8081b888156ad6a10497.tar.gz
usdx-4d414b0a788982775b0c8081b888156ad6a10497.tar.xz
usdx-4d414b0a788982775b0c8081b888156ad6a10497.zip
fixed bug in SDL/Portaudio playback stream:
- positioning was broken in revision 1661 (9.4.2009, a long time) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2269 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/media/UAudioPlayback_SoftMixer.pas')
-rw-r--r--src/media/UAudioPlayback_SoftMixer.pas6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/media/UAudioPlayback_SoftMixer.pas b/src/media/UAudioPlayback_SoftMixer.pas
index 306b83a9..11df4df5 100644
--- a/src/media/UAudioPlayback_SoftMixer.pas
+++ b/src/media/UAudioPlayback_SoftMixer.pas
@@ -449,7 +449,8 @@ var
Mixer: TAudioMixerStream;
begin
// only paused streams are not flushed
- NeedsRewind := not (Status = ssPaused);
+ if (Status = ssPaused) then
+ NeedsRewind := false;
// rewind if necessary. Cases that require no rewind are:
// - stream was created and never played
@@ -921,7 +922,8 @@ begin
LockSampleBuffer();
SourceStream.Position := Time;
- NeedsRewind := not (Status = ssStopped);
+ if (Status = ssStopped) then
+ NeedsRewind := false;
// do not use outdated data
FlushBuffers();