struct aec_params { int num_mic_channels; int num_reference_channels; int num_playback_channels; int mic_sampling_rate_hz; int playback_sampling_rate_hz;
};
/* Initialize AEC object. *Thismustbecalledwhentheaudiodeviceisopened. *ALSAdevicemutexmustbeheldbeforecallingthisAPI.
* Returns -EINVAL if AEC object fails to initialize, else returns 0. */ int init_aec(struct aec_params* params, struct aec_t** aec_ptr);
/* Release AEC object.
* This must be called when the audio device is closed. */ void release_aec(struct aec_t* aec);
/* Clear reference configuration for AEC.
* Must be called when the output stream is closed. */ void destroy_aec_reference_config (struct aec_t *aec);
/* Initialize microphone configuration for AEC. *Mustbecalledwhenanewinputstreamisopened. *Returns-EINVALifanyprocessingblockfailstoinitialize,
* else returns 0. */ int init_aec_mic_config(struct aec_t* aec, struct alsa_stream_in* in);
/* Clear microphone configuration for AEC.
* Must be called when the input stream is closed. */ void destroy_aec_mic_config (struct aec_t *aec);
/* Used to communicate playback state (running or not) to AEC interface.
* This is used by process_aec() to determine if AEC processing is to be run. */ void aec_set_spk_running (struct aec_t *aec, bool state);
/* Used to communicate playback state (running or not) to the caller. */ bool aec_get_spk_running(struct aec_t* aec);
/* Write audio samples to AEC reference FIFO for use in AEC. *BothaudiosamplesandtimestampsareaddedinFIFOfashion. *MustbecalledaftereverywritetoPCM.
* Returns -ENOMEM if the write fails, else returns 0. */ int write_to_reference_fifo(struct aec_t* aec, void* buffer, struct aec_info* info);
/* Get reference audio samples + timestamp, in the format expected by AEC, *i.e.samesamplerateandbitrateasmicrophoneaudio. *Timestampisupdatedinfield'timestamp_usec',andnotin'timestamp'. *Returns: *-EINVALiftheAECobjectisinvalid. *-ENOMEMifthereferenceFIFOoverflowsoriscorrupted. *-ETIMEDOUTifwetimedoutwaitingfortherequestednumberofbytes
* 0 otherwise */ int get_reference_samples(struct aec_t* aec, void* buffer, struct aec_info* info);
#ifdef AEC_HAL
/* Processing function call for AEC. *AECoutputisupdatedatlocationpointedtoby'buffer'. *ThisfunctiondoesnotrunAECwhenthereisnoplayback- *ascommunicatedtothisAECinterfaceusingaec_set_spk_running().
* Returns -EINVAL if processing fails, else returns 0. */ int process_aec(struct aec_t* aec, void* buffer, struct aec_info* info);
#else/* #ifdef AEC_HAL */
#define process_aec(...) ((int)0)
#endif/* #ifdef AEC_HAL */
#endif/* _AUDIO_AEC_H_ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-06-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.