stream frames are 64-bit (sound driver api change)
This commit is contained in:
@@ -346,7 +346,7 @@ int RageSound::GetData( char *pBuffer, int iFrames )
|
||||
*
|
||||
* If no data is returned (we're at the end of the stream), return false.
|
||||
*/
|
||||
bool RageSound::GetDataToPlay( int16_t *pBuffer, int iFrames, int &iStreamFrame, int &iFramesStored )
|
||||
bool RageSound::GetDataToPlay( int16_t *pBuffer, int iFrames, int64_t &iStreamFrame, int &iFramesStored )
|
||||
{
|
||||
int iNumRewindsThisCall = 0;
|
||||
|
||||
@@ -427,7 +427,8 @@ int RageSound::GetPCM( char *pBuffer, int iSize, int64_t iFrameno )
|
||||
int iBytesStored = 0;
|
||||
while( iBytesStored < iSize )
|
||||
{
|
||||
int iPosition, iGotFrames;
|
||||
int64_t iPosition;
|
||||
int iGotFrames;
|
||||
bool bEof = !GetDataToPlay( (int16_t *)(pBuffer+iBytesStored), (iSize-iBytesStored)/framesize, iPosition, iGotFrames );
|
||||
|
||||
/* Save this frameno/position map. */
|
||||
|
||||
@@ -15,7 +15,7 @@ class RageSoundBase
|
||||
public:
|
||||
virtual ~RageSoundBase() { }
|
||||
virtual void SoundIsFinishedPlaying() = 0;
|
||||
virtual bool GetDataToPlay( int16_t *buffer, int size, int &pos, int &got_bytes ) = 0;
|
||||
virtual bool GetDataToPlay( int16_t *buffer, int size, int64_t &iStreamFrame, int &got_bytes ) = 0;
|
||||
virtual int GetPCM( char *buffer, int size, int64_t frameno ) = 0;
|
||||
virtual int GetSampleRate() const = 0;
|
||||
virtual RageTimer GetStartTime() const { return RageZeroTimer; }
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
* be called. Until then, SOUNDMAN->GetPosition can still be called; the sound
|
||||
* is still playing. */
|
||||
int GetPCM( char *pBuffer, int iSize, int64_t iFrameno );
|
||||
bool GetDataToPlay( int16_t *pBuffer, int iSize, int &iPosition, int &iBytesRead );
|
||||
bool GetDataToPlay( int16_t *pBuffer, int iSize, int64_t &iStreamFrame, int &iBytesRead );
|
||||
void CommitPlayingPosition( int64_t iFrameno, int64_t iPosition, int iBytesRead );
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user