You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
reader.ReportError("SoundContainer priority must be between 256 (lowest priority) and 0 (highest priority).");
63
-
}
58
+
if (m_Priority < 0 || m_Priority > 256) { reader.ReportError("SoundContainer priority must be between 256 (lowest priority) and 0 (highest priority)."); }
RTEAssert(m_SelectedSounds.size() > 0 && m_SelectedSounds[0] >= 0 && m_SelectedSounds[0] < soundCount, "Failed to select next sound, either none was selected or the selected sound was invalid.");
136
-
130
+
137
131
returntrue;
138
132
}
139
133
@@ -143,12 +137,12 @@ namespace RTE {
143
137
FMOD_RESULT result = FMOD_OK;
144
138
145
139
for (std::vector<std::pair<ContentFile, FMOD::Sound * >>::const_iterator itr = m_Sounds.begin(); itr != m_Sounds.end() && result == FMOD_OK; ++itr) {
/// Adds a channel index to the SoundContainer's collection of playing channels.
159
159
/// </summary>
160
160
/// <param name="channel">The channel index to add.</param>
161
-
voidAddPlayingChannel(unsignedshortintchannel) { m_PlayingChannels.insert(channel); RTEAssert(m_PlayingChannels.size() <= c_MaxPlayingSoundsPerContainer, "Tried to play more than " + std::to_string(c_MaxPlayingSoundsPerContainer) + " sounds in SoundContainer " + GetPresetName()); }
161
+
voidAddPlayingChannel(unsignedshort channel) { m_PlayingChannels.insert(channel); RTEAssert(m_PlayingChannels.size() <= c_MaxPlayingSoundsPerContainer, "Tried to play more than " + std::to_string(c_MaxPlayingSoundsPerContainer) + " sounds in SoundContainer " + GetPresetName()); }
162
162
163
163
/// <summary>
164
164
/// Removes a channel index from the SoundContainer's collection of playing channels.
165
165
/// </summary>
166
166
/// <param name="channel">The channel index to remove.</param>
std::vector<std::pair<ContentFile, FMOD::Sound *>> m_Sounds; // All the FMOD Sound objects in this SoundContainer, paired with their appropriate ContentFile. The sound objects within are owned by the ContentFile static maps
314
314
std::vector<size_t> m_SelectedSounds; //!< Vector of the indices of all selected sounds
315
315
316
-
std::unordered_set<unsignedshortint> m_PlayingChannels; //!< The channels this SoundContainer is currently using
316
+
std::unordered_set<unsignedshort> m_PlayingChannels; //!< The channels this SoundContainer is currently using
317
317
318
-
float m_AttenuationStartDistance; //!< The distance away from the AudioSystem listenter to start attenuating this sound. Attenuation follows FMOD 3D Inverse Rolloff model.
318
+
float m_AttenuationStartDistance; //!< The distance away from the AudioSystem listener to start attenuating this sound. Attenuation follows FMOD 3D Inverse roll-off model.
319
319
int m_Loops; //!< Number of loops (repeats) the SoundContainer's sounds should play when played. 0 means it plays once, -1 means it plays until stopped
320
320
int m_Priority; //!< The mixing priority of this SoundContainer's sounds. Higher values are more likely to be heard
321
321
bool m_AffectedByGlobalPitch; //!< Whether this SoundContainer's sounds should be able to be altered by global pitch changes
0 commit comments