add GetReferenceCount
This commit is contained in:
@@ -118,6 +118,11 @@ SoundReader *RageSoundReader_Preload::Copy() const
|
|||||||
return new RageSoundReader_Preload(*this);
|
return new RageSoundReader_Preload(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int RageSoundReader_Preload::GetReferenceCount() const
|
||||||
|
{
|
||||||
|
return buf.GetReferenceCount();
|
||||||
|
}
|
||||||
|
|
||||||
rc_string::rc_string()
|
rc_string::rc_string()
|
||||||
{
|
{
|
||||||
buf = new string;
|
buf = new string;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public:
|
|||||||
~rc_string();
|
~rc_string();
|
||||||
string &get_owned();
|
string &get_owned();
|
||||||
const string &get() const;
|
const string &get() const;
|
||||||
|
int GetReferenceCount() const { return *cnt; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class RageSoundReader_Preload: public SoundReader
|
class RageSoundReader_Preload: public SoundReader
|
||||||
@@ -46,6 +47,10 @@ public:
|
|||||||
unsigned GetNumChannels() const { return channels; }
|
unsigned GetNumChannels() const { return channels; }
|
||||||
bool IsStreamingFromDisk() const { return false; }
|
bool IsStreamingFromDisk() const { return false; }
|
||||||
|
|
||||||
|
/* Return the total number of copies of this sound. (If 1 is returned,
|
||||||
|
* this is the last copy.) */
|
||||||
|
int GetReferenceCount() const;
|
||||||
|
|
||||||
SoundReader *Copy() const;
|
SoundReader *Copy() const;
|
||||||
~RageSoundReader_Preload() { }
|
~RageSoundReader_Preload() { }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user