remove GetOffsetFix
This commit is contained in:
@@ -655,7 +655,7 @@ void RageSound::CleanPosMap( deque<pos_map_t> &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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() { }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user