Skip to content

Commit

Permalink
Rename obsolete references from EAX to EFX.
Browse files Browse the repository at this point in the history
Where possible, this updates outdated references from EAX to EFX.

# Conflicts:
#	Sources/Plasma/PubUtilLib/plAudio/plAudioSystem.cpp
  • Loading branch information
Deledrius committed Feb 21, 2025
1 parent b567a30 commit 318cdb1
Show file tree
Hide file tree
Showing 22 changed files with 144 additions and 144 deletions.
12 changes: 6 additions & 6 deletions Scripts/Python/plasma/Plasma.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions Scripts/Python/xIniAudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
74 changes: 37 additions & 37 deletions Scripts/Python/xOptionsMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down Expand Up @@ -346,7 +346,7 @@ class _KeyLine(NamedTuple):
kAudioModeCBID02 = 753
kAudioModeCBID03 = 754
kAudioModeTextID = 755
kAudioModeEAXTextID = 757
kAudioModeEFXTextID = 757

kGSEnableVoiceChat=340

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() )

Expand Down Expand Up @@ -1613,32 +1613,32 @@ 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

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")
Expand Down
2 changes: 1 addition & 1 deletion Sources/MaxPlugin/MaxComponent/plAudioComponents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You can contact Cyan Worlds, Inc. by email [email protected]
#include "MaxMain/plMaxCFGFile.h"
#include "plPickNode.h"

// EAX stuff
// EFX stuff
#include "plAudio/plEAXListenerMod.h"
#include "plAudio/plEAXStructures.h"

Expand Down
2 changes: 1 addition & 1 deletion Sources/Plasma/Apps/plClient/plClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ void plClient::IWriteDefaultAudioSettings(const plFileName& destFile)
{
std::unique_ptr<hsStream> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
12 changes: 6 additions & 6 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down
8 changes: 4 additions & 4 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
20 changes: 10 additions & 10 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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."),
Expand Down
Loading

0 comments on commit 318cdb1

Please sign in to comment.