13 #ifndef _MpidAndroid_h_ 14 #define _MpidAndroid_h_ 21 #include <utils/threads.h> 51 AUDIO_SOURCE_DEFAULT = 0,
53 AUDIO_SOURCE_VOICE_UPLINK = 2,
54 AUDIO_SOURCE_VOICE_DOWNLINK = 3,
55 AUDIO_SOURCE_VOICE_CALL = 4,
56 AUDIO_SOURCE_CAMCORDER = 5,
57 AUDIO_SOURCE_VOICE_RECOGNITION = 6,
58 AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION,
84 unsigned samplesPerSec,
88 virtual OsStatus disableDevice();
103 virtual UtlBoolean isDeviceValid();
126 int mBufInternalSamples;
129 Condition mWaitCbkCond;
137 static const int mpSampleRatesList[];
138 static const int mSampleRatesListLen;
142 bool initAudioRecord();
145 bool probeSampleRate(
int targetRate,
int targetFrameSize,
146 const int *ratesList,
int ratesListLen,
147 bool probeDefault=
true);
150 static void audioCallback(
int event,
void* user,
void *info);
164 #endif // _MpidAndroid_h_
Driver has been successfully initialized and is not playing.
Definition: MpidAndroid.h:112
Generic audio resampler.
Definition: MpResampler.h:34
uint32_t MpFrameTime
Definition: MpTypes.h:53
Driver is stopping.
Definition: MpidAndroid.h:115
Driver is being initialized or initialization failed.
Definition: MpidAndroid.h:111
MpAndroidAudioRecord * mpAudioRecord
Pointer to audio track used for record.
Definition: MpidAndroid.h:122
Mutex mLock
Definition: MpidAndroid.h:128
audio_source
Audio input source. Refer to Android OS sources.
Definition: MpidAndroid.h:50
int16_t MpAudioSample
Definition: MpTypes.h:44
DriverState
Definition: MpidAndroid.h:110
Driver is starting playing.
Definition: MpidAndroid.h:113
Driver is stopped: the AudioRecord will be stopped.
Definition: MpidAndroid.h:116
int mSamplesPerSecInternal
Sample rate of AudioRecord.
Definition: MpidAndroid.h:123
DriverState mState
Driver internal state.
Definition: MpidAndroid.h:120
Audio input driver for Android OS.
Definition: MpidAndroid.h:40
audio_source mStreamSource
Source of a stream we're recording.
Definition: MpidAndroid.h:119
Driver is playing.
Definition: MpidAndroid.h:114
MpAudioSample * mpBufInternal
full buffer. Have mSamplesPerFrameInternal size.
Definition: MpidAndroid.h:125
int mSamplesPerFrameInternal
Number of sample per frame we use with AudioRecord.
Definition: MpidAndroid.h:124
Audio input driver for Android OS.
Definition: MpAndroidAudioRecord.h:34