14 while (!m_set.empty()) {
15 sound = (*m_set.begin()).GetSound();
16 m_set.erase(m_set.begin());
21 while (!m_list.empty()) {
22 sound = (*m_list.begin()).GetSound();
24 m_list.erase(m_list.begin());
34 Set100d6b4c::iterator setIter;
35 for (setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
37 for (Set100d6b4c::iterator setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
45 List100d6b4c::iterator listIter = m_list.begin();
46 while (listIter != m_list.end()) {
55 m_list.erase(listIter++);
69 char* key =
new char[strlen(p_key) + 1];
73 if (it != m_set.end()) {
74 return (*it).GetSound();
84 if (it != m_set.end()) {
126 sound->
Play(p_name, p_looping);
131 p_sound->
Play(p_name, p_looping);
143 Set100d6b4c::iterator setIter;
144 for (setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
146 for (Set100d6b4c::iterator setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
148 if ((*setIter).GetSound() == p_sound) {
155 List100d6b4c::iterator listIter;
156 for (listIter = m_list.begin();; listIter++) {
158 for (List100d6b4c::iterator listIter = m_list.begin();; listIter++) {
160 if (listIter == m_list.end()) {
165 if (sound == p_sound) {
176 Set100d6b4c::iterator setIter;
177 for (setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
179 for (Set100d6b4c::iterator setIter = m_set.begin(); setIter != m_set.end(); setIter++) {
181 if ((*setIter).GetSound() == p_sound) {
185 m_set.erase(setIter);
191 List100d6b4c::iterator listIter;
192 for (listIter = m_list.begin();; listIter++) {
194 for (List100d6b4c::iterator listIter = m_list.begin();; listIter++) {
196 if (listIter == m_list.end()) {
201 if (sound == p_sound) {
205 m_list.erase(listIter);
[AI] Manages caching, reuse, and playback of LegoCacheSound objects.
void Destroy(LegoCacheSound *&p_sound)
[AI] Destroys (deletes and removes) the specified sound object from all tracking.
LegoCacheSound * FindSoundByKey(const char *p_key)
[AI] Attempts to find and return a cached sound by its key (case-insensitive).
LegoCacheSound * ManageSoundEntry(LegoCacheSound *p_sound)
[AI] Manages a sound entry.
LegoCacheSound * Play(const char *p_key, const char *p_name, MxBool p_looping)
[AI] Plays a sound identified by key, with the given playback name and looping flag.
void Stop(LegoCacheSound *&p_sound)
[AI] Stops playback of the specified sound object.
virtual MxResult Tickle()
[AI] Advances or cleans up all managed sounds.
Sound cache object managing DirectSound buffers and 3D positioning for preloaded sound data.
LegoCacheSound * Clone()
Creates an identical copy of this LegoCacheSound, including memory buffers, properties,...
MxResult Play(const char *p_name, MxBool p_looping)
Starts playback of the cached sound in this buffer.
void FUN_10006be0()
Handles sound updates per tick; manages stopping, buffer state, and 3D-position refreshes if sound is...
const MxBool GetUnknown0x58() const
Returns whether this sound is currently playing or is flagged as 'active'.
void Stop()
Immediately stops playback and resets buffer, clearing event tag and position cues.
Represents the active 3D world, holding all entity, animation, sound, path, and ROI objects.
virtual void Add(MxCore *p_object)
Adds an object (entity, presenter, ROI, etc.) to the appropriate world-managed list or set.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoWorld * CurrentWorld()
[AI] Accessor for the currently active LegoWorld instance. [AI]
[AI] Represents a single entry in the cached sound system, linking a sound pointer with its identifyi...