You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
5.8 KiB

/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef _pyAutoControl_h_
#define _pyAutoControl_h_
//////////////////////////////////////////////////////////////////////
//
// pyAudioControl - a wrapper class all the audio control functions
//
//////////////////////////////////////////////////////////////////////
#include "HeadSpin.h"
#include "pyGlueHelpers.h"
class pyAudioControl
{
protected:
pyAudioControl() {};
public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptAudioControl);
PYTHON_CLASS_NEW_DEFINITION;
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyAudioControl object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyAudioControl); // converts a PyObject to a pyAudioControl (throws error if not correct type)
static void AddPlasmaClasses(PyObject *m);
//-----------------------
// Audio settings
// Sets the master volume of a given audio channel
virtual void SetSoundFXVolume( float volume );
virtual void SetMusicVolume( float volume );
virtual void SetVoiceVolume( float volume );
virtual void SetAmbienceVolume( float volume );
virtual void SetGUIVolume( float volume );
virtual void SetNPCVoiceVolume( float volume );
virtual float GetSoundFXVolume();
virtual float GetMusicVolume();
virtual float GetVoiceVolume();
virtual float GetAmbienceVolume();
virtual float GetGUIVolume();
virtual float GetNPCVoiceVolume();
// Switch DirectX Audio on or off at runtime
virtual void Enable();
virtual void Disable();
12 years ago
virtual bool IsEnabled();
// Enable or disable load-on-demand for sounds
12 years ago
virtual void SetLoadOnDemand( bool state );
// Enables or disables two-stage LOD, where sounds can be loaded into RAM but not into sound buffers.
// ...Less of a performance hit, harder on memory.
12 years ago
virtual void SetTwoStageLOD( bool state );
// Enable audio hardware acceleration
12 years ago
virtual void UseHardwareAcceleration( bool state );
virtual bool IsHardwareAccelerated();
// Enable EAX sound acceleration (requires hardware acceleration)
12 years ago
virtual void UseEAXAcceleration( bool state );
virtual bool IsUsingEAXAcceleration();
// Mute or unmute all sounds
virtual void MuteAll();
virtual void UnmuteAll();
12 years ago
virtual bool IsMuted();
virtual void SetAudioSystemMode(int mode); // sets the current mode
virtual int GetAudioSystemMode(); // returns the current mode
virtual int GetHighestAudioMode(); // returns the highest mode the card is capable of handling
virtual int GetNumAudioDevices();
virtual const char *GetAudioDeviceName(int index);
virtual void SetDeviceName(const char *device, bool restart);
virtual const char *GetDeviceName();
//------------------------
// Voice Settings
// Sets the microphone volume, in the range of 0 to 1
12 years ago
virtual bool CanSetMicLevel();
virtual void SetMicLevel( float level );
virtual float GetMicLevel();
// turn voice recording on or off
12 years ago
virtual void EnableVoiceRecording( bool state );
virtual bool IsVoiceRecordingEnabled();
// turn voice compression on and off
12 years ago
virtual void EnableVoiceCompression( bool state );
virtual bool IsVoiceCompressionEnabled();
// turn voice-over-net on and off
12 years ago
virtual void EnableVoiceNetBroadcast( bool state );
virtual bool IsVoiceNetBroadcastEnabled();
12 years ago
void EnableVoiceChat(bool enable);
// turn voice recording icons on and off
virtual void ShowIcons();
virtual void HideIcons();
// turn push-to-talk on or off
12 years ago
virtual void PushToTalk( bool state );
// Set the squelch level
virtual void SquelchLevel( float level );
// Adjust voice packet frame size
virtual void RecordFrame( int32_t size );
// Set the sample rate for recording
virtual void RecordSampleRate( int32_t sample_rate );
virtual uint8_t GetPriorityCutoff( void );
virtual void SetPriorityCutoff( uint8_t cut );
// does the device specified support EAX
12 years ago
virtual bool SupportEAX(const char *deviceName);
};
#endif // _pyAudioControl_h_