Skip to content

Commit

Permalink
Remove dead code from ptAudioControl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoikas committed Jan 28, 2020
1 parent 3fb4da9 commit b2b2ba1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 68 deletions.
22 changes: 0 additions & 22 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 0 additions & 38 deletions Sources/Plasma/FeatureLib/pfPython/pyAudioControlGlue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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'."),
Expand Down

0 comments on commit b2b2ba1

Please sign in to comment.