GetSampleRate(int) -> GetSampleRate(); one sample rate
per driver
This commit is contained in:
@@ -241,7 +241,7 @@ int RageSoundManager::GetDriverSampleRate( int iRate ) const
|
||||
if( m_pDriver == NULL )
|
||||
return 44100;
|
||||
|
||||
return m_pDriver->GetSampleRate( iRate );
|
||||
return m_pDriver->GetSampleRate();
|
||||
}
|
||||
|
||||
/* The return value of PlaySound and PlayCopyOfSound is only valid in the main
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
* hearing it. (This isn't necessarily the same as the buffer latency.) */
|
||||
virtual float GetPlayLatency() const { return 0.0f; }
|
||||
|
||||
virtual int GetSampleRate( int rate ) const { return 44100; }
|
||||
virtual int GetSampleRate() const { return 44100; }
|
||||
|
||||
virtual ~RageSoundDriver() { }
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
/* virtuals: */
|
||||
int64_t GetPosition() const;
|
||||
float GetPlayLatency() const;
|
||||
int GetSampleRate( int iRate ) const { return m_iSampleRate; }
|
||||
int GetSampleRate() const { return m_iSampleRate; }
|
||||
|
||||
void SetupDecodingThread();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
RString Init();
|
||||
~RageSoundDriver_AU();
|
||||
float GetPlayLatency() const;
|
||||
int GetSampleRate( int rate ) const { return m_iSampleRate; }
|
||||
int GetSampleRate() const { return m_iSampleRate; }
|
||||
int64_t GetPosition() const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
RString Init();
|
||||
~RageSoundDriver_CA();
|
||||
float GetPlayLatency() const { return m_fLatency; }
|
||||
int GetSampleRate( int rate ) const { return m_iSampleRate; }
|
||||
int GetSampleRate() const { return m_iSampleRate; }
|
||||
int64_t GetPosition() const;
|
||||
void SetupDecodingThread();
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ float RageSoundDriver_DSound_Software::GetPlayLatency() const
|
||||
return (1.0f / m_iSampleRate) * g_iMaxWriteahead;
|
||||
}
|
||||
|
||||
int RageSoundDriver_DSound_Software::GetSampleRate( int rate ) const
|
||||
int RageSoundDriver_DSound_Software::GetSampleRate() const
|
||||
{
|
||||
return m_iSampleRate;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
|
||||
int64_t GetPosition() const;
|
||||
float GetPlayLatency() const;
|
||||
int GetSampleRate( int rate ) const;
|
||||
int GetSampleRate() const;
|
||||
|
||||
protected:
|
||||
void SetupDecodingThread();
|
||||
|
||||
@@ -93,7 +93,7 @@ RageSoundMixBuffer &RageSound_Generic_Software::MixIntoBuffer( int iFrames, int6
|
||||
/* If the sound is supposed to start at a time past this buffer, insert silence. */
|
||||
const int64_t iFramesUntilThisBuffer = iFrameNumber - iCurrentFrame;
|
||||
const float fSecondsBeforeStart = -s.m_StartTime.Ago();
|
||||
const int64_t iFramesBeforeStart = int64_t(fSecondsBeforeStart * GetSampleRate(0));
|
||||
const int64_t iFramesBeforeStart = int64_t(fSecondsBeforeStart * GetSampleRate());
|
||||
const int iSilentFramesInThisBuffer = clamp( int(iFramesBeforeStart-iFramesUntilThisBuffer), 0, iFramesLeft );
|
||||
|
||||
iGotFrames += iSilentFramesInThisBuffer;
|
||||
@@ -180,7 +180,7 @@ void RageSound_Generic_Software::DecodeThread()
|
||||
{
|
||||
/* Fill each playing sound, round-robin. */
|
||||
{
|
||||
int iSampleRate = GetSampleRate(0);
|
||||
int iSampleRate = GetSampleRate();
|
||||
ASSERT_M( iSampleRate > 0, ssprintf("%i", iSampleRate) );
|
||||
int iUsecs = 1000000*chunksize() / iSampleRate;
|
||||
usleep( iUsecs );
|
||||
|
||||
@@ -35,7 +35,7 @@ RageSoundDriver_Null::RageSoundDriver_Null()
|
||||
StartDecodeThread();
|
||||
}
|
||||
|
||||
int RageSoundDriver_Null::GetSampleRate( int iRate ) const
|
||||
int RageSoundDriver_Null::GetSampleRate() const
|
||||
{
|
||||
return m_iSampleRate;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class RageSoundDriver_Null: public RageSound_Generic_Software
|
||||
public:
|
||||
RageSoundDriver_Null();
|
||||
int64_t GetPosition() const;
|
||||
int GetSampleRate( int iRate ) const;
|
||||
int GetSampleRate() const;
|
||||
void Update();
|
||||
|
||||
private:
|
||||
|
||||
@@ -21,7 +21,7 @@ class RageSoundDriver_OSS: public RageSound_Generic_Software
|
||||
|
||||
public:
|
||||
bool GetData();
|
||||
int GetSampleRate( int rate ) const { return samplerate; }
|
||||
int GetSampleRate() const { return samplerate; }
|
||||
|
||||
/* virtuals: */
|
||||
int64_t GetPosition() const;
|
||||
|
||||
@@ -1356,7 +1356,7 @@ RageSoundDriver_WDMKS::~RageSoundDriver_WDMKS()
|
||||
CloseHandle( m_hSignal );
|
||||
}
|
||||
|
||||
int RageSoundDriver_WDMKS::GetSampleRate( int iRate ) const
|
||||
int RageSoundDriver_WDMKS::GetSampleRate() const
|
||||
{
|
||||
return m_pStream->m_iSampleRate;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
|
||||
int64_t GetPosition() const;
|
||||
float GetPlayLatency() const;
|
||||
int GetSampleRate( int iRate ) const;
|
||||
int GetSampleRate() const;
|
||||
|
||||
private:
|
||||
static int MixerThread_start( void *p );
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
int64_t GetPosition() const;
|
||||
float GetPlayLatency() const;
|
||||
int GetSampleRate( int rate ) const { return m_iSampleRate; }
|
||||
int GetSampleRate() const { return m_iSampleRate; }
|
||||
|
||||
private:
|
||||
static int MixerThread_start( void *p );
|
||||
|
||||
Reference in New Issue
Block a user