@@ -167,12 +167,7 @@ namespace RTE {
167167
168168 // / Sets the custom pan value of this SoundContainer. Clamped between -1 and 1.
169169 // / @param customPanValue The new custom pan value.
170- void SetCustomPanValue (float customPanValue) {
171- m_CustomPanValue = std::clamp (customPanValue, -1 .0f , 1 .0f );
172- if (IsBeingPlayed ()) {
173- g_AudioMan.ChangeSoundContainerPlayingChannelsCustomPanValue (this );
174- }
175- }
170+ void SetCustomPanValue (float customPanValue);
176171
177172 // / Gets the panning strength multiplier of this SoundContainer.
178173 // / @return A float with the panning strength multiplier.
@@ -224,41 +219,23 @@ namespace RTE {
224219 // / Sets the position of the SoundContainer's sounds while they're playing.
225220 // / @param position The new position to play the SoundContainer's sounds.
226221 // / @return Whether this SoundContainer's attenuation setting was successful.
227- void SetPosition (const Vector& newPosition) {
228- if (!m_Immobile && newPosition != m_Pos) {
229- m_Pos = newPosition;
230- if (IsBeingPlayed ()) {
231- g_AudioMan.ChangeSoundContainerPlayingChannelsPosition (this );
232- }
233- }
234- }
222+ void SetPosition (const Vector& newPosition);
235223
236224 // / Gets the volume the sounds in this SoundContainer are played at. Note that this does not factor volume changes due to the SoundContainer's position.
237225 // / @return The volume the sounds in this SoundContainer are played at.
238226 float GetVolume () const { return m_Volume; }
239227
240228 // / Sets the volume sounds in this SoundContainer should be played at. Note that this does not factor volume changes due to the SoundContainer's position. Does not affect currently playing sounds.
241229 // / @param newVolume The new volume sounds in this SoundContainer should be played at. Limited between 0 and 10.
242- void SetVolume (float newVolume) {
243- newVolume = std::clamp (newVolume, 0 .0F , 10 .0F );
244- if (IsBeingPlayed ()) {
245- g_AudioMan.ChangeSoundContainerPlayingChannelsVolume (this , newVolume);
246- }
247- m_Volume = newVolume;
248- }
230+ void SetVolume (float newVolume);
249231
250232 // / Gets the pitch the sounds in this SoundContainer are played at. Note that this does not factor in global pitch.
251233 // / @return The pitch the sounds in this SoundContainer are played at.
252234 float GetPitch () const { return m_Pitch; }
253235
254236 // / Sets the pitch sounds in this SoundContainer should be played at and updates any playing instances accordingly.
255237 // / @param newPitch The new pitch sounds in this SoundContainer should be played at. Limited between 0.125 and 8 (8 octaves up or down).
256- void SetPitch (float newPitch) {
257- m_Pitch = std::clamp (newPitch, 0 .125F , 8 .0F );
258- if (IsBeingPlayed ()) {
259- g_AudioMan.ChangeSoundContainerPlayingChannelsPitch (this );
260- }
261- }
238+ void SetPitch (float newPitch);
262239
263240 // / Gets the pitch variation the sounds in this SoundContainer are played at.
264241 // / @return The pitch variation the sounds in this SoundContainer are played at.
@@ -300,7 +277,7 @@ namespace RTE {
300277 // / Stops playback of this SoundContainer for a specific player.
301278 // / @param player Player to stop playback of this SoundContainer for.
302279 // / @return Whether this SoundContainer successfully stopped playing.
303- bool Stop (int player) { return ( HasAnySounds () && IsBeingPlayed ()) ? g_AudioMan. StopSoundContainerPlayingChannels ( this , player) : false ; }
280+ bool Stop (int player);
304281
305282 // / Restarts playback of this SoundContainer for all players.
306283 // / @return Whether this SoundContainer successfully restarted its playback.
@@ -309,15 +286,11 @@ namespace RTE {
309286 // / Restarts playback of this SoundContainer for a specific player.
310287 // / @param player Player to restart playback of this SoundContainer for.
311288 // / @return Whether this SoundContainer successfully restarted its playback.
312- bool Restart (int player) { return ( HasAnySounds () && IsBeingPlayed ()) ? g_AudioMan. StopSoundContainerPlayingChannels ( this , player) && g_AudioMan. PlaySoundContainer ( this , player) : false ; }
289+ bool Restart (int player);
313290
314291 // / Fades out playback of the SoundContainer to 0 volume.
315292 // / @param fadeOutTime How long the fadeout should take.
316- void FadeOut (int fadeOutTime = 1000 ) {
317- if (IsBeingPlayed ()) {
318- return g_AudioMan.FadeOutSoundContainerPlayingChannels (this , fadeOutTime);
319- }
320- }
293+ void FadeOut (int fadeOutTime = 1000 );
321294#pragma endregion
322295
323296#pragma region Miscellaneous
0 commit comments