expose a simpler interface for drivers
This commit is contained in:
@@ -97,7 +97,8 @@ RageSound::~RageSound()
|
||||
SOUNDMAN->lock.Unlock();
|
||||
}
|
||||
|
||||
RageSound::RageSound(const RageSound &cpy)
|
||||
RageSound::RageSound(const RageSound &cpy):
|
||||
RageDriverSound( cpy )
|
||||
{
|
||||
ASSERT(SOUNDMAN);
|
||||
LockMut(SOUNDMAN->lock);
|
||||
|
||||
@@ -7,7 +7,19 @@
|
||||
|
||||
class SoundReader;
|
||||
|
||||
class RageSound
|
||||
/* Driver interface for sounds: this is what drivers see. */
|
||||
class RageDriverSound
|
||||
{
|
||||
public:
|
||||
virtual ~RageDriverSound() { }
|
||||
virtual void StopPlaying() = 0;
|
||||
virtual int GetPCM( char *buffer, int size, int sampleno ) = 0;
|
||||
virtual int GetSampleRate() const = 0;
|
||||
virtual RageTimer GetStartTime() const { return RageZeroTimer; }
|
||||
virtual CString GetLoadedFilePath() const = 0;
|
||||
};
|
||||
|
||||
class RageSound: public RageDriverSound
|
||||
{
|
||||
public:
|
||||
/* M_STOP (default) stops the sound after m_LengthSamples have been played.
|
||||
|
||||
Reference in New Issue
Block a user