remove unused stuff
This commit is contained in:
@@ -66,13 +66,11 @@ RageSound::RageSound():
|
|||||||
{
|
{
|
||||||
ASSERT(SOUNDMAN);
|
ASSERT(SOUNDMAN);
|
||||||
|
|
||||||
original = this;
|
|
||||||
Sample = NULL;
|
Sample = NULL;
|
||||||
decode_position = 0;
|
decode_position = 0;
|
||||||
stopped_position = 0;
|
stopped_position = 0;
|
||||||
max_driver_frame = 0;
|
max_driver_frame = 0;
|
||||||
playing = false;
|
playing = false;
|
||||||
playing_thread = 0;
|
|
||||||
databuf.reserve(internal_buffer_size);
|
databuf.reserve(internal_buffer_size);
|
||||||
|
|
||||||
ID = SOUNDMAN->GetUniqueID();
|
ID = SOUNDMAN->GetUniqueID();
|
||||||
@@ -110,13 +108,11 @@ RageSound &RageSound::operator=( const RageSound &cpy )
|
|||||||
{
|
{
|
||||||
LockMut(cpy.m_Mutex);
|
LockMut(cpy.m_Mutex);
|
||||||
|
|
||||||
original = cpy.original;
|
|
||||||
m_Param = cpy.m_Param;
|
m_Param = cpy.m_Param;
|
||||||
decode_position = cpy.decode_position;
|
decode_position = cpy.decode_position;
|
||||||
stopped_position = cpy.stopped_position;
|
stopped_position = cpy.stopped_position;
|
||||||
max_driver_frame = 0;
|
max_driver_frame = 0;
|
||||||
playing = false;
|
playing = false;
|
||||||
playing_thread = 0;
|
|
||||||
|
|
||||||
databuf.reserve(internal_buffer_size);
|
databuf.reserve(internal_buffer_size);
|
||||||
delete Sample;
|
delete Sample;
|
||||||
@@ -198,9 +194,6 @@ bool RageSound::Load( CString sSoundFilePath, int precache )
|
|||||||
|
|
||||||
void RageSound::LoadSoundReader( SoundReader *pSound )
|
void RageSound::LoadSoundReader( SoundReader *pSound )
|
||||||
{
|
{
|
||||||
/* Don't load over copies. */
|
|
||||||
ASSERT( original == this || m_sFilePath == "" );
|
|
||||||
|
|
||||||
Unload();
|
Unload();
|
||||||
|
|
||||||
decode_position = stopped_position = 0;
|
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());
|
// LOG->Trace("set playing true for %p (StartPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
||||||
|
|
||||||
playing = true;
|
playing = true;
|
||||||
playing_thread = RageThread::GetCurrentThreadID();
|
|
||||||
|
|
||||||
SOUNDMAN->StartMixing(this);
|
SOUNDMAN->StartMixing(this);
|
||||||
|
|
||||||
@@ -609,7 +601,6 @@ void RageSound::StopPlaying()
|
|||||||
|
|
||||||
// LOG->Trace("set playing false for %p (StopPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
// LOG->Trace("set playing false for %p (StopPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
||||||
playing = false;
|
playing = false;
|
||||||
playing_thread = 0;
|
|
||||||
|
|
||||||
max_driver_frame = 0;
|
max_driver_frame = 0;
|
||||||
pos_map.Clear();
|
pos_map.Clear();
|
||||||
@@ -640,7 +631,6 @@ void RageSound::SoundIsFinishedPlaying()
|
|||||||
|
|
||||||
// LOG->Trace("set playing false for %p (SoundIsFinishedPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
// LOG->Trace("set playing false for %p (SoundIsFinishedPlaying) (%s)", this, this->GetLoadedFilePath().c_str());
|
||||||
playing = false;
|
playing = false;
|
||||||
playing_thread = 0;
|
|
||||||
|
|
||||||
pos_map.Clear();
|
pos_map.Clear();
|
||||||
// LOG->Trace("SoundIsFinishedPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str());
|
// LOG->Trace("SoundIsFinishedPlaying %p finished (%s)", this, this->GetLoadedFilePath().c_str());
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ public:
|
|||||||
bool SetPositionSeconds( float fSeconds );
|
bool SetPositionSeconds( float fSeconds );
|
||||||
CString GetLoadedFilePath() const { return m_sFilePath; }
|
CString GetLoadedFilePath() const { return m_sFilePath; }
|
||||||
bool IsPlaying() const { return playing; }
|
bool IsPlaying() const { return playing; }
|
||||||
uint64_t GetPlayingThread() const { return playing_thread; }
|
|
||||||
|
|
||||||
/* Lock and unlock this sound. */
|
/* Lock and unlock this sound. */
|
||||||
void LockSound();
|
void LockSound();
|
||||||
@@ -128,10 +127,6 @@ public:
|
|||||||
const RageSoundParams &GetParams() const { return m_Param; }
|
const RageSoundParams &GetParams() const { return m_Param; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* If we were copied from another RageSound, this will point to it; otherwise
|
|
||||||
* this is ourself. */
|
|
||||||
RageSound *original;
|
|
||||||
|
|
||||||
mutable RageMutex m_Mutex;
|
mutable RageMutex m_Mutex;
|
||||||
|
|
||||||
SoundReader *Sample;
|
SoundReader *Sample;
|
||||||
@@ -161,9 +156,6 @@ private:
|
|||||||
/* Keep track of the max SOUNDMAN->GetPosition result (see GetPositionSecondsInternal). */
|
/* Keep track of the max SOUNDMAN->GetPosition result (see GetPositionSecondsInternal). */
|
||||||
mutable int64_t max_driver_frame;
|
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. */
|
/* Unique ID number for this instance of RageSound. */
|
||||||
int ID;
|
int ID;
|
||||||
|
|
||||||
@@ -181,9 +173,6 @@ private:
|
|||||||
static void RateChange(char *buf, int &cnt, int speed_input_samples, int speed_output_samples, int channels);
|
static void RateChange(char *buf, int &cnt, int speed_input_samples, int speed_output_samples, int channels);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/* Used by RageSoundManager: */
|
|
||||||
RageSound *GetOriginal() { return original; }
|
|
||||||
|
|
||||||
/* Called only by the sound drivers: */
|
/* Called only by the sound drivers: */
|
||||||
/* This function should return the number of bytes actually put into buffer.
|
/* 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
|
* If less than size is returned, it signals the stream to stop; once it's
|
||||||
|
|||||||
Reference in New Issue
Block a user