expose a simpler interface for drivers

This commit is contained in:
Glenn Maynard
2004-01-15 02:28:58 +00:00
parent 8b6030e299
commit bdafe9ebe1
2 changed files with 15 additions and 2 deletions
+2 -1
View File
@@ -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);
+13 -1
View File
@@ -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.