diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 0f27182368..308d740cf4 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -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); diff --git a/stepmania/src/RageSound.h b/stepmania/src/RageSound.h index 45f2d4cddc..178fa72f59 100644 --- a/stepmania/src/RageSound.h +++ b/stepmania/src/RageSound.h @@ -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.