From 656beb2dc2fbd2e5d3a342334241769deb3c83cb Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Mon, 17 Apr 2006 01:00:40 +0000 Subject: [PATCH] Rome^WreadPlayPos must die. Originally committed to SVN as r347. --- core/audio_player_portaudio.cpp | 3 --- core/audio_player_portaudio.h | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/audio_player_portaudio.cpp b/core/audio_player_portaudio.cpp index b44c03fdd..2eaee8f75 100644 --- a/core/audio_player_portaudio.cpp +++ b/core/audio_player_portaudio.cpp @@ -120,7 +120,6 @@ int PortAudioPlayer::paCallback(void *inputBuffer, void *outputBuffer, unsigned // Set play position (and real one) player->playPos += framesPerBuffer; - player->realPlayPos = player->playPos - (outTime - Pa_StreamTime(player->stream)); // Cap to start if lower return end; @@ -135,7 +134,6 @@ void PortAudioPlayer::Play(__int64 start,__int64 count) { // Set values endPos = start + count; - realPlayPos = start; playPos = start; startPos = start; @@ -162,7 +160,6 @@ void PortAudioPlayer::Stop(bool timerToo) { // Stop stream playing = false; Pa_StopStream (stream); - realPlayPos = 0; // Stop timer if (timerToo && displayTimer) { diff --git a/core/audio_player_portaudio.h b/core/audio_player_portaudio.h index f05c319af..538e9f3fa 100644 --- a/core/audio_player_portaudio.h +++ b/core/audio_player_portaudio.h @@ -59,7 +59,6 @@ private: volatile __int64 playPos; volatile __int64 startPos; volatile __int64 endPos; - volatile __int64 realPlayPos; void *stream; static int paCallback(void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, PaTimestamp outTime, void *userData); @@ -77,9 +76,9 @@ public: __int64 GetStartPosition() { return startPos; } __int64 GetEndPosition() { return endPos; } - __int64 GetCurrentPosition() { return realPlayPos; } + __int64 GetCurrentPosition() { return playPos; } void SetEndPosition(__int64 pos) { endPos = pos; } - void SetCurrentPosition(__int64 pos) { playPos = pos; realPlayPos = pos; } + void SetCurrentPosition(__int64 pos) { playPos = pos; } void SetVolume(double vol) { volume = vol; } double GetVolume() { return volume; }