Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 5c8d214

Browse files
committed
A few minor changes - default AllSoundPropertiesUpToDate to false, set 3d attributes on music channel so the music channel plays properly with 3d sound panning
1 parent 9ec843e commit 5c8d214

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Entities/SoundContainer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ namespace RTE {
321321
bool m_AffectedByGlobalPitch; //!< Whether this SoundContainer's sounds should be able to be altered by global pitch changes
322322
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.
323323

324-
bool m_AllSoundPropertiesUpToDate; //!< Whether this SoundContainer's sounds' modes and properties are up to date. Used primarily to handle discrepancies that can occur when loading from ini if the line ordering isn't ideal.
324+
bool m_AllSoundPropertiesUpToDate = false; //!< Whether this SoundContainer's sounds' modes and properties are up to date. Used primarily to handle discrepancies that can occur when loading from ini if the line ordering isn't ideal.
325325

326326
private:
327327
/// <summary>

Managers/AudioMan.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ namespace RTE {
281281
FMOD::Channel *musicChannel;
282282
result = musicStream->set3DMinMaxDistance(100000, 100000);
283283
result = (result == FMOD_OK) ? m_AudioSystem->playSound(musicStream, m_MusicChannelGroup, true, &musicChannel) : result;
284+
result = (result == FMOD_OK) ? musicChannel->set3DAttributes(&GetAsFMODVector(Vector()), NULL) : result;
284285
if (result != FMOD_OK) {
285286
g_ConsoleMan.PrintString("ERROR: Could not play music file: " + std::string(filePath) + ": " + std::string(FMOD_ErrorString(result)));
286287
return;

0 commit comments

Comments
 (0)