From cca289bcf935e3fbd46b9b48978c6075e7e07935 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 15 Nov 2004 18:24:50 +0000 Subject: [PATCH] remove unused stuff --- stepmania/src/RageSound.cpp | 10 ---------- stepmania/src/RageSound.h | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index d02cfad6f6..2710fe9b94 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -66,13 +66,11 @@ RageSound::RageSound(): { ASSERT(SOUNDMAN); - original = this; Sample = NULL; decode_position = 0; stopped_position = 0; max_driver_frame = 0; playing = false; - playing_thread = 0; databuf.reserve(internal_buffer_size); ID = SOUNDMAN->GetUniqueID(); @@ -110,13 +108,11 @@ RageSound &RageSound::operator=( const RageSound &cpy ) { LockMut(cpy.m_Mutex); - original = cpy.original; m_Param = cpy.m_Param; decode_position = cpy.decode_position; stopped_position = cpy.stopped_position; max_driver_frame = 0; playing = false; - playing_thread = 0; databuf.reserve(internal_buffer_size); delete Sample; @@ -198,9 +194,6 @@ bool RageSound::Load( CString sSoundFilePath, int precache ) void RageSound::LoadSoundReader( SoundReader *pSound ) { - /* Don't load over copies. */ - ASSERT( original == this || m_sFilePath == "" ); - Unload(); decode_position = stopped_position = 0; @@ -585,7 +578,6 @@ void RageSound::StartPlaying() // LOG->Trace("set playing true for %p (StartPlaying) (%s)", this, this->GetLoadedFilePath().c_str()); playing = true; - playing_thread = RageThread::GetCurrentThreadID(); SOUNDMAN->StartMixing(this); @@ -609,7 +601,6 @@ void RageSound::StopPlaying() // LOG->Trace("set playing false for %p (StopPlaying) (%s)", this, this->GetLoadedFilePath().c_str()); playing = false; - playing_thread = 0; max_driver_frame = 0; pos_map.Clear(); @@ -640,7 +631,6 @@ void RageSound::SoundIsFinishedPlaying() // LOG->Trace("set playing false for %p (SoundIsFinishedPlaying) (%s)", this, this->GetLoadedFilePath().c_str()); playing = false; - playing_thread = 0; pos_map.Clear(); // LOG->Trace("SoundIsFinishedPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str()); diff --git a/stepmania/src/RageSound.h b/stepmania/src/RageSound.h index ca9e515794..162233dceb 100644 --- a/stepmania/src/RageSound.h +++ b/stepmania/src/RageSound.h @@ -114,7 +114,6 @@ public: bool SetPositionSeconds( float fSeconds ); CString GetLoadedFilePath() const { return m_sFilePath; } bool IsPlaying() const { return playing; } - uint64_t GetPlayingThread() const { return playing_thread; } /* Lock and unlock this sound. */ void LockSound(); @@ -128,10 +127,6 @@ public: const RageSoundParams &GetParams() const { return m_Param; } private: - /* If we were copied from another RageSound, this will point to it; otherwise - * this is ourself. */ - RageSound *original; - mutable RageMutex m_Mutex; SoundReader *Sample; @@ -161,9 +156,6 @@ private: /* Keep track of the max SOUNDMAN->GetPosition result (see GetPositionSecondsInternal). */ mutable int64_t max_driver_frame; - /* If playing, record the thread that called Play(). */ - uint64_t playing_thread; - /* Unique ID number for this instance of RageSound. */ int ID; @@ -181,9 +173,6 @@ private: static void RateChange(char *buf, int &cnt, int speed_input_samples, int speed_output_samples, int channels); public: - /* Used by RageSoundManager: */ - RageSound *GetOriginal() { return original; } - /* Called only by the sound drivers: */ /* This function should return the number of bytes actually put into buffer. * If less than size is returned, it signals the stream to stop; once it's