7 #ifndef __IMP_AUDIO_H__
8 #define __IMP_AUDIO_H__
85 #define MAX_AUDIO_FRAME_NUM 50
212 int (*openEncoder)(
void *encoderAttr,
void
215 *data,
unsigned char *outbuf,
int *outLen);
216 int (*closeEncoder)(
void *encoder);
235 int (*openDecoder)(
void *decoderAttr,
void
237 int (*decodeFrm)(
void *decoder,
unsigned char
238 *inbuf,
int inLen,
unsigned short *outbuf,
int
240 int (*getFrmInfo)(
void *decoder,
void *info);
241 int (*closeDecoder)(
void *decoder);
1693 int IMP_AO_FlushChnBuf(
int audioDevId,
int aoChn);
uint8_t * stream
Data stream pointer.
Definition: imp_audio.h:189
int bufSize
buf size, in order to frame the unit, [2 ~ MAX_AUDIO_FRAME_NUM]
Definition: imp_audio.h:201
Medium level noise suppression.
Definition: imp_audio.h:257
int IMP_AI_EnableHpf(IMPAudioIOAttr *attr)
Enable audio input for high pass filtering.
44.1KHz sampling rate
Definition: imp_audio.h:102
Define audio encoding channel attribute structure.
Definition: imp_audio.h:199
Level_ns
Defines level of noise suppression.
Definition: imp_audio.h:255
IMPAudioSoundMode soundmode
Audio channel mode.
Definition: imp_audio.h:149
int TargetLevelDbfs
Gain level, the value of [0, 31], this refers to the target volume level, the unit is dB...
Definition: imp_audio.h:248
int IMP_AO_Soft_Mute(int audioDevId, int aoChn)
Output soft mute control.
int seq
Audio frame data serial number.
Definition: imp_audio.h:164
int IMP_ADEC_DestroyChn(int adChn)
Destory audio decoding channel.
int usrFrmDepth
Audio frame buffer depth.
Definition: imp_audio.h:172
16KHz sampling rate
Definition: imp_audio.h:100
void * value
Specific protocol attribute pointer.
Definition: imp_audio.h:226
Define the decoded channel attribute structure.
Definition: imp_audio.h:222
int IMP_AO_ClearChnBuf(int audioDevId, int aoChn)
Clear the current audio data cache in the audio output channel.
int IMP_AO_SetPubAttr(int audioDevId, IMPAudioIOAttr *attr)
Set audio input and output device attribute.
int IMP_AI_GetVol(int audioDevId, int aiChn, int *vol)
Get the volume of the audio input.
int IMP_AO_SetVolMute(int audioDevId, int aoChn, int mute)
Set audio output mute.
int IMP_AENC_SendFrame(int aeChn, IMPAudioFrame *frm)
Send audio encoding audio frame.
int IMP_AO_ResumeChn(int audioDevId, int aoChn)
Resume audio output channel.
int IMP_AI_DisableAgc(void)
Disable AI automatic gain feature.
int chnCnt
Number of channels supported.
Definition: imp_audio.h:152
int IMP_AI_DisableNs(void)
Disable noise suppression.
IMPAudioDecMode mode
Decoding mode.
Definition: imp_audio.h:225
Pack decoding.
Definition: imp_audio.h:139
int IMP_AO_SendFrame(int audioDevId, int aoChn, IMPAudioFrame *data, IMPBlock block)
Send audio output frame.
block
Definition: imp_audio.h:91
int IMP_AI_PollingFrame(int audioDevId, int aiChn, unsigned int timeout_ms)
Polling audio stream cache.
int frmNum
Number of cached frames, range: [2, MAX_AUDIO_FRAME_NUM].
Definition: imp_audio.h:150
int IMP_AO_GetGain(int audioDevId, int aoChn, int *aoGain)
Get audio output gain.
int IMP_AI_DisableAecRefFrame(int audioDevId, int aiChn, int audioAoDevId, int aoChn)
Close access to the reference frame.
int IMP_ADEC_ReleaseDecoder(int *handle)
Unregister Decoder.
int IMP_AO_QueryChnStat(int audioDevId, int aoChn, IMPAudioOChnState *status)
Query the current audio data cache status in the audio output channel.
int IMP_AO_EnableChn(int audioDevId, int aoChn)
Enable audio output channel.
int IMP_ADEC_ClearChnBuf(int adChn)
Clears the current audio data cache in the audio decode channel.
int IMP_AI_EnableChn(int audioDevId, int aiChn)
Enable audio input channel.
int IMP_AENC_PollingStream(int AeChn, unsigned int timeout_ms)
Polling encoded audio stream cache.
int IMP_AENC_CreateChn(int aeChn, IMPAudioEncChnAttr *attr)
Create audio encode channel.
int IMP_AI_SetPubAttr(int audioDevId, IMPAudioIOAttr *attr)
Set audio input device attribute.
int IMP_AI_EnableAgc(IMPAudioIOAttr *attr, IMPAudioAgcConfig agcConfig)
Enable automatic gain of audio input.
int IMP_AO_Disable(int audioDevId)
Disable audio output device.
int IMP_AI_SetChnParam(int audioDevId, int aiChn, IMPAudioIChnParam *chnParam)
Set audio input channel parameters.
int IMP_AO_DisableAgc(void)
Disable AO automatic gain feature.
int IMP_AO_PauseChn(int audioDevId, int aoChn)
Pause audio output channel.
int IMP_AI_GetPubAttr(int audioDevId, IMPAudioIOAttr *attr)
Get the attribute of the audio input device.
IMPAudioPalyloadType type
Audio payload data type.
Definition: imp_audio.h:200
int IMP_AO_Enable(int audioDevId)
Enable audio output device.
48KHz sampling rate
Definition: imp_audio.h:103
int IMP_AO_DisableChn(int audioDevId, int aoChn)
Disable audio output channel.
uint32_t * value
Protocol attribute pointer.
Definition: imp_audio.h:202
int IMP_AO_SetVol(int audioDevId, int aoChn, int aoVol)
Set audio output channel volume.
Low level noise suppression.
Definition: imp_audio.h:256
Define the encoder attribute structure.
Definition: imp_audio.h:208
8KHz sampling rate
Definition: imp_audio.h:99
int IMP_ADEC_PollingStream(int AdChn, unsigned int timeout_ms)
Polling decode audio stream cache.
IMPAudioDecMode
Define the decoding method.
Definition: imp_audio.h:138
int IMP_AI_GetGain(int audioDevId, int aiChn, int *aiGain)
Get AI gain value.
Audio frame structure.
Definition: imp_audio.h:158
int IMP_AI_EnableAec(int aiDevId, int aiChn, int aoDevId, int aoChn)
Enable audio echo cancellation feature of the specified audio input and audio output.
IMPBlock
Audio stream blocking type.
Definition: imp_audio.h:90
int IMP_AENC_DestroyChn(int aeChn)
Destory audio encode channel.
24KHz sampling rate
Definition: imp_audio.h:101
int IMP_ADEC_RegisterDecoder(int *handle, IMPAudioDecDecoder *decoder)
Register decoder.
int chnTotalNum
The total number of cached output channel.
Definition: imp_audio.h:180
int IMP_AI_DisableAec(int aiDevId, int aiChn)
Disable audio echo cancellation feature.
int IMP_AENC_ReleaseEncoder(int *handle)
Release encoder.
int IMP_AI_ReleaseFrame(int audioDevId, int aiChn, IMPAudioFrame *frm)
Release audio frame.
int IMP_AI_SetGain(int audioDevId, int aiChn, int aiGain)
Set audio input gain.
int maxFrmLen
Maximum code stream length.
Definition: imp_audio.h:210
IMPAudioPalyloadType
Define audio payload type enumeration.
Definition: imp_audio.h:125
int IMP_AI_GetFrame(int audioDevId, int aiChn, IMPAudioFrame *frm, IMPBlock block)
Get audio frame.
int IMP_AI_Disable(int audioDevId)
Disable audio input device.
Define AGC gain structure.
Definition: imp_audio.h:247
16bit sampling precision
Definition: imp_audio.h:111
int IMP_AI_DisableChn(int audioDevId, int aiChn)
Disable audio input channel.
int IMP_AO_Soft_UNMute(int audioDevId, int aoChn)
Output soft unmute control.
Define decoder attribute structure.
Definition: imp_audio.h:232
Define audio stream structure.
Definition: imp_audio.h:188
Data cache state structure of audio output channel.
Definition: imp_audio.h:179
int IMP_ADEC_SendStream(int adChn, IMPAudioStream *stream, IMPBlock block)
Send audio stream to audio decoding channel.
Stream decoding.
Definition: imp_audio.h:140
IMPAudioSoundMode
Audio channel mode definition.
Definition: imp_audio.h:117
int CompressionGaindB
Set the maximum gain value, [0, 90], 0 represents no gain, the greater the value, the higher the gain...
Definition: imp_audio.h:249
int IMP_AENC_RegisterEncoder(int *handle, IMPAudioEncEncoder *encoder)
Register encoder.
IMPAudioBitWidth
Audio sampling precision definition.
Definition: imp_audio.h:110
int IMP_AI_GetChnParam(int audioDevId, int aiChn, IMPAudioIChnParam *chnParam)
Set audio input channel parameters.
int IMP_AENC_ReleaseStream(int aeChn, IMPAudioStream *stream)
Releases the stream from the audio encoding channel.
High level noise suppression.
Definition: imp_audio.h:258
int IMP_AO_CacheSwitch(int audioDevId, int aoChn, int cache_en)
close audio play cache
int IMP_AO_EnableAgc(IMPAudioIOAttr *attr, IMPAudioAgcConfig agcConfig)
Enable audio output automatic gain feature.
int IMP_ADEC_CreateChn(int adChn, IMPAudioDecChnAttr *attr)
Create audio decode channel.
IMPAudioSampleRate
Audio sampling rate definition.
Definition: imp_audio.h:98
int IMP_AO_EnableHpf(IMPAudioIOAttr *attr)
Enable audio output for high pass filtering.
int IMP_AI_SetVolMute(int audioDevId, int aiChn, int mute)
Set audio input mute.
96KHz sampling rate
Definition: imp_audio.h:104
Double channel.
Definition: imp_audio.h:119
int Rev
retain
Definition: imp_audio.h:173
int len
Audio frame data length.
Definition: imp_audio.h:165
int IMP_AO_GetPubAttr(int audioDevId, IMPAudioIOAttr *attr)
Get audio input and output device attribute.
int IMP_AENC_GetStream(int aeChn, IMPAudioStream *stream, IMPBlock block)
Get the encoded stream.
Audio input and output device attribute.
Definition: imp_audio.h:146
int IMP_AI_GetFrameAndRef(int audioDevId, int aiChn, IMPAudioFrame *frm, IMPAudioFrame *ref, IMPBlock block)
Get audio frame and output reference frame.
uint32_t * virAddr
Audio frame data virtual address.
Definition: imp_audio.h:161
int chnBusyNum
The number of cache be used.
Definition: imp_audio.h:182
int IMP_AI_DisableHpf(void)
Disable AI high pass filtering function.
int IMP_AO_GetVol(int audioDevId, int aoChn, int *vol)
Get audio output channel volume.
int IMP_ADEC_GetStream(int adChn, IMPAudioStream *stream, IMPBlock block)
Get the decoded stream.
uint32_t phyAddr
Audio frame data physical address.
Definition: imp_audio.h:162
int numPerFrm
Number of sample points per frame.
Definition: imp_audio.h:151
int64_t timeStamp
Audio frame data time stamp.
Definition: imp_audio.h:163
int IMP_AI_Enable(int audioDevId)
Enable audio input device.
Single channel.
Definition: imp_audio.h:118
int chnFreeNum
Free cache blocks.
Definition: imp_audio.h:181
Maximum level noise suppression.
Definition: imp_audio.h:259
int IMP_ADEC_ReleaseStream(int adChn, IMPAudioStream *stream)
Release of the stream from the audio decoding channel.
int IMP_AO_SetGain(int audioDevId, int aoChn, int aoGain)
Set audio output gain.
not block
Definition: imp_audio.h:92
int IMP_AI_EnableNs(IMPAudioIOAttr *attr, int mode)
Enable specified audio input noise suppression.
IMPAudioBitWidth bitwidth
Audio sampling precision.
Definition: imp_audio.h:148
int IMP_AO_DisableHpf(void)
Disable AO high pass filtering function.
int IMP_AI_EnableAecRefFrame(int audioDevId, int aiChn, int audioAoDevId, int aoChn)
Open access reference frame.
Audio channel parameter structure.
Definition: imp_audio.h:171
IMPAudioSampleRate samplerate
Audio sampling rate.
Definition: imp_audio.h:147
int IMP_AI_SetVol(int audioDevId, int aiChn, int aiVol)
ACODEC configuration.