SetPosition

This commit is contained in:
Glenn Maynard
2006-12-10 09:01:05 +00:00
parent 7385c1f4c1
commit ef5c5e20c1
2 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -182,7 +182,7 @@ void RageSoundReader_Chain::Finish()
sort( m_aSounds.begin(), m_aSounds.end() ); sort( m_aSounds.begin(), m_aSounds.end() );
} }
int RageSoundReader_Chain::SetPosition_Accurate( int iFrame ) int RageSoundReader_Chain::SetPosition( int iFrame )
{ {
/* Clear m_apActiveSounds. */ /* Clear m_apActiveSounds. */
while( !m_apActiveSounds.empty() ) while( !m_apActiveSounds.empty() )
@@ -206,7 +206,7 @@ int RageSoundReader_Chain::SetPosition_Accurate( int iFrame )
RageSoundReader *pReader = pSound->pSound; RageSoundReader *pReader = pSound->pSound;
int iOffsetFrames = iFrame - iOffsetFrame; int iOffsetFrames = iFrame - iOffsetFrame;
if( iOffsetFrames > 0 && pReader->SetPosition_Accurate(iOffsetFrames) == 0 ) if( iOffsetFrames > 0 && pReader->SetPosition(iOffsetFrames) == 0 )
{ {
/* We're past the end of this sound. */ /* We're past the end of this sound. */
ReleaseSound( pSound ); ReleaseSound( pSound );
+1 -4
View File
@@ -30,10 +30,7 @@ public:
int GetLength() const; int GetLength() const;
int GetLength_Fast() const; int GetLength_Fast() const;
int SetPosition_Accurate( int iFrame ); int SetPosition( int iFrame );
/* It rarely makes sense to set an approximate time for a chained sound, since any
* error in overlap will become obvious. */
int SetPosition_Fast( int iFrame ) { return SetPosition_Accurate( iFrame ); }
int Read( char *pBuf, int iFrames ); int Read( char *pBuf, int iFrames );
int GetSampleRate() const { return m_iActualSampleRate; } int GetSampleRate() const { return m_iActualSampleRate; }
unsigned GetNumChannels() const { return m_iChannels; } unsigned GetNumChannels() const { return m_iChannels; }