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.
Change shorts and stuff to ints where it makes sense, renamed some things, change NULL to nullptr, changed to range for loops
Reorganized various method positions, added struct comments and missing regions to audioman.h
Removed complexity in setting pitch and volume for soundcontainers, global pitch can be done to sound groups and individual pitch can be done to sounds. Volume and position shouldn't need to be dependent
Change soundcontainer position, volume and pitch setters so they're they the audioman versions just take the soundcontainer
Copy file name to clipboardExpand all lines: Entities/SoundContainer.h
+9-17Lines changed: 9 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ namespace RTE {
97
97
98
98
#pragma region INI Handling
99
99
/// <summary>
100
-
/// Handles reading a SoundSet from INI. If the Reader is trying to read a line adding a sound, it'll call ReadSound and add the resulting sound to a new SoundSet.
100
+
/// Handles reading a SoundSet from INI. If the Reader is trying to read a line adding a sound, it'll call ReadAndGetSound and add the resulting sound to a new SoundSet.
101
101
/// </summary>
102
102
/// <param name="propName">The name of the property to be read.</param>
103
103
/// <param name="reader">A Reader lined up to the value of the property to be read.</param>
@@ -109,7 +109,7 @@ namespace RTE {
109
109
/// </summary>
110
110
/// <param name="reader">A Reader lined up to the value of the property to be read.</param>
111
111
/// <returns>SoundData for the newly read sound.</returns>
112
-
SoundData ReadSound(Reader &reader);
112
+
SoundData ReadAndGetSound(Reader &reader)const;
113
113
#pragma endregion
114
114
115
115
#pragma region Sound Addition
@@ -199,7 +199,7 @@ namespace RTE {
199
199
/// Gets the channels playing sounds from this SoundContainer.
200
200
/// </summary>
201
201
/// <returns>The channels currently being used.</returns>
/// 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.
@@ -323,7 +323,7 @@ namespace RTE {
323
323
/// 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.
324
324
/// </summary>
325
325
/// <param name="newVolume">The new volume sounds in this SoundContainer should be played at. Limited between 0 and 10.</param>
/// Gets the pitch the sounds in this SoundContainer are played at. Note that this does not factor in global pitch.
@@ -335,7 +335,7 @@ namespace RTE {
335
335
/// Sets the pitch sounds in this SoundContainer should be played at and updates any playing instances accordingly.
336
336
/// </summary>
337
337
/// <param name="newPitch">The new pitch sounds in this SoundContainer should be played at. Limited between 0.125 and 8 (8 octaves up or down).</param>
size_t m_SelectedSoundSet; //!< The selected SoundSet for this SoundContainer, used to determine what sounds will play when Play is called.
425
425
SoundCycleMode m_SoundSelectionCycleMode; //!< The SoundCycleMode for this SoundContainer, used to determine what will play next, each time play is called.
426
426
427
-
std::unordered_set<unsignedshort> m_PlayingChannels; //!< The channels this SoundContainer is currently using.
427
+
std::unordered_set<int> m_PlayingChannels; //!< The channels this SoundContainer is currently using.
428
428
SoundOverlapMode m_SoundOverlapMode; //!< The SoundOverlapMode for this SoundContainer, used to determine how it should handle overlapping play calls.
429
429
430
430
bool m_Immobile; //!< Whether this SoundContainer's sounds should be treated as immobile, i.e. not affected by 3D sound effects. Mostly used for GUI sounds and the like.
@@ -439,14 +439,6 @@ namespace RTE {
439
439
float m_Pitch; //!< The current natural pitch of this SoundContainer's sounds.
440
440
float m_Volume; //!< The current natural volume of this SoundContainer's sounds.
441
441
442
-
/// <summary>
443
-
/// TODO This is currently not used in favor of a simpler 2-point method but is kept in case it should be changed back. Examine this and remove or use it in future.
0 commit comments