From b2b2ba1032e10d81a99a2acac77e8e6c3f726bb0 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 23 Sep 2019 16:06:58 -0400 Subject: [PATCH] Remove dead code from ptAudioControl. --- .../FeatureLib/pfPython/pyAudioControl.cpp | 22 ----------- .../FeatureLib/pfPython/pyAudioControl.h | 8 ---- .../pfPython/pyAudioControlGlue.cpp | 38 ------------------- 3 files changed, 68 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp index a10fa21c6a..2a37feeb07 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp @@ -279,28 +279,6 @@ bool pyAudioControl::IsVoiceRecordingEnabled() const } -// turn voice compression on and off -void pyAudioControl::EnableVoiceCompression(bool state) -{ -} - -bool pyAudioControl::IsVoiceCompressionEnabled() const -{ - return true; -} - - -// turn voice-over-net on and off -void pyAudioControl::EnableVoiceNetBroadcast(bool state) -{ - //plWinRecorder::EnableNetVoice(state); -} - -bool pyAudioControl::IsVoiceNetBroadcastEnabled() const -{ - return true; -} - void pyAudioControl::EnableVoiceChat(bool enable) { plVoicePlayer::Enable(enable); diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h index 45a862371c..efa3031d6b 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h @@ -127,14 +127,6 @@ class pyAudioControl void EnableVoiceRecording(bool state); bool IsVoiceRecordingEnabled() const; - // turn voice compression on and off - void EnableVoiceCompression(bool state); - bool IsVoiceCompressionEnabled() const; - - // turn voice-over-net on and off - void EnableVoiceNetBroadcast(bool state); - bool IsVoiceNetBroadcastEnabled() const; - void EnableVoiceChat(bool enable); // turn voice recording icons on and off diff --git a/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp b/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp index c8c2dc63fc..ec4cc192aa 100644 --- a/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp +++ b/Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp @@ -272,40 +272,6 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isVoiceRecordingEnabled) PYTHON_RETURN_BOOL(self->fThis->IsVoiceRecordingEnabled()); } -PYTHON_METHOD_DEFINITION(ptAudioControl, enableVoiceCompression, args) -{ - char stateFlag; - if (!PyArg_ParseTuple(args, "b", &stateFlag)) - { - PyErr_SetString(PyExc_TypeError, "enableVoiceCompression expects a boolean"); - PYTHON_RETURN_ERROR; - } - self->fThis->EnableVoiceCompression(stateFlag != 0); - PYTHON_RETURN_NONE; -} - -PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isVoiceCompressionEnabled) -{ - PYTHON_RETURN_BOOL(self->fThis->IsVoiceCompressionEnabled()); -} - -PYTHON_METHOD_DEFINITION(ptAudioControl, enableVoiceNetBroadcast, args) -{ - char stateFlag; - if (!PyArg_ParseTuple(args, "b", &stateFlag)) - { - PyErr_SetString(PyExc_TypeError, "enableVoiceNetBroadcast expects a boolean"); - PYTHON_RETURN_ERROR; - } - self->fThis->EnableVoiceNetBroadcast(stateFlag != 0); - PYTHON_RETURN_NONE; -} - -PYTHON_METHOD_DEFINITION_NOARGS(ptAudioControl, isVoiceNetBroadcastEnabled) -{ - PYTHON_RETURN_BOOL(self->fThis->IsVoiceNetBroadcastEnabled()); -} - PYTHON_BASIC_METHOD_DEFINITION(ptAudioControl, showIcons, ShowIcons) PYTHON_BASIC_METHOD_DEFINITION(ptAudioControl, hideIcons, HideIcons) @@ -453,10 +419,6 @@ PYTHON_START_METHODS_TABLE(ptAudioControl) PYTHON_METHOD_NOARGS(ptAudioControl, getMicLevel, "Returns the microphone recording level (0.0 to 1.0)."), PYTHON_METHOD(ptAudioControl, enableVoiceRecording, "Params: state\nEnables or disables voice recording."), PYTHON_METHOD_NOARGS(ptAudioControl, isVoiceRecordingEnabled, "Is voice recording enabled? Returns 1 if true otherwise returns 0."), - PYTHON_METHOD(ptAudioControl, enableVoiceCompression, "Params: state\nEnables or disables voice compression."), - PYTHON_METHOD_NOARGS(ptAudioControl, isVoiceCompressionEnabled, "Is voice compression enabled? Returns 1 if true otherwise returns 0."), - PYTHON_METHOD(ptAudioControl, enableVoiceNetBroadcast, "Params: state\nEnables or disables voice over network broadcast."), - PYTHON_METHOD_NOARGS(ptAudioControl, isVoiceNetBroadcastEnabled, "Is voice over net enabled? Returns 1 if true otherwise returns 0."), PYTHON_BASIC_METHOD(ptAudioControl, showIcons, "Shows (enables) the voice recording icons."), PYTHON_BASIC_METHOD(ptAudioControl, hideIcons, "Hides (disables) the voice recording icons."), PYTHON_METHOD(ptAudioControl, pushToTalk, "Params: state\nEnables or disables 'push-to-talk'."),