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

Commit 2f0b812

Browse files
committed
Changed AudioMan network handling to accomodate position instead of attenuation, as well as attenuation start distance and immobile properties.
Changed SetSoundAttenuation to SetSoundPosition and changed PlaySound to accomodate a Vector for position instead of a float for attenuation Rewrote some comments and renamed some variables Added FMOD_VECTOR handling and unit vectors for the up and forwards directions Removed unneeded software format setting. Made PlayMusic use FMOD_3D and FMOD_3D_HEADRELATIVE flags. Made PlaySound check if the SoundContainer's sounds are up to date and, if not, update them for safety. Removed loop setting here since it's handled by sounds. Added attenuation min distance and immobile to AudioMan::PlaySound(filePath) so they can get set.
1 parent 30267b1 commit 2f0b812

File tree

2 files changed

+147
-105
lines changed

2 files changed

+147
-105
lines changed

Managers/AudioMan.cpp

Lines changed: 92 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "AudioMan.h"
22
#include "ConsoleMan.h"
33
#include "SettingsMan.h"
4+
#include "SceneMan.h"
45
#include "SoundContainer.h"
56
#include "GUISound.h"
67

@@ -66,9 +67,7 @@ namespace RTE {
6667

6768
int AudioMan::Create() {
6869
FMOD_RESULT soundSystemSetupResult = FMOD::System_Create(&m_AudioSystem);
69-
70-
//TODO 44.1 kHz came from data, fmod defaults to 48 kHz, see if we can just use this instead??
71-
m_AudioSystem->setSoftwareFormat(44100, FMOD_SPEAKERMODE_DEFAULT, 0);
70+
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->set3DSettings(1, g_FrameMan.GetPPM(), 1) : soundSystemSetupResult;
7271

7372
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->init(c_MaxAudioChannels, FMOD_INIT_NORMAL, 0) : soundSystemSetupResult;
7473
soundSystemSetupResult = soundSystemSetupResult == FMOD_OK ? m_AudioSystem->getMasterChannelGroup(&m_MasterChannelGroup) : soundSystemSetupResult;
@@ -106,6 +105,10 @@ namespace RTE {
106105

107106
void AudioMan::Update() {
108107
if (m_AudioEnabled) {
108+
109+
//TODO handle splitscreen - do m_AudioSystem->set3DNumListeners(numPlayers); and set set each player's position
110+
//TODO allow setting vel for AEmitter and PEmitter
111+
m_AudioSystem->set3DListenerAttributes(0, &GetAsFMODVector(g_SceneMan.GetScrollTarget()), NULL, &c_FMODForward, &c_FMODUp);
109112
m_AudioSystem->update();
110113

111114
// Done waiting for silence
@@ -120,28 +123,31 @@ namespace RTE {
120123
return;
121124
}
122125

123-
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_GLOBAL_PITCH, NULL, NULL, 0, 0, pitch, excludeMusic); }
126+
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_GLOBAL_PITCH, NULL, NULL, Vector(), 0, pitch, excludeMusic); }
124127

125128
m_GlobalPitch = Limit(pitch, 8, 0.125); //Limit pitch change to 8 octaves up or down
126129

127130
if (!excludeMusic) { m_MusicChannelGroup->setPitch(m_GlobalPitch); }
128131

129132
int numChannels;
130133
FMOD_RESULT result = m_SoundChannelGroup->getNumChannels(&numChannels);
131-
if (result == FMOD_OK) {
132-
FMOD::Channel *soundChannel;
133-
bool isPlaying;
134-
for (int i = 0; i < numChannels; i++) {
135-
result = m_SoundChannelGroup->getChannel(i, &soundChannel);
136-
result = result == FMOD_OK ? soundChannel->isPlaying(&isPlaying) : result;
134+
if (result != FMOD_OK) {
135+
g_ConsoleMan.PrintString("ERROR: Could not set global pitch: " + std::string(FMOD_ErrorString(result)));
136+
return;
137+
}
137138

138-
if (result == FMOD_OK && isPlaying) {
139-
void *userData;
140-
result == FMOD_OK ? soundChannel->getUserData(&userData) : result;
141-
SoundContainer *channelSoundContainer = (SoundContainer *)userData;
139+
FMOD::Channel *soundChannel;
140+
bool isPlaying;
141+
for (int i = 0; i < numChannels; i++) {
142+
result = m_SoundChannelGroup->getChannel(i, &soundChannel);
143+
result = result == FMOD_OK ? soundChannel->isPlaying(&isPlaying) : result;
142144

143-
if (channelSoundContainer->IsAffectedByGlobalPitch()) { soundChannel->setPitch(pitch); }
144-
}
145+
if (result == FMOD_OK && isPlaying) {
146+
void *userData;
147+
result == FMOD_OK ? soundChannel->getUserData(&userData) : result;
148+
SoundContainer const *channelSoundContainer = (SoundContainer *)userData;
149+
150+
if (channelSoundContainer->IsAffectedByGlobalPitch()) { soundChannel->setPitch(pitch); }
145151
}
146152
}
147153
}
@@ -221,24 +227,22 @@ namespace RTE {
221227

222228
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
223229

224-
bool AudioMan::SetSoundAttenuation(SoundContainer *pSoundContainer, float attenuation) {
225-
if (!m_AudioEnabled || !pSoundContainer) {
230+
bool AudioMan::SetSoundPosition(SoundContainer *soundContainer, const Vector &position) {
231+
if (!m_AudioEnabled || !soundContainer) {
226232
return false;
227233
}
228234

229-
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_ATTENUATION, pSoundContainer->GetPlayingChannels(), &pSoundContainer->GetSelectedSoundHashes(), attenuation); }
230-
231-
attenuation = Limit(attenuation, 0.95, 0); //Limit attenuation so it can't be closer than 0 (full volume) or farther than 0.95 (quiet but not quite silent)
235+
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_POSITION, soundContainer->GetPlayingChannels(), &soundContainer->GetSelectedSoundHashes(), position); }
232236

233237
FMOD_RESULT result = FMOD_OK;
234238
FMOD::Channel *soundChannel;
235239

236-
std::unordered_set<unsigned short int> const *channels = pSoundContainer->GetPlayingChannels();
240+
std::unordered_set<unsigned short int> const *channels = soundContainer->GetPlayingChannels();
237241
for (std::unordered_set<unsigned short int>::iterator channelIterator = channels->begin(); channelIterator != channels->end(); ++channelIterator) {
238242
result = m_AudioSystem->getChannel((*channelIterator), &soundChannel);
239-
result = result == FMOD_OK ? soundChannel->setVolume(1 - attenuation) : result;
243+
result = result == FMOD_OK ? soundChannel->set3DAttributes(&GetAsFMODVector(position), NULL) : result;
240244
if (result != FMOD_OK) {
241-
g_ConsoleMan.PrintString("ERROR: Could not set sound attenuation for the sound being played on channel " + std::to_string(*channelIterator) + " for SoundContainer " + pSoundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
245+
g_ConsoleMan.PrintString("ERROR: Could not set sound position for the sound being played on channel " + std::to_string(*channelIterator) + " for SoundContainer " + soundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
242246
}
243247
}
244248

@@ -247,19 +251,19 @@ namespace RTE {
247251

248252
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
249253

250-
bool AudioMan::SetSoundPitch(SoundContainer *pSoundContainer, float pitch) {
251-
if (!m_AudioEnabled || !pSoundContainer || !pSoundContainer->IsBeingPlayed()) {
254+
bool AudioMan::SetSoundPitch(SoundContainer *soundContainer, float pitch) {
255+
if (!m_AudioEnabled || !soundContainer || !soundContainer->IsBeingPlayed()) {
252256
return false;
253257
}
254258

255-
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_PITCH, pSoundContainer->GetPlayingChannels(), &pSoundContainer->GetSelectedSoundHashes(), 0, 0, pitch); }
259+
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_SET_PITCH, soundContainer->GetPlayingChannels(), &soundContainer->GetSelectedSoundHashes(), Vector(), 0, pitch); }
256260

257261
pitch = Limit(pitch, 8, 0.125); //Limit pitch change to 8 octaves up or down
258262

259263
FMOD_RESULT result;
260264
FMOD::Channel *soundChannel;
261265

262-
std::unordered_set<unsigned short int> const *channels = pSoundContainer->GetPlayingChannels();
266+
std::unordered_set<unsigned short int> const *channels = soundContainer->GetPlayingChannels();
263267
for (std::unordered_set<unsigned short int>::iterator channelIterator = channels->begin(); channelIterator != channels->end(); ++channelIterator) {
264268
result = m_AudioSystem->getChannel((*channelIterator), &soundChannel);
265269
if (result == FMOD_OK) {
@@ -283,7 +287,7 @@ namespace RTE {
283287

284288
FMOD::Sound *musicStream;
285289

286-
result = m_AudioSystem->createStream(filePath, (loops == 0 || loops == 1) ? FMOD_LOOP_OFF : FMOD_LOOP_NORMAL, nullptr, &musicStream);
290+
result = m_AudioSystem->createStream(filePath, FMOD_3D | FMOD_3D_HEADRELATIVE | ((loops == 0 || loops == 1) ? FMOD_LOOP_OFF : FMOD_LOOP_NORMAL), nullptr, &musicStream);
287291
if (result != FMOD_OK) {
288292
g_ConsoleMan.PrintString("ERROR: Could not open music file " + std::string(filePath) + ": " + std::string(FMOD_ErrorString(result)));
289293
return;
@@ -399,7 +403,7 @@ namespace RTE {
399403

400404
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
401405

402-
SoundContainer *AudioMan::PlaySound(const char *filePath, float attenuation, int player, int loops, int priority, double pitchOrAffectedByGlobalPitch) {
406+
SoundContainer *AudioMan::PlaySound(const char *filePath, const Vector &position, int player, int loops, int priority, double pitchOrAffectedByGlobalPitch, float attenuationStartDistance, bool immobile) {
403407
if (!filePath) {
404408
g_ConsoleMan.PrintString("Error: Null filepath passed to AudioMan::PlaySound!");
405409
return 0;
@@ -409,10 +413,10 @@ namespace RTE {
409413
double pitch = affectedByGlobalPitch ? m_GlobalPitch : pitchOrAffectedByGlobalPitch;
410414

411415
SoundContainer *newSoundContainer = new SoundContainer();
412-
newSoundContainer->Create(loops, affectedByGlobalPitch);
416+
newSoundContainer->Create(loops, affectedByGlobalPitch, attenuationStartDistance, immobile);
413417
newSoundContainer->AddSound(filePath, false);
414418
if (newSoundContainer->HasAnySounds()) {
415-
PlaySound(newSoundContainer, attenuation, player, priority, pitch);
419+
PlaySound(newSoundContainer, position, player, priority, pitch);
416420
} else {
417421
delete newSoundContainer;
418422
}
@@ -422,74 +426,83 @@ namespace RTE {
422426

423427
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
424428

425-
bool AudioMan::PlaySound(SoundContainer *pSoundContainer, float attenuation, int player, int priority, double pitch) {
426-
if (!m_AudioEnabled || !pSoundContainer) {
429+
bool AudioMan::PlaySound(SoundContainer *soundContainer, const Vector &position, int player, int priority, double pitch) {
430+
if (!m_AudioEnabled || !soundContainer) {
427431
return false;
428432
}
429433

430-
attenuation = Limit(attenuation, 0.95, 0); //Limit attenuation so it can't be closer than 0 (full volume) or farther than 0.95 (quiet but not quite silent)
431-
priority = priority < 0 ? pSoundContainer->GetPriority() : priority;
432-
pitch = Limit(pSoundContainer->IsAffectedByGlobalPitch() ? m_GlobalPitch : pitch, 8, 0.125); //Limit pitch change to 8 octaves up or down, and set it to global pitch if applicable
433-
434-
FMOD::Channel *channel;
435434
FMOD_RESULT result = FMOD_OK;
436-
int channelIndex;
437-
if (!pSoundContainer->SelectNextSounds()) {
438-
g_ConsoleMan.PrintString("Unable to select new sounds to play for SoundContainer " + pSoundContainer->GetPresetName() + ". No sounds will be played.");
435+
436+
if (!soundContainer->AllSoundPropertiesUpToDate()) {
437+
result = soundContainer->UpdateSoundProperties();
438+
if (result != FMOD_OK) {
439+
g_ConsoleMan.PrintString("ERROR: Could not update sound properties for SoundContainer " + soundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
440+
return false;
441+
}
442+
}
443+
444+
if (!soundContainer->SelectNextSounds()) {
445+
g_ConsoleMan.PrintString("Unable to select new sounds to play for SoundContainer " + soundContainer->GetPresetName());
446+
return false;
439447
}
440448

441-
for (FMOD::Sound *sound : pSoundContainer->GetSelectedSoundObjects()) {
449+
priority = priority < 0 ? soundContainer->GetPriority() : priority;
450+
pitch = Limit(soundContainer->IsAffectedByGlobalPitch() ? m_GlobalPitch : pitch, 8, 0.125); //Limit pitch change to 8 octaves up or down, and set it to global pitch if applicable
451+
452+
FMOD::Channel *channel;
453+
int channelIndex;
454+
for (FMOD::Sound *sound : soundContainer->GetSelectedSoundObjects()) {
442455
result = result == FMOD_OK ? m_AudioSystem->playSound(sound, m_SoundChannelGroup, true, &channel) : result;
443456
result = result == FMOD_OK ? channel->getIndex(&channelIndex) : result;
444-
result = result == FMOD_OK ? channel->setUserData(pSoundContainer) : result;
457+
result = result == FMOD_OK ? channel->setUserData(soundContainer) : result;
445458
result = result == FMOD_OK ? channel->setCallback(SoundChannelEndedCallback) : result;
446-
result = result == FMOD_OK ? channel->setVolume(1 - attenuation) : result;
447-
result = result == FMOD_OK ? channel->setLoopCount(pSoundContainer->GetLoopSetting()) : result;
459+
result = result == FMOD_OK ? channel->set3DAttributes(&GetAsFMODVector(position), NULL) : result;
460+
result = result == FMOD_OK ? channel->set3DLevel(g_SettingsMan.SoundPanningEffectStrength()) : result;
448461
result = result == FMOD_OK ? channel->setPriority(priority) : result;
449462
result = result == FMOD_OK ? channel->setPitch(pitch) : result;
450463
}
451464

452465
if (result != FMOD_OK) {
453-
g_ConsoleMan.PrintString("ERROR: Could not play sounds from SoundContainer " + pSoundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
466+
g_ConsoleMan.PrintString("ERROR: Could not play sounds from SoundContainer " + soundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
454467
return false;
455468
}
456469

457470
result = channel->setPaused(false);
458471
if (result != FMOD_OK) {
459-
g_ConsoleMan.PrintString("ERROR: Failed to start playing sounds from SoundContainer " + pSoundContainer->GetPresetName() + " after setting it up: " + std::string(FMOD_ErrorString(result)));
472+
g_ConsoleMan.PrintString("ERROR: Failed to start playing sounds from SoundContainer " + soundContainer->GetPresetName() + " after setting it up: " + std::string(FMOD_ErrorString(result)));
460473
}
461474

462-
pSoundContainer->AddPlayingChannel(channelIndex);
475+
soundContainer->AddPlayingChannel(channelIndex);
463476

464477
// Now that the sound is playing we can register an event with the SoundContainer's channels, which can be used by clients to identify the sound being played.
465478
if (m_IsInMultiplayerMode) {
466-
RegisterSoundEvent(player, SOUND_PLAY, pSoundContainer->GetPlayingChannels(), &pSoundContainer->GetSelectedSoundHashes(), attenuation, pSoundContainer->GetLoopSetting(), pitch, pSoundContainer->IsAffectedByGlobalPitch());
479+
RegisterSoundEvent(player, SOUND_PLAY, soundContainer->GetPlayingChannels(), &soundContainer->GetSelectedSoundHashes(), position, soundContainer->GetLoopSetting(), pitch, soundContainer->IsAffectedByGlobalPitch(), soundContainer->GetAttenuationStartDistance(), soundContainer->IsImmobile());
467480
}
468481

469482
return true;
470483
}
471484

472485
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
473486

474-
bool AudioMan::StopSound(SoundContainer *pSoundContainer, int player) {
475-
if (!m_AudioEnabled || !pSoundContainer) {
487+
bool AudioMan::StopSound(SoundContainer *soundContainer, int player) {
488+
if (!m_AudioEnabled || !soundContainer) {
476489
return false;
477490
}
478491

479-
if (m_IsInMultiplayerMode) { RegisterSoundEvent(player, SOUND_STOP, pSoundContainer->GetPlayingChannels()); }
492+
if (m_IsInMultiplayerMode) { RegisterSoundEvent(player, SOUND_STOP, soundContainer->GetPlayingChannels()); }
480493

481494
FMOD_RESULT result;
482495
FMOD::Channel *soundChannel;
483-
bool anySoundsPlaying = pSoundContainer->IsBeingPlayed();
496+
bool anySoundsPlaying = soundContainer->IsBeingPlayed();
484497

485498
if (anySoundsPlaying) {
486-
std::unordered_set<unsigned short int> const *channels = pSoundContainer->GetPlayingChannels();
499+
std::unordered_set<unsigned short int> const *channels = soundContainer->GetPlayingChannels();
487500
for (std::unordered_set<unsigned short int>::iterator channelIterator = channels->begin(); channelIterator != channels->end();) {
488501
result = m_AudioSystem->getChannel((*channelIterator), &soundChannel);
489502
++channelIterator; // NOTE - stopping the sound will remove the channel, screwing things up if we don't move to the next iterator preemptively
490503
result = result == FMOD_OK ? soundChannel->stop() : result;
491504
if (result != FMOD_OK) {
492-
g_ConsoleMan.PrintString("Error: Failed to stop playing channel in SoundContainer " + pSoundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
505+
g_ConsoleMan.PrintString("Error: Failed to stop playing channel in SoundContainer " + soundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
493506
}
494507

495508
}
@@ -500,12 +513,14 @@ namespace RTE {
500513

501514
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
502515

503-
void AudioMan::FadeOutSound(SoundContainer *pSoundContainer, int fadeOutTime) {
504-
if (!m_AudioEnabled || !pSoundContainer || !pSoundContainer->IsBeingPlayed()) {
516+
void AudioMan::FadeOutSound(SoundContainer *soundContainer, int fadeOutTime) {
517+
if (!m_AudioEnabled || !soundContainer || !soundContainer->IsBeingPlayed()) {
505518
return;
506519
}
507520

508-
if (m_IsInMultiplayerMode) { RegisterSoundEvent(-1, SOUND_FADE_OUT, pSoundContainer->GetPlayingChannels(), &pSoundContainer->GetSelectedSoundHashes(), 0, 0, 0, false, fadeOutTime); }
521+
if (m_IsInMultiplayerMode) {
522+
RegisterSoundEvent(-1, SOUND_FADE_OUT, soundContainer->GetPlayingChannels(), &soundContainer->GetSelectedSoundHashes(), Vector(), 0, 0, false, 0, false, fadeOutTime);
523+
}
509524

510525
int sampleRate;
511526
m_AudioSystem->getSoftwareFormat(&sampleRate, nullptr, nullptr);
@@ -516,19 +531,29 @@ namespace RTE {
516531
unsigned long long parentClock;
517532
float currentVolume;
518533

519-
std::unordered_set<unsigned short int> const *channels = pSoundContainer->GetPlayingChannels();
534+
std::unordered_set<unsigned short int> const *channels = soundContainer->GetPlayingChannels();
520535
for (std::unordered_set<unsigned short int>::iterator channelIterator = channels->begin(); channelIterator != channels->end(); ++channelIterator) {
521536
result = m_AudioSystem->getChannel((*channelIterator), &soundChannel);
522537
result = result == FMOD_OK ? soundChannel->getDSPClock(nullptr, &parentClock) : result;
523538
result = result == FMOD_OK ? soundChannel->getVolume(&currentVolume) : result;
524539
result = result == FMOD_OK ? soundChannel->addFadePoint(parentClock, currentVolume) : result;
525540
result = result == FMOD_OK ? soundChannel->addFadePoint(parentClock + fadeOutTimeAsSamples, 0) : result;
526541
if (result != FMOD_OK) {
527-
g_ConsoleMan.PrintString("ERROR: Could not fade out sounds in SoundContainer " + pSoundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
542+
g_ConsoleMan.PrintString("ERROR: Could not fade out sounds in SoundContainer " + soundContainer->GetPresetName() + ": " + std::string(FMOD_ErrorString(result)));
528543
}
529544
}
530545
}
531546

547+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
548+
549+
FMOD_VECTOR AudioMan::GetAsFMODVector(const Vector &vector, float zValue) {
550+
Vector sceneDimensions = g_SceneMan.GetSceneDim();
551+
if (sceneDimensions.IsZero()) {
552+
return FMOD_VECTOR{0, 0, zValue};
553+
}
554+
return FMOD_VECTOR{vector.m_X, sceneDimensions.m_Y - vector.m_Y, zValue};
555+
}
556+
532557
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
533558

534559
void AudioMan::GetMusicEvents(int player, std::list<NetworkMusicData> &list) {
@@ -592,10 +617,10 @@ namespace RTE {
592617

593618
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
594619

595-
void AudioMan::RegisterSoundEvent(int player, NetworkSoundState state, std::unordered_set<unsigned short int> const *channels, std::vector<size_t> const *soundFileHashes, short int attenuation, short int loops, float pitch, bool affectedByGlobalPitch, short int fadeOutTime) {
620+
void AudioMan::RegisterSoundEvent(int player, NetworkSoundState state, std::unordered_set<unsigned short int> const *channels, std::vector<size_t> const *soundFileHashes, const Vector &position, short int loops, float pitch, bool affectedByGlobalPitch, float attenuationStartDistance, bool immobile, short int fadeOutTime) {
596621
if (player == -1) {
597622
for (int i = 0; i < c_MaxClients; i++) {
598-
RegisterSoundEvent(i, state, channels, soundFileHashes, attenuation, loops, pitch, affectedByGlobalPitch, fadeOutTime);
623+
RegisterSoundEvent(i, state, channels, soundFileHashes, position, loops, pitch, affectedByGlobalPitch, fadeOutTime);
599624
}
600625
} else {
601626
if (player >= 0 && player < c_MaxClients) {
@@ -609,10 +634,13 @@ namespace RTE {
609634
if (soundFileHashes) {
610635
std::copy(soundFileHashes->begin(), soundFileHashes->end(), soundData.SoundFileHashes);
611636
}
612-
soundData.Distance = attenuation;
637+
soundData.Position[0] = position.m_X;
638+
soundData.Position[1] = position.m_Y;
613639
soundData.Loops = loops;
614640
soundData.Pitch = pitch;
615641
soundData.AffectedByGlobalPitch = affectedByGlobalPitch;
642+
soundData.AttenuationStartDistance = attenuationStartDistance;
643+
soundData.Immobile = immobile;
616644
soundData.FadeOutTime = fadeOutTime;
617645

618646
g_SoundEventsListMutex[player].lock();

0 commit comments

Comments
 (0)