sipxmedialib  Version 3.3
Macros | Enumerations | Functions
MpCodec.h File Reference
#include <os/OsStatus.h>
#include <utl/UtlBool.h>
Include dependency graph for MpCodec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CODEC_ENABLE_HANDSET_SPKR   CODEC_ENABLE_SPKR1
 
#define CODEC_ENABLE_BASE_SPKR   CODEC_ENABLE_SPKR2
 
#define CODEC_ENABLE_HEADSET_SPKR   CODEC_ENABLE_SPKR3
 
#define CODEC_ENABLE_EXTERNAL_SPKR_MONO   CODEC_ENABLE_SPKR4
 
#define CODEC_ENABLE_EXTERNAL_SPKR_STEREO   CODEC_ENABLE_SPKR5
 
#define CODEC_ENABLE_EXTERNAL_SPKR   (CODEC_ENABLE_SPKR4 | CODEC_ENABLE_SPKR5)
 
#define CODEC_ENABLE_RINGER_SPKR   CODEC_ENABLE_SPKR6
 
#define START_GAIN   25
 
#define START_VOLUME   60
 
#define MIC_GAIN_MIN   0
 Minimal microphone gain. This gain will mute mic. More...
 
#define MIC_GAIN_MAX   100
 Maximal microphone gain. More...
 

Enumerations

enum  MpCodecSpkrChoice {
  CODEC_DISABLE_SPKR =0, CODEC_ENABLE_SPKR1 =(1<<0), CODEC_ENABLE_SPKR2 =(1<<1), CODEC_ENABLE_SPKR3 =(1<<2),
  CODEC_ENABLE_SPKR4 =(1<<3), CODEC_ENABLE_SPKR5 =(1<<4), CODEC_ENABLE_SPKR6 =(1<<5)
}
 

Functions

OsStatus MpCodecOpen (int sampleRate, int gain, int volume)
 
UtlBoolean MpCodec_isBaseSpeakerOn (void)
 the speakerphone speaker More...
 
UtlBoolean MpCodec_isHeadsetSpeakerOn (void)
 the headset speaker More...
 
UtlBoolean MpCodec_isHandsetSpeakerOn (void)
 the handset speaker More...
 
OsStatus MpCodec_getVolumeRange (int &low, int &high, int &nominal, int &stepsize, int &mute, int &splash, MpCodecSpkrChoice Choice)
 
int MpCodec_getInputMixerId (void)
 
int MpCodec_getGain (void)
 
int MpCodec_getVolume (void)
 
OsStatus MpCodec_setInputMixerId (unsigned int newmixerid)
 
OsStatus MpCodec_setGain (int newgain)
 
OsStatus MpCodec_setVolume (int newvolume)
 

Macro Definition Documentation

#define CODEC_ENABLE_HANDSET_SPKR   CODEC_ENABLE_SPKR1
#define CODEC_ENABLE_BASE_SPKR   CODEC_ENABLE_SPKR2
#define CODEC_ENABLE_HEADSET_SPKR   CODEC_ENABLE_SPKR3
#define CODEC_ENABLE_EXTERNAL_SPKR_MONO   CODEC_ENABLE_SPKR4
#define CODEC_ENABLE_EXTERNAL_SPKR_STEREO   CODEC_ENABLE_SPKR5
#define CODEC_ENABLE_EXTERNAL_SPKR   (CODEC_ENABLE_SPKR4 | CODEC_ENABLE_SPKR5)
#define CODEC_ENABLE_RINGER_SPKR   CODEC_ENABLE_SPKR6
#define START_GAIN   25
#define START_VOLUME   60
#define MIC_GAIN_MIN   0

Minimal microphone gain. This gain will mute mic.

#define MIC_GAIN_MAX   100

Maximal microphone gain.

Enumeration Type Documentation

Enumerator
CODEC_DISABLE_SPKR 
CODEC_ENABLE_SPKR1 
CODEC_ENABLE_SPKR2 
CODEC_ENABLE_SPKR3 
CODEC_ENABLE_SPKR4 
CODEC_ENABLE_SPKR5 
CODEC_ENABLE_SPKR6 

Function Documentation

OsStatus MpCodecOpen ( int  sampleRate,
int  gain,
int  volume 
)
UtlBoolean MpCodec_isBaseSpeakerOn ( void  )

the speakerphone speaker

UtlBoolean MpCodec_isHeadsetSpeakerOn ( void  )

the headset speaker

UtlBoolean MpCodec_isHandsetSpeakerOn ( void  )

the handset speaker

OsStatus MpCodec_getVolumeRange ( int &  low,
int &  high,
int &  nominal,
int &  stepsize,
int &  mute,
int &  splash,
MpCodecSpkrChoice  Choice 
)
Parameters
lowlowest value
highhighest value
nominallow <= nominal <= high
stepsizein .1 dB
muteinput value to mute
splashvalue to use during startup
int MpCodec_getInputMixerId ( void  )
int MpCodec_getGain ( void  )
int MpCodec_getVolume ( void  )
OsStatus MpCodec_setInputMixerId ( unsigned int  newmixerid)
OsStatus MpCodec_setGain ( int  newgain)
OsStatus MpCodec_setVolume ( int  newvolume)