sipxmedialib  Version 3.3
MpCodec.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005-2008 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 #ifndef _INCLUDED_MPCODEC_H /* [ */
15 #define _INCLUDED_MPCODEC_H
16 
17 #include <os/OsStatus.h>
18 #include <utl/UtlBool.h>
19 /*************************************************************************/
20 
21 /* MCP/Codec interface: */
22 
23 typedef enum {
32 
33 #define CODEC_ENABLE_HANDSET_SPKR CODEC_ENABLE_SPKR1
34 #define CODEC_ENABLE_BASE_SPKR CODEC_ENABLE_SPKR2
35 #define CODEC_ENABLE_HEADSET_SPKR CODEC_ENABLE_SPKR3
36 #define CODEC_ENABLE_EXTERNAL_SPKR_MONO CODEC_ENABLE_SPKR4
37 #define CODEC_ENABLE_EXTERNAL_SPKR_STEREO CODEC_ENABLE_SPKR5
38 #define CODEC_ENABLE_EXTERNAL_SPKR (CODEC_ENABLE_SPKR4 | CODEC_ENABLE_SPKR5)
39 #define CODEC_ENABLE_RINGER_SPKR CODEC_ENABLE_SPKR6
40 
41 #define START_GAIN 25
42 #define START_VOLUME 60
43 #define MIC_GAIN_MIN 0
44 #define MIC_GAIN_MAX 100
45 
46 extern OsStatus MpCodecOpen(int sampleRate, int gain, int volume);
47 
48 extern UtlBoolean MpCodec_isBaseSpeakerOn(void);
49 extern UtlBoolean MpCodec_isHeadsetSpeakerOn(void);
50 extern UtlBoolean MpCodec_isHandsetSpeakerOn(void);
51 
52 extern OsStatus MpCodec_getVolumeRange(
53  int& low,
54  int& high,
55  int& nominal,
56  int& stepsize,
57  int& mute,
58  int& splash,
59  MpCodecSpkrChoice Choice);
60 
61 extern int MpCodec_getInputMixerId(void);
62 extern int MpCodec_getGain(void);
63 extern int MpCodec_getVolume(void);
64 extern OsStatus MpCodec_setInputMixerId(unsigned int newmixerid);
65 extern OsStatus MpCodec_setGain(int newgain);
66 extern OsStatus MpCodec_setVolume(int newvolume);
67 
68 #endif /* _INCLUDED_MPCODEC_H ] */
Definition: MpCodec.h:26
MpCodecSpkrChoice
Definition: MpCodec.h:23
OsStatus MpCodec_getVolumeRange(int &low, int &high, int &nominal, int &stepsize, int &mute, int &splash, MpCodecSpkrChoice Choice)
Definition: MpCodec.cpp:356
UtlBoolean MpCodec_isHeadsetSpeakerOn(void)
the headset speaker
int MpCodec_getVolume(void)
Definition: MpCodec.h:30
OsStatus MpCodec_setVolume(int newvolume)
UtlBoolean MpCodec_isBaseSpeakerOn(void)
the speakerphone speaker
int MpCodec_getGain(void)
OsStatus MpCodecOpen(int sampleRate, int gain, int volume)
UtlBoolean MpCodec_isHandsetSpeakerOn(void)
the handset speaker
OsStatus MpCodec_setGain(int newgain)
Definition: MpCodec.h:24
Definition: MpCodec.h:25
Definition: MpCodec.h:27
OsStatus MpCodec_setInputMixerId(unsigned int newmixerid)
Definition: MpCodec.h:29
int MpCodec_getInputMixerId(void)
Definition: MpCodec.h:28