diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index cdd0f18ba2..ec66a71a70 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -655,7 +655,7 @@ void RageSound::CleanPosMap( deque &pos_map ) } } -/* Get the position in frames (ignoring GetOffsetFix). */ +/* Get the position in frames. */ int64_t RageSound::GetPositionSecondsInternal( bool *approximate ) const { LockMut(SOUNDMAN->lock); @@ -711,8 +711,7 @@ float RageSound::GetPositionSeconds( bool *approximate, RageTimer *Timestamp ) c if( Timestamp ) HOOKS->ExitTimeCriticalSection(); - const float fixed_pos = pos + Sample->GetOffsetFix(); - return GetPlaybackRate() * fixed_pos; + return GetPlaybackRate() * pos; } diff --git a/stepmania/src/RageSoundReader.h b/stepmania/src/RageSoundReader.h index 34fab2adee..32716c919e 100644 --- a/stepmania/src/RageSoundReader.h +++ b/stepmania/src/RageSoundReader.h @@ -3,15 +3,14 @@ /* A sound reader is a source for a RageSound. It's usually just a convenience * wrapper around SDL_Sound. */ -class SoundReader { +class SoundReader +{ mutable string error; protected: void SetError(string e) const { error = e; } public: - virtual float GetOffsetFix() const { return 0; } - virtual int GetLength() const = 0; /* ms */ virtual int GetLength_Fast() const { return GetLength(); } /* ms */ virtual int SetPosition_Accurate(int ms) = 0; diff --git a/stepmania/src/RageSoundReader_Preload.cpp b/stepmania/src/RageSoundReader_Preload.cpp index ede60ddb32..4fb2885521 100644 --- a/stepmania/src/RageSoundReader_Preload.cpp +++ b/stepmania/src/RageSoundReader_Preload.cpp @@ -17,7 +17,6 @@ bool SoundReader_Preload::Open(SoundReader *source) { ASSERT(source); samplerate = source->GetSampleRate(); - OffsetFix = source->GetOffsetFix(); // propagate upwards /* Check the length, and see if we think it'll fit in the buffer. */ int len = source->GetLength_Fast(); diff --git a/stepmania/src/RageSoundReader_Preload.h b/stepmania/src/RageSoundReader_Preload.h index 7469f8ae07..dec69bbdd8 100644 --- a/stepmania/src/RageSoundReader_Preload.h +++ b/stepmania/src/RageSoundReader_Preload.h @@ -42,7 +42,6 @@ public: int SetPosition_Fast(int ms); int Read(char *buf, unsigned len); int GetSampleRate() const { return samplerate; } - float GetOffsetFix() const { return OffsetFix; } SoundReader *Copy() const; ~SoundReader_Preload() { } diff --git a/stepmania/src/RageSoundReader_Resample_Fast.h b/stepmania/src/RageSoundReader_Resample_Fast.h index 737d3203ef..29a201cb22 100644 --- a/stepmania/src/RageSoundReader_Resample_Fast.h +++ b/stepmania/src/RageSoundReader_Resample_Fast.h @@ -27,7 +27,6 @@ public: RageSoundReader_Resample_Fast(); virtual ~RageSoundReader_Resample_Fast(); SoundReader *Copy() const; - float GetOffsetFix() const { return source->GetOffsetFix(); } /* Change the actual sample rate of a sound. */ void SetSampleRate(int hz); diff --git a/stepmania/src/RageSoundReader_Resample_Good.h b/stepmania/src/RageSoundReader_Resample_Good.h index 8b9d4692fc..5915f2437a 100644 --- a/stepmania/src/RageSoundReader_Resample_Good.h +++ b/stepmania/src/RageSoundReader_Resample_Good.h @@ -35,7 +35,6 @@ public: RageSoundReader_Resample_Good(); virtual ~RageSoundReader_Resample_Good(); SoundReader *Copy() const; - float GetOffsetFix() const { return source->GetOffsetFix(); } /* Change the actual sample rate of a sound. */ void SetSampleRate( int hz );