From fda40a0efdcf82ac8d69afee31cafa76f7efea49 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 15 Jan 2004 03:03:57 +0000 Subject: [PATCH] update (Mac drivers untested) --- stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp | 8 ++++---- stepmania/src/arch/Sound/RageSoundDriver_ALSA9.h | 8 ++++---- .../src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp | 6 +++--- stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.h | 8 ++++---- stepmania/src/arch/Sound/RageSoundDriver_CA.cpp | 6 +++--- stepmania/src/arch/Sound/RageSoundDriver_CA.h | 8 ++++---- stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp | 6 +++--- stepmania/src/arch/Sound/RageSoundDriver_OSS.h | 8 ++++---- stepmania/src/arch/Sound/RageSoundDriver_QT.cpp | 8 ++++---- stepmania/src/arch/Sound/RageSoundDriver_QT.h | 6 +++--- stepmania/src/arch/Sound/RageSoundDriver_QT1.cpp | 6 +++--- stepmania/src/arch/Sound/RageSoundDriver_QT1.h | 8 ++++---- 12 files changed, 43 insertions(+), 43 deletions(-) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp index a6c57e99be..561108c768 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.cpp @@ -126,7 +126,7 @@ bool RageSound_ALSA9::stream::GetData(bool init) } -void RageSound_ALSA9::StartMixing(RageSound *snd) +void RageSound_ALSA9::StartMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); @@ -192,7 +192,7 @@ void RageSound_ALSA9::Update(float delta) } -void RageSound_ALSA9::StopMixing(RageSound *snd) +void RageSound_ALSA9::StopMixing(RageSoundBase *snd) { ASSERT(snd != NULL); LockMutex L(SOUNDMAN->lock); @@ -215,14 +215,14 @@ void RageSound_ALSA9::StopMixing(RageSound *snd) /* Flush two buffers worth of data. */ stream_pool[i]->flush_pos = stream_pool[i]->pcm->GetPlayPos(); - /* This function is called externally (by RageSound) to stop immediately. + /* This function is called externally (by RageSoundBase) to stop immediately. * We need to prevent SoundStopped from being called; it should only be * called when we stop implicitely at the end of a sound. Set snd to NULL. */ stream_pool[i]->snd = NULL; } -int RageSound_ALSA9::GetPosition(const RageSound *snd) const +int RageSound_ALSA9::GetPosition(const RageSoundBase *snd) const { LockMutex L(SOUNDMAN->lock); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.h b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.h index a557d86084..22173816a1 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9.h @@ -17,7 +17,7 @@ private: /* Sound object that's playing on this stream, or NULL if this * channel is available: */ - RageSound *snd; + RageSoundBase *snd; RageTimer start_time; enum { @@ -49,9 +49,9 @@ private: public: /* virtuals: */ - void StartMixing(RageSound *snd); - void StopMixing(RageSound *snd); - int GetPosition(const RageSound *snd) const; + void StartMixing(RageSoundBase *snd); + void StopMixing(RageSoundBase *snd); + int GetPosition(const RageSoundBase *snd) const; int GetSampleRate( int rate ) const; void Update(float delta); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp index 6583dd3017..6f0844ce6a 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.cpp @@ -132,7 +132,7 @@ bool RageSound_ALSA9_Software::GetData() } -void RageSound_ALSA9_Software::StartMixing(RageSound *snd) +void RageSound_ALSA9_Software::StartMixing(RageSoundBase *snd) { sound *s = new sound; s->snd = snd; @@ -161,7 +161,7 @@ void RageSound_ALSA9_Software::Update(float delta) } } -void RageSound_ALSA9_Software::StopMixing(RageSound *snd) +void RageSound_ALSA9_Software::StopMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); @@ -185,7 +185,7 @@ void RageSound_ALSA9_Software::StopMixing(RageSound *snd) } -int RageSound_ALSA9_Software::GetPosition(const RageSound *snd) const +int RageSound_ALSA9_Software::GetPosition(const RageSoundBase *snd) const { return pcm->GetPosition(); } diff --git a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.h b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.h index ec9d93a69d..06d6ec4757 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_ALSA9_Software.h @@ -12,7 +12,7 @@ class RageSound_ALSA9_Software: public RageSoundDriver private: struct sound { - RageSound *snd; + RageSoundBase *snd; RageTimer start_time; bool stopping; int flush_pos; /* state == STOPPING only */ @@ -34,9 +34,9 @@ private: public: /* virtuals: */ - void StartMixing(RageSound *snd); - void StopMixing(RageSound *snd); - int GetPosition(const RageSound *snd) const; + void StartMixing(RageSoundBase *snd); + void StopMixing(RageSoundBase *snd); + int GetPosition(const RageSoundBase *snd) const; float GetPlayLatency() const; int GetSampleRate( int rate ) const; diff --git a/stepmania/src/arch/Sound/RageSoundDriver_CA.cpp b/stepmania/src/arch/Sound/RageSoundDriver_CA.cpp index 4e377c57b6..ef66b42cfb 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_CA.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_CA.cpp @@ -223,7 +223,7 @@ RageSound_CA::~RageSound_CA() #endif } -void RageSound_CA::StartMixing(RageSound *snd) +void RageSound_CA::StartMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); soundPtr s = new sound; @@ -231,7 +231,7 @@ void RageSound_CA::StartMixing(RageSound *snd) sounds.push_back(s); } -void RageSound_CA::StopMixing(RageSound *snd) +void RageSound_CA::StopMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); @@ -249,7 +249,7 @@ void RageSound_CA::StopMixing(RageSound *snd) sounds.erase(sounds.begin()+i); } -int RageSound_CA::GetPosition(const RageSound *snd) const +int RageSound_CA::GetPosition(const RageSoundBase *snd) const { AudioTimeStamp time; OSStatus err = AudioDeviceGetCurrentTime(outputDevice, &time); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_CA.h b/stepmania/src/arch/Sound/RageSoundDriver_CA.h index 15e3afadd9..3208b51f7a 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_CA.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_CA.h @@ -34,7 +34,7 @@ class RageSound_CA : public RageSoundDriver { private: typedef struct sound { - RageSound *snd; + RageSoundBase *snd; bool stopping; int flush_pos; sound() { snd=NULL; stopping=false; flush_pos=0; } @@ -52,9 +52,9 @@ private: static int ConvertAudioTimeStampToPosition(const AudioTimeStamp *time); protected: - virtual void StartMixing(RageSound *snd); - virtual void StopMixing(RageSound *snd); - virtual int GetPosition(const RageSound *snd) const; + virtual void StartMixing(RageSoundBase *snd); + virtual void StopMixing(RageSoundBase *snd); + virtual int GetPosition(const RageSoundBase *snd) const; virtual void Update (float delta); virtual float GetPlayLatency() const { return latency; } diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp index 54ed55e7d9..be2632ece7 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.cpp @@ -133,7 +133,7 @@ bool RageSound_OSS::GetData() return true; } -void RageSound_OSS::StartMixing(RageSound *snd) +void RageSound_OSS::StartMixing(RageSoundBase *snd) { sound *s = new sound; s->snd = snd; @@ -162,7 +162,7 @@ void RageSound_OSS::Update(float delta) } } -void RageSound_OSS::StopMixing(RageSound *snd) +void RageSound_OSS::StopMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); @@ -180,7 +180,7 @@ void RageSound_OSS::StopMixing(RageSound *snd) sounds.erase(sounds.begin()+i, sounds.begin()+i+1); } -int RageSound_OSS::GetPosition(const RageSound *snd) const +int RageSound_OSS::GetPosition(const RageSoundBase *snd) const { LockMutex L(SOUNDMAN->lock); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_OSS.h b/stepmania/src/arch/Sound/RageSoundDriver_OSS.h index ec1002b877..0a50a5086e 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_OSS.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_OSS.h @@ -10,7 +10,7 @@ class RageSound_OSS: public RageSoundDriver int fd; struct sound { - RageSound *snd; + RageSoundBase *snd; RageTimer start_time; bool stopping; @@ -37,9 +37,9 @@ public: int GetSampleRate( int rate ) const { return samplerate; } /* virtuals: */ - void StartMixing(RageSound *snd); /* used by RageSound */ - void StopMixing(RageSound *snd); /* used by RageSound */ - int GetPosition(const RageSound *snd) const; + void StartMixing(RageSoundBase *snd); /* used by RageSoundBase */ + void StopMixing(RageSoundBase *snd); /* used by RageSoundBase */ + int GetPosition(const RageSoundBase *snd) const; float GetPlayLatency() const; RageSound_OSS(); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_QT.cpp b/stepmania/src/arch/Sound/RageSoundDriver_QT.cpp index a5b1da6091..01af10d8d7 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_QT.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_QT.cpp @@ -35,7 +35,7 @@ RageException::Throw(#func " failed with error: %d at %s:%d", err, __FILE__, __L typedef struct soundInfo { - RageSound *snd; + RageSoundBase *snd; long stopPos; bool stopping; @@ -218,7 +218,7 @@ RageSound_QT::~RageSound_QT() DisposeHandle(Handle(sndDescHdl)); } -void RageSound_QT::StartMixing(RageSound *snd) +void RageSound_QT::StartMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); CHECKPOINT; @@ -228,7 +228,7 @@ void RageSound_QT::StartMixing(RageSound *snd) sounds.push_back(s); } -void RageSound_QT::StopMixing(RageSound *snd) +void RageSound_QT::StopMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); CHECKPOINT; @@ -260,7 +260,7 @@ void RageSound_QT::Update(float delta) } } -int RageSound_QT::GetPosition(const RageSound *snd) const +int RageSound_QT::GetPosition(const RageSoundBase *snd) const { LockMutex L(SOUNDMAN->lock); return GetMovieTime(movie, NULL); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_QT.h b/stepmania/src/arch/Sound/RageSoundDriver_QT.h index 9dda801468..166a6e061e 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_QT.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_QT.h @@ -15,9 +15,9 @@ class RageSound_QT: public RageSoundDriver { protected: - virtual void StartMixing(RageSound *snd); - virtual void StopMixing(RageSound *snd); - virtual int GetPosition(const RageSound *snd) const; + virtual void StartMixing(RageSoundBase *snd); + virtual void StopMixing(RageSoundBase *snd); + virtual int GetPosition(const RageSoundBase *snd) const; virtual void Update (float delta); virtual float GetPlayLatency() const; diff --git a/stepmania/src/arch/Sound/RageSoundDriver_QT1.cpp b/stepmania/src/arch/Sound/RageSoundDriver_QT1.cpp index ad1538db85..534109bf7c 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_QT1.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_QT1.cpp @@ -152,7 +152,7 @@ bail: } -void RageSound_QT1::StartMixing(RageSound *snd) { +void RageSound_QT1::StartMixing(RageSoundBase *snd) { sound *s = new sound; s->snd = snd; @@ -161,7 +161,7 @@ void RageSound_QT1::StartMixing(RageSound *snd) { LOG->Trace("There are %ld sounds playing", sounds.size()); } -void RageSound_QT1::StopMixing(RageSound *snd) { +void RageSound_QT1::StopMixing(RageSoundBase *snd) { LockMutex L(SOUNDMAN->lock); /* Find the sound. */ @@ -193,7 +193,7 @@ void RageSound_QT1::Update(float delta) { } } -int RageSound_QT1::GetPosition(const RageSound *snd) const { +int RageSound_QT1::GetPosition(const RageSoundBase *snd) const { #pragma unused (snd) TimeRecord tr; ClockGetTime(clock, &tr); diff --git a/stepmania/src/arch/Sound/RageSoundDriver_QT1.h b/stepmania/src/arch/Sound/RageSoundDriver_QT1.h index 87f119d71a..308cd7ffc2 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_QT1.h +++ b/stepmania/src/arch/Sound/RageSoundDriver_QT1.h @@ -26,7 +26,7 @@ namespace QT { class RageSound_QT1: public RageSoundDriver { private: struct sound { - RageSound *snd; + RageSoundBase *snd; bool stopping; int flush_pos; sound() { snd=NULL; stopping=false; flush_pos=0; } @@ -39,9 +39,9 @@ private: float latency; protected: - virtual void StartMixing(RageSound *snd); - virtual void StopMixing(RageSound *snd); - virtual int GetPosition(const RageSound *snd) const; + virtual void StartMixing(RageSoundBase *snd); + virtual void StopMixing(RageSoundBase *snd); + virtual int GetPosition(const RageSoundBase *snd) const; virtual void Update (float delta); virtual float GetPlayLatency() const;