diff --git a/Scripts/Python/plasma/Plasma.py b/Scripts/Python/plasma/Plasma.py index 72fb0b7116..b5d5447de5 100644 --- a/Scripts/Python/plasma/Plasma.py +++ b/Scripts/Python/plasma/Plasma.py @@ -1377,8 +1377,8 @@ def hideIcons(self): """Hides (disables) the voice recording icons.""" pass - def isEAXSupported(self): - """Returns true or false based on whether or not a the device specified supports EAX""" + def isEFXSupported(self): + """Returns true or false based on whether or not a the device specified supports EFX.""" pass def isEnabled(self): @@ -1389,8 +1389,8 @@ def isMuted(self): """Are all sounds muted? Returns 1 if true otherwise returns 0.""" pass - def isUsingEAXAcceleration(self): - """Is EAX sound acceleration enabled? Returns 1 if true otherwise returns 0.""" + def isUsingEFXAcceleration(self): + """Is EFX environmental audio enabled? Returns 1 if true otherwise returns 0.""" pass def isVoiceRecordingEnabled(self): @@ -1472,8 +1472,8 @@ def unmuteAll(self): """Unmutes all sounds.""" pass - def useEAXAcceleration(self,state): - """Enables or disables EAX sound acceleration (requires hardware acceleration).""" + def useEFXAcceleration(self,state): + """Enables or disables EFX environmental audio.""" pass class ptAvatar: diff --git a/Scripts/Python/xIniAudio.py b/Scripts/Python/xIniAudio.py index 0eed635c00..933cbaee67 100644 --- a/Scripts/Python/xIniAudio.py +++ b/Scripts/Python/xIniAudio.py @@ -287,9 +287,9 @@ def GetAudioMode(): if gIniFile: entryInit,idxInit = gIniFile.findByCommand("Audio.Initialize") entryHard,idxHard = gIniFile.findByCommand("Audio.UseHardware") - entryEAX,idxEAX = gIniFile.findByCommand("Audio.UseEAX") + entryEFX,idxEFX = gIniFile.findByCommand("Audio.UseEFX") - if entryEAX and entryEAX.getValue(0) == kBeTrue: + if entryEFX and entryEFX.getValue(0) == kBeTrue: mode = 3 else: if entryHard and entryHard.getValue(0) == kBeTrue: @@ -310,7 +310,7 @@ def SetAudioMode(init, device, eax): if gIniFile: entryInit,idxInit = gIniFile.findByCommand("Audio.Initialize") entryDev,idxDev = gIniFile.findByCommand("Audio.SetDeviceName") - entryEAX,idxEAX = gIniFile.findByCommand("Audio.UseEAX") + entryEFX,idxEFX = gIniFile.findByCommand("Audio.UseEFX") if init: val = kBeTrue @@ -333,10 +333,10 @@ def SetAudioMode(init, device, eax): else: val = kBeFalse - if entryEAX: - entryEAX.setValue(0, val) + if entryEFX: + entryEFX.setValue(0, val) else: - gIniFile.addEntry("Audio.UseEAX " + val) + gIniFile.addEntry("Audio.UseEFX " + val) def SetSubtitle(subtitle): if gIniFile: diff --git a/Scripts/Python/xOptionsMenu.py b/Scripts/Python/xOptionsMenu.py index 2d0f574e93..c791209f1c 100644 --- a/Scripts/Python/xOptionsMenu.py +++ b/Scripts/Python/xOptionsMenu.py @@ -75,7 +75,7 @@ AdvGameSettingDlg = ptAttribGUIDialog(10, "The Adv Game Settings dialog") ResetWarnDlg = ptAttribGUIDialog(11, "The Reset Warning dialog") ReleaseNotesDlg = ptAttribGUIDialog(12, "Release Notes dialog") -respDisableItems = ptAttribResponder(13, "resp: Disable Items", ["enableRes", "disableRes", "enableWindow", "disableWindow", "enableEAX", "disableEAX", "enableGamma", "disableGamma", "enableDynRefl", "disableDynRefl"]) +respDisableItems = ptAttribResponder(13, "resp: Disable Items", ["enableRes", "disableRes", "enableWindow", "disableWindow", "enableEFX", "disableEFX", "enableGamma", "disableGamma", "enableDynRefl", "disableDynRefl"]) SupportDlg = ptAttribGUIDialog(14, "Support dialog") @@ -346,7 +346,7 @@ class _KeyLine(NamedTuple): kAudioModeCBID02 = 753 kAudioModeCBID03 = 754 kAudioModeTextID = 755 -kAudioModeEAXTextID = 757 +kAudioModeEFXTextID = 757 kGSEnableVoiceChat=340 @@ -1113,9 +1113,9 @@ def OnGUINotify(self,id,control,event): curSelection = round(audioField.getValue() * audModeNum) intCurSelection = int(curSelection) - #Enable EAX Support - EAXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) - audio.useEAXAcceleration(EAXcheckbox.isChecked()) + #Enable EFX Support + EFXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) + audio.useEFXEnvironments(EFXcheckbox.isChecked()) audio.setPlaybackDevice(gAudioDevices[intCurSelection], 1) self.WriteAudioControls() @@ -1192,24 +1192,24 @@ def OnGUINotify(self,id,control,event): audioModeCtrlTextBox = ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeTextID)) audioModeCtrlTextBox.setString(audio.getFriendlyDeviceName(audioDeviceName)) - if audioDeviceName != prevAudioDeviceName: #Only update the EAX checkbox when the mouse has been let up... + if audioDeviceName != prevAudioDeviceName: #Only update the EFX checkbox when the mouse has been let up... PtDebugPrint("Audio Device Name changed!") prevAudioDeviceName = audioDeviceName - EAXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) - if not audio.isEAXSupported(): - PtDebugPrint("Disabling EAX checkbox") - #Disable EAX checkbox - EAXcheckbox.disable() - respDisableItems.run(self.key, state="disableEAX") - EAXcheckbox.setChecked(False) - ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEAXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) + EFXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) + if not audio.isEFXSupported(): + PtDebugPrint("Disabling EFX checkbox") + #Disable EFX checkbox + EFXcheckbox.disable() + respDisableItems.run(self.key, state="disableEFX") + EFXcheckbox.setChecked(False) + ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEFXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) else: - PtDebugPrint("Enabling EAX checkbox") - #We don't need to automatically check the EAX box, but do enable the control - EAXcheckbox.enable() - respDisableItems.run(self.key, state="enableEAX") - EAXcheckbox.setChecked(audio.isUsingEAXAcceleration()) - ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEAXTextID)).setForeColor(ptColor(1, 1, 1, 1)) + PtDebugPrint("Enabling EFX checkbox") + #We don't need to automatically check the EFX box, but do enable the control + EFXcheckbox.enable() + respDisableItems.run(self.key, state="enableEFX") + EFXcheckbox.setChecked(audio.isUsingEFXEnvironments()) + ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEFXTextID)).setForeColor(ptColor(1, 1, 1, 1)) elif tagID == kAudioModeCBID03: self.restartAudio = 1 @@ -1567,11 +1567,11 @@ def WriteAudioControls(self): xIniAudio.SetMute( audio.isMuted() ) xIniAudio.SetSubtitle( audio.areSubtitlesEnabled() ) - EAXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) + EFXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) - xIniAudio.SetAudioMode( True, audio.getPlaybackDevice(), EAXcheckbox.isChecked() ) - #xIniAudio.SetAudioMode( audio.isEnabled(), audio.getDeviceName(), EAXcheckbox.isChecked() ) - #xIniAudio.SetAudioMode( audio.isEnabled(), audio.getDeviceName(), audio.isUsingEAXAcceleration() ) + xIniAudio.SetAudioMode( True, audio.getPlaybackDevice(), EFXcheckbox.isChecked() ) + #xIniAudio.SetAudioMode( audio.isEnabled(), audio.getDeviceName(), EFXcheckbox.isChecked() ) + #xIniAudio.SetAudioMode( audio.isEnabled(), audio.getDeviceName(), audio.isUsingEFXEnvironments() ) #xIniAudio.SetMicLevel( audio.getMicLevel() ) xIniAudio.SetVoiceRecording( audio.isVoiceRecordingEnabled() ) @@ -1613,10 +1613,10 @@ def InitAudioControlsGUI(self): audioField = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioMuteCheckBoxTag)) audioField.setChecked( audio.isMuted() ) - EAXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) - EAXcheckbox.setChecked( audio.isUsingEAXAcceleration() ) - EAXcheckbox.enable() - respDisableItems.run(self.key, state="enableEAX") + EFXcheckbox = ptGUIControlCheckBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeCBID03)) + EFXcheckbox.setChecked( audio.isUsingEFXEnvironments() ) + EFXcheckbox.enable() + respDisableItems.run(self.key, state="enableEFX") audioField = ptGUIControlKnob(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeID)) numAudioDevices = len(gAudioDevices) - 1.0 @@ -1624,21 +1624,21 @@ def InitAudioControlsGUI(self): if numAudioDevices > 0: for num, device in enumerate(gAudioDevices): if gAudioDevices[num] == audio.getPlaybackDevice(): - if not audio.isEAXSupported(): - EAXcheckbox.disable() - respDisableItems.run(self.key, state="disableEAX") - EAXcheckbox.setChecked(False) - ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEAXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) + if not audio.isEFXSupported(): + EFXcheckbox.disable() + respDisableItems.run(self.key, state="disableEFX") + EFXcheckbox.setChecked(False) + ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEFXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) audioField.setValue(num/numAudioDevices) audioModeCtrlTextBox = ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeTextID)) audioDeviceName = prevAudioDeviceName = audio.getPlaybackDevice() audioModeCtrlTextBox.setString(audio.getFriendlyDeviceName(device)) else: - EAXcheckbox.disable() - respDisableItems.run(self.key, state="disableEAX") - EAXcheckbox.setChecked(False) - ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEAXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) + EFXcheckbox.disable() + respDisableItems.run(self.key, state="disableEFX") + EFXcheckbox.setChecked(False) + ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeEFXTextID)).setForeColor(ptColor(0.839, 0.785, 0.695, 1)) audioField.disable() audioModeCtrlTextBox = ptGUIControlTextBox(AudioSettingsDlg.dialog.getControlFromTag(kAudioModeTextID)) audioModeCtrlTextBox.setString("None") diff --git a/Sources/MaxPlugin/MaxComponent/plAudioComponents.cpp b/Sources/MaxPlugin/MaxComponent/plAudioComponents.cpp index e8439f8d7b..62599a976c 100644 --- a/Sources/MaxPlugin/MaxComponent/plAudioComponents.cpp +++ b/Sources/MaxPlugin/MaxComponent/plAudioComponents.cpp @@ -107,7 +107,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "MaxMain/plMaxCFGFile.h" #include "plPickNode.h" -// EAX stuff +// EFX stuff #include "plAudio/plEAXListenerMod.h" #include "plAudio/plEAXStructures.h" diff --git a/Sources/Plasma/Apps/plClient/plClient.cpp b/Sources/Plasma/Apps/plClient/plClient.cpp index 4dca667fdd..6b829d521d 100644 --- a/Sources/Plasma/Apps/plClient/plClient.cpp +++ b/Sources/Plasma/Apps/plClient/plClient.cpp @@ -2103,7 +2103,7 @@ void plClient::IWriteDefaultAudioSettings(const plFileName& destFile) { std::unique_ptr stream = plEncryptedStream::OpenEncryptedFileWrite(destFile); WriteBool(stream.get(), "Audio.Initialize", true); - WriteBool(stream.get(), "Audio.UseEAX", true); + WriteBool(stream.get(), "Audio.UseEFX", true); WriteInt(stream.get(), "Audio.SetPriorityCutoff", 6); WriteInt(stream.get(), "Audio.MuteAll", false); WriteInt(stream.get(), "Audio.SetChannelVolume SoundFX", 1); diff --git a/Sources/Plasma/FeatureLib/pfConsole/pfAudioConsoleCommands.cpp b/Sources/Plasma/FeatureLib/pfConsole/pfAudioConsoleCommands.cpp index 7c06b3ed3b..d3b7a305b9 100644 --- a/Sources/Plasma/FeatureLib/pfConsole/pfAudioConsoleCommands.cpp +++ b/Sources/Plasma/FeatureLib/pfConsole/pfAudioConsoleCommands.cpp @@ -97,10 +97,10 @@ PF_CONSOLE_CMD(Audio, Enable, "bool on", "Switch Audio on or off at runtime") plgAudioSys::Activate( on ); } -PF_CONSOLE_CMD(Audio, UseEAX, "bool on", "Enable EFX environmental sound") +PF_CONSOLE_CMD(Audio, UseEFX, "bool on", "Enable EFX environmental sound") { bool on = params[0]; - plgAudioSys::EnableEAX( on ); + plgAudioSys::EnableEFX( on ); } PF_CONSOLE_CMD(Audio, Initialize, "bool on", "Set to false to completely disable audio playback in plasma") diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp index 00f81746c4..06a16e42e8 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp @@ -214,19 +214,19 @@ void pyAudioControl::SetTwoStageLOD(bool state) } // Enable EFX environmental sound -void pyAudioControl::UseEAXAcceleration(bool state) +void pyAudioControl::UseEFXEnvironments(bool state) { - plgAudioSys::EnableEAX(state); + plgAudioSys::EnableEFX(state); } -bool pyAudioControl::IsUsingEAXAcceleration() const +bool pyAudioControl::IsUsingEFXEnvironments() const { - return plgAudioSys::UsingEAX(); + return plgAudioSys::UsingEFX(); } -bool pyAudioControl::IsEAXSupported() const +bool pyAudioControl::IsEFXSupported() const { - return plgAudioSys::IsEAXSupported(); + return plgAudioSys::IsEFXSupported(); } diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h index cbba936c18..bcab45d32e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h @@ -98,10 +98,10 @@ class pyAudioControl // ...Less of a performance hit, harder on memory. void SetTwoStageLOD(bool state); - // Enable EAX sound acceleration - void UseEAXAcceleration(bool state); - bool IsUsingEAXAcceleration() const; - bool IsEAXSupported() const; + // Enable EFX environmental audio + void UseEFXEnvironments(bool state); + bool IsUsingEFXEnvironments() const; + bool IsEFXSupported() const; // Mute or unmute all sounds void MuteAll(); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp index 24a6019090..51068ba78e 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp @@ -190,26 +190,26 @@ PYTHON_METHOD_DEFINITION(ptAudioControl, setTwoStageLOD, args) PYTHON_RETURN_NONE; } -PYTHON_METHOD_DEFINITION(ptAudioControl, useEAXAcceleration, args) +PYTHON_METHOD_DEFINITION(ptAudioControl, useEFXEnvironments, args) { char stateFlag; if (!PyArg_ParseTuple(args, "b", &stateFlag)) { - PyErr_SetString(PyExc_TypeError, "useEAXAcceleration expects a boolean"); + PyErr_SetString(PyExc_TypeError, "useEFXEnvironments expects a boolean"); PYTHON_RETURN_ERROR; } - self->fThis->UseEAXAcceleration(stateFlag != 0); + self->fThis->UseEFXEnvironments(stateFlag != 0); PYTHON_RETURN_NONE; } -PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isUsingEAXAcceleration) +PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isUsingEFXEnvironments) { - PYTHON_RETURN_BOOL(self->fThis->IsUsingEAXAcceleration()); + PYTHON_RETURN_BOOL(self->fThis->IsUsingEFXEnvironments()); } -PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isEAXSupported) +PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isEFXSupported) { - PYTHON_RETURN_BOOL(self->fThis->IsEAXSupported()); + PYTHON_RETURN_BOOL(self->fThis->IsEFXSupported()); } PYTHON_BASIC_METHOD_DEFINITION(ptAudioControl, muteAll, MuteAll) @@ -409,9 +409,9 @@ PYTHON_START_METHODS_TABLE(ptAudioControl) PYTHON_METHOD(ptAudioControl, setLoadOnDemand, "Params: state\nEnables or disables the load on demand for sounds."), PYTHON_METHOD(ptAudioControl, setTwoStageLOD, "Params: state\nEnables or disables two-stage LOD, where sounds can be loaded into RAM but not into sound buffers.\n" "...Less of a performance hit, harder on memory."), - PYTHON_METHOD(ptAudioControl, useEAXAcceleration, "Params: state\nEnables or disables EFX environmental sound."), - PYTHON_METHOD_NOARGS(ptAudioControl, isUsingEAXAcceleration, "Is EFX environmental sound enabled? Returns 1 if true otherwise returns 0."), - PYTHON_METHOD_NOARGS(ptAudioControl, isEAXSupported, "Is EFX environmental sound supported by the current device?"), + PYTHON_METHOD(ptAudioControl, useEFXEnvironments, "Params: state\nEnables or disables EFX environmental sound."), + PYTHON_METHOD_NOARGS(ptAudioControl, isUsingEFXEnvironments, "Is EFX environmental sound enabled? Returns 1 if true otherwise returns 0."), + PYTHON_METHOD_NOARGS(ptAudioControl, isEFXSupported, "Is EFX environmental sound supported by the current device?"), PYTHON_BASIC_METHOD(ptAudioControl, muteAll, "Mutes all sounds."), PYTHON_BASIC_METHOD(ptAudioControl, unmuteAll, "Unmutes all sounds."), PYTHON_METHOD_NOARGS(ptAudioControl, isMuted, "Are all sounds muted? Returns 1 if true otherwise returns 0."), diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp index ec12ef78f8..13a3d1a208 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp @@ -78,7 +78,7 @@ ST::string kDefaultDeviceMagic = ST_LITERAL("(Default Device)"); # define ALC_ALL_DEVICES_SPECIFIER 0x1013 #endif -plProfile_CreateTimer("EAX Update", "Sound", SoundEAXUpdate); +plProfile_CreateTimer("EFX Update", "Sound", SoundEFXUpdate); plProfile_CreateTimer("Soft Update", "Sound", SoundSoftUpdate); plProfile_CreateCounter("Max Sounds", "Sound", SoundMaxNum); plProfile_CreateTimer("AudioUpdate", "RenderSetup", AudioUpdate); @@ -105,14 +105,14 @@ plAudioSystem::plAudioSystem() fStartTime(), fListenerInit(), fDebugActiveSoundDisplay(), - fUsingEAX(), + fUsingEFX(), fRestartOnDestruct(), fWaitingForShutdown(), fActive(), fDisplayNumBuffers(), fStartFade(), fFadeLength(FADE_TIME), - fEAXSupported(), + fEFXSupported(), fLastUpdateTimeMs() { fCurrListenerPos.Set(-1.e30f, -1.e30f, -1.e30f); @@ -262,22 +262,22 @@ bool plAudioSystem::Init() // Detect EFX support. if (alcIsExtensionPresent(alcGetContextsDevice(alcGetCurrentContext()), "ALC_EXT_EFX")) - fEAXSupported = true; + fEFXSupported = true; // Attempt to init the EFX listener. - if (fEAXSupported && plgAudioSys::fEnableEAX) { + if (fEFXSupported && plgAudioSys::fEnableEFX) { ALCint iVerMajor, iVerMinor; alcGetIntegerv(fPlaybackDevice, ALC_EFX_MAJOR_VERSION, 1, &iVerMajor); alcGetIntegerv(fPlaybackDevice, ALC_EFX_MAJOR_VERSION, 1, &iVerMinor); plStatusLog::AddLineSF("audio.log", "ASYS: EFX v{}.{} available.", iVerMajor, iVerMinor); - fUsingEAX = plEAXListener::GetInstance().Init(); - if (fUsingEAX) + fUsingEFX = plEAXListener::GetInstance().Init(); + if (fUsingEFX) plStatusLog::AddLineS("audio.log", plStatusLog::kGreen, "ASYS: EFX support detected and enabled."); else plStatusLog::AddLineS("audio.log", plStatusLog::kRed, "ASYS: Unable to initialize environmental audio. EFX effects disabled."); } else { - fUsingEAX = false; + fUsingEFX = false; } plProfile_Set(SoundMaxNum, fMaxNumSounds); @@ -307,11 +307,11 @@ void plAudioSystem::Shutdown() fSoftRegionSounds.clear(); fActiveSofts.clear(); - for (auto rgn : fEAXRegions) + for (auto rgn : fEFXRegions) GetKey()->Release(rgn->GetKey()); - fEAXRegions.clear(); + fEFXRegions.clear(); plEAXListener::GetInstance().ClearProcessCache(); - if (fUsingEAX) + if (fUsingEFX) plEAXListener::GetInstance().Shutdown(); plSound::SetCurrDebugPlate(nullptr); @@ -330,7 +330,7 @@ void plAudioSystem::Shutdown() fPlaybackDevice = nullptr; fStartTime = 0; - fUsingEAX = false; + fUsingEFX = false; fCurrListenerPos.Set(-1.e30f, -1.e30f, -1.e30f); if (fRestartOnDestruct) { @@ -630,14 +630,14 @@ void plAudioSystem::IUpdateSoftSounds(const hsPoint3 &newPosition) if (sound->IsPropertySet(plSound::kPropIncidental)) color = 0xff00ffff; - if (fUsingEAX && sound->GetEAXSettings().IsEnabled()) { + if (fUsingEFX && sound->GetEFXSettings().IsEnabled()) { fDebugActiveSoundDisplay->AddLineF( color, "{} {1.2f} {1.2f} ({} occ) {}", sound->GetPriority(), soundIt->fRank, sound->GetVolume() ? sound->GetVolumeRank() / sound->GetVolume() : 0, - sound->GetEAXSettings().GetCurrSofts().GetOcclusion(), + sound->GetEFXSettings().GetCurrSofts().GetOcclusion(), sound->GetKeyName() ); } else { @@ -775,10 +775,10 @@ bool plAudioSystem::MsgReceive(plMessage* msg) if (hsTimer::GetMilliSeconds() - fLastUpdateTimeMs > UPDATE_TIME_MS) { IUpdateSoftSounds(fCurrListenerPos); - if (fUsingEAX) { - plProfile_BeginTiming(SoundEAXUpdate); - plEAXListener::GetInstance().ProcessMods(fEAXRegions); - plProfile_EndTiming(SoundEAXUpdate); + if (fUsingEFX) { + plProfile_BeginTiming(SoundEFXUpdate); + plEAXListener::GetInstance().ProcessMods(fEFXRegions); + plProfile_EndTiming(SoundEFXUpdate); } } plProfile_EndLap(AudioUpdate, this->GetKey()->GetUoid().GetObjectName()); @@ -788,10 +788,10 @@ bool plAudioSystem::MsgReceive(plMessage* msg) if (plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg)) { if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace)) { - fEAXRegions.insert(plEAXListenerMod::ConvertNoRef(refMsg->GetRef())); + fEFXRegions.insert(plEAXListenerMod::ConvertNoRef(refMsg->GetRef())); plEAXListener::GetInstance().ClearProcessCache(); } else if (refMsg->GetContext() & ( plRefMsg::kOnRemove | plRefMsg::kOnDestroy)) { - fEAXRegions.erase(plEAXListenerMod::ConvertNoRef(refMsg->GetRef())); + fEFXRegions.erase(plEAXListenerMod::ConvertNoRef(refMsg->GetRef())); plEAXListener::GetInstance().ClearProcessCache(); } return true; @@ -908,7 +908,7 @@ bool plgAudioSys::fActive = false; bool plgAudioSys::fMuted = true; bool plgAudioSys::fEnableSubtitles = true; bool plgAudioSys::fDelayedActivate = false; -bool plgAudioSys::fEnableEAX = false; +bool plgAudioSys::fEnableEFX = false; float plgAudioSys::fChannelVolumes[kNumChannels] = { 1.f, 1.f, 1.f, 1.f, 1.f, 1.f }; uint32_t plgAudioSys::fDebugFlags = 0; float plgAudioSys::fStreamingBufferSize = 2.f; @@ -958,9 +958,9 @@ void plgAudioSys::SetEnableSubtitles(bool b) fEnableSubtitles = b; } -void plgAudioSys::EnableEAX( bool b ) +void plgAudioSys::EnableEFX( bool b ) { - fEnableEAX = b; + fEnableEFX = b; if (fActive) Restart(); } @@ -974,17 +974,17 @@ void plgAudioSys::Restart() } } -bool plgAudioSys::UsingEAX() +bool plgAudioSys::UsingEFX() { if (fSys) - return fSys->fUsingEAX; + return fSys->fUsingEFX; return false; } -bool plgAudioSys::IsEAXSupported() +bool plgAudioSys::IsEFXSupported() { if (fSys) - return fSys->IsEAXSupported(); + return fSys->IsEFXSupported(); return false; } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h index a18aa1c992..fcefaa9e6a 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.h @@ -79,17 +79,17 @@ class plgAudioSys static void SetActive(bool b); static void SetMuted(bool b); static void SetEnableSubtitles(bool b); - static void EnableEAX(bool b); + static void EnableEFX(bool b); static bool Active() { return fInit; } static void Shutdown(); static void Activate(bool b); static bool IsMuted() { return fMuted; } static bool AreSubtitlesEnabled() { return fEnableSubtitles; } static void Restart(); - static bool UsingEAX(); + static bool UsingEFX(); - /** Does the current playback device support EAX? */ - static bool IsEAXSupported(); + /** Does the current playback device support EFX? */ + static bool IsEFXSupported(); static void NextDebugSound(); @@ -223,7 +223,7 @@ class plgAudioSys static float fChannelVolumes[kNumChannels]; static float fGlobalFadeVolume; static uint32_t fDebugFlags; - static bool fEnableEAX; + static bool fEnableEFX; static float fStreamingBufferSize; static uint8_t fPriorityCutoff; static bool fEnableExtendedLogs; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem_Private.h b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem_Private.h index db770669a9..d0c79e37f2 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem_Private.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plAudioSystem_Private.h @@ -100,7 +100,7 @@ class plAudioSystem : public hsKeyedObject std::vector GetCaptureDevices() const; ST::string GetDefaultCaptureDevice() const; - bool IsEAXSupported() const { return fEAXSupported; } + bool IsEFXSupported() const { return fEFXSupported; } void SetFadeLength(float lengthSec); @@ -127,10 +127,10 @@ class plAudioSystem : public hsKeyedObject plKey fCurrDebugSound; hsPoint3 fCurrListenerPos; - bool fActive, fUsingEAX, fRestartOnDestruct, fWaitingForShutdown; + bool fActive, fUsingEFX, fRestartOnDestruct, fWaitingForShutdown; int64_t fStartTime; - std::set fEAXRegions; + std::set fEFXRegions; hsPoint3 fLastPos; @@ -140,7 +140,7 @@ class plAudioSystem : public hsKeyedObject double fStartFade; float fFadeLength; unsigned int fMaxNumSources; - bool fEAXSupported; + bool fEFXSupported; double fLastUpdateTimeMs; bool OpenCaptureDevice(); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp index fc0c95d2fe..6718764f3a 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.cpp @@ -93,9 +93,9 @@ void plDSoundBuffer::IAllocate( uint32_t size, plWAVHeader &bufferDesc, bool fBufferSize = size; - // Do we want to try EAX? - if( plgAudioSys::UsingEAX() ) - fEAXSource.Init( this ); + // Do we want to try EFX? + if( plgAudioSys::UsingEFX() ) + fEFXSource.Init( this ); fValid = true; plProfile_Inc( NumAllocated ); @@ -109,7 +109,7 @@ void plDSoundBuffer::IRelease() Stop(); // Release stuff - fEAXSource.Release(); + fEFXSource.Release(); alSourcei(source, AL_BUFFER, 0); alDeleteSources(1, &source); if(buffer) @@ -693,11 +693,11 @@ bool plDSoundBuffer::IsPlaying() return state == AL_PLAYING; } -//// IsEAXAccelerated //////////////////////////////////////////////////////// +//// IsEFXAccelerated //////////////////////////////////////////////////////// -bool plDSoundBuffer::IsEAXAccelerated() const +bool plDSoundBuffer::IsEFXAccelerated() const { - return fEAXSource.IsValid(); + return fEFXSource.IsValid(); } //// bytePosToMSecs ////////////////////////////////////////////////////////// @@ -726,11 +726,11 @@ uint32_t plDSoundBuffer::GetLengthInBytes() const return fBufferSize; } -//// SetEAXSettings ////////////////////////////////////////////////////////// +//// SetEFXSettings ////////////////////////////////////////////////////////// -void plDSoundBuffer::SetEAXSettings( plEAXSourceSettings *settings, bool force ) +void plDSoundBuffer::SetEFXSettings( plEAXSourceSettings *settings, bool force ) { - fEAXSource.SetFrom( settings, source, force ); + fEFXSource.SetFrom( settings, source, force ); } //// GetBlockAlign /////////////////////////////////////////////////////////// diff --git a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h index 1969d7fccf..602de28460 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plDSoundBuffer.h @@ -92,7 +92,7 @@ class plDSoundBuffer bool IsValid() const { return fValid; } bool IsPlaying(); bool IsLooping() const { return fLooping; } - bool IsEAXAccelerated() const; + bool IsEFXAccelerated() const; bool FillBuffer(void *data, unsigned bytes, plWAVHeader *header); @@ -111,7 +111,7 @@ class plDSoundBuffer uint32_t GetBufferBytePos( float timeInSecs ) const; uint32_t bytePosToMSecs( uint32_t bytePos ) const; - void SetEAXSettings( plEAXSourceSettings *settings, bool force = false ); + void SetEFXSettings( plEAXSourceSettings *settings, bool force = false ); void SetTimeOffsetBytes(unsigned bytes); uint8_t GetBlockAlign() const; static uint32_t GetNumBuffers() { return fNumBuffers; } @@ -148,7 +148,7 @@ class plDSoundBuffer unsigned source; unsigned int fStreamingBufferSize; - plEAXSource fEAXSource; + plEAXSource fEFXSource; static uint32_t fNumBuffers; static float fDefaultMinDistance; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp index bce01dba64..5544d933a6 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.cpp @@ -742,10 +742,10 @@ bool plSound::MsgReceive( plMessage* pMsg ) { if (fSoftOcclusionRegion != nullptr) { - // The EAX settings have 0 as the start value and 1 as the end, and since start + // The EFX settings have 0 as the start value and 1 as the end, and since start // translates to "inside the soft region", it's reversed of what the region gives us - fEAXSettings.SetOcclusionSoftValue( 1.f - fSoftOcclusionRegion->GetListenerStrength() ); - IRefreshEAXSettings(); + fEFXSettings.SetOcclusionSoftValue( 1.f - fSoftOcclusionRegion->GetListenerStrength() ); + IRefreshEFXSettings(); } return true; } @@ -1264,10 +1264,10 @@ void plSound::IRead( hsStream *s, hsResMgr *mgr ) // Read in the data buffer key fDataBufferKey = mgr->ReadKey( s ); - // EAX params - fEAXSettings.Read( s ); + // EFX params + fEFXSettings.Read( s ); - // EAX soft keys + // EFX soft keys mgr->ReadKeyNotifyMe( s, new plGenRefMsg( GetKey(), plRefMsg::kOnCreate, 0, kRefSoftOcclusionRegion ), plRefFlags::kActiveRef ); } @@ -1300,10 +1300,10 @@ void plSound::IWrite( hsStream *s, hsResMgr *mgr ) else mgr->WriteKey( s, fDataBufferKey ); - // EAX params - fEAXSettings.Write( s ); + // EFX params + fEFXSettings.Write( s ); - // EAX Soft keys + // EFX Soft keys mgr->WriteKey( s, fSoftOcclusionRegion ); } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSound.h b/Sources/Plasma/PubUtilLib/plAudio/plSound.h index 9d72ccd9df..9533266b38 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plSound.h @@ -272,8 +272,8 @@ class plSound : public plSynchedObject static void SetLoadOnDemand( bool activate ) { fLoadOnDemandFlag = activate; } static void SetLoadFromDiskOnDemand( bool activate ) { fLoadFromDiskOnDemand = activate; } - const plEAXSourceSettings &GetEAXSettings() const { return fEAXSettings; } - plEAXSourceSettings &GetEAXSettings() { return fEAXSettings; } + const plEAXSourceSettings &GetEFXSettings() const { return fEFXSettings; } + plEAXSourceSettings &GetEFXSettings() { return fEFXSettings; } virtual StreamType GetStreamType() const { return kNoStream; } virtual void FreeSoundData(); @@ -313,8 +313,8 @@ class plSound : public plSynchedObject // Just around for reference and sending messages upward (synched state) plSceneObject *fOwningSceneObject; - // EAX Settings storage here - plEAXSourceSettings fEAXSettings; + // EFX Settings storage here + plEAXSourceSettings fEFXSettings; bool fQueued; plFadeParams fFadeInParams, fFadeOutParams; @@ -354,7 +354,7 @@ class plSound : public plSynchedObject virtual void ISetActualTime( double t ) = 0; virtual bool IActuallyLoaded() = 0; - virtual void IRefreshEAXSettings( bool force = false ) = 0; + virtual void IRefreshEFXSettings( bool force = false ) = 0; virtual float IGetChannelVolume() const; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp index 27e3e908e3..56f6ac6d9c 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plVoiceChat.cpp @@ -409,7 +409,7 @@ plVoiceSound::plVoiceSound() fPriority = 1; fType = plgAudioSys::kVoice; - fEAXSettings.SetRoomParams(-1200, -100, 0, 0); + fEFXSettings.SetRoomParams(-1200, -100, 0, 0); ST::string keyName = ST::format("VoiceSound_{}", fCount); fCount++; @@ -440,7 +440,7 @@ bool plVoiceSound::LoadSound(bool is3D) fDSoundBuffer->SetupVoiceSource(); IRefreshParams(); - IRefreshEAXSettings(true); + IRefreshEFXSettings(true); fDSoundBuffer->SetScalarVolume(1.0); return true; } diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp index 0ca8620210..84b0a22052 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32GroupedSound.cpp @@ -203,7 +203,7 @@ bool plWin32GroupedSound::LoadSound( bool is3D ) return false; } - IRefreshEAXSettings( true ); + IRefreshEFXSettings( true ); // Fill the buffer with whatever our current sound is. IFillCurrentSound( 0 ); diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp index ee5eb05b17..0eb7ff701d 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.cpp @@ -329,10 +329,10 @@ void plWin32Sound::IRefreshParams() plSound::IRefreshParams(); } -void plWin32Sound::IRefreshEAXSettings( bool force ) +void plWin32Sound::IRefreshEFXSettings( bool force ) { if (fDSoundBuffer != nullptr) - fDSoundBuffer->SetEAXSettings( &GetEAXSettings(), force ); + fDSoundBuffer->SetEFXSettings( &GetEFXSettings(), force ); } void plWin32Sound::IAddCallback( plEventCallbackMsg *pMsg ) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h index a56fe47e72..34c2b29671 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32Sound.h @@ -133,7 +133,7 @@ class plWin32Sound : public plSound void IRead(hsStream *s, hsResMgr *mgr) override; void IWrite(hsStream *s, hsResMgr *mgr) override; - void IRefreshEAXSettings(bool force = false) override; + void IRefreshEFXSettings(bool force = false) override; }; #endif //plWin32Sound_h diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp index da5be408ea..246a0c2aed 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StaticSound.cpp @@ -169,7 +169,7 @@ bool plWin32StaticSound::LoadSound( bool is3D ) } plProfile_EndTiming( StaticSndShoveTime ); - IRefreshEAXSettings( true ); + IRefreshEFXSettings( true ); fTotalBytes = bufferSize; diff --git a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp index 9ba4c932e0..874232e437 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp @@ -332,7 +332,7 @@ bool plWin32StreamingSound::LoadSound( bool is3D ) } FreeSoundData(); - IRefreshEAXSettings( true ); + IRefreshEFXSettings( true ); // Debug info ST::string dbg = ST::format(" Streaming {}.", fSrcFilename);