From 2ee6acbcbed6107206a95d4e2a4b6c20c49857f5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 30 Nov 2006 06:00:51 +0000 Subject: [PATCH] stream frames are 64-bit (sound driver api change) --- stepmania/src/RageSound.cpp | 5 +++-- stepmania/src/RageSound.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 6b0eee5a9e..b17920cc2f 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -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. */ diff --git a/stepmania/src/RageSound.h b/stepmania/src/RageSound.h index 51e51ad75c..ae962a5284 100644 --- a/stepmania/src/RageSound.h +++ b/stepmania/src/RageSound.h @@ -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 ); };