1 // SPDX-License-Identifier: BSD-3-Clause 2 // 3 // Copyright(c) 2022 Google LLC. 4 // 5 // Author: Per Ahgren <peah@google.com> 6 #ifndef GOOGLE_RTC_AUDIO_PROCESSING_SOF_MESSAGE_READER_H_ 7 #define GOOGLE_RTC_AUDIO_PROCESSING_SOF_MESSAGE_READER_H_ 8 9 #include <stdbool.h> 10 #include <stddef.h> 11 #include <stdint.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 // Parses the fields from a SOF config message `message` of size `message_size` 18 // intended for the GoogleRtcAudioProcessing component and the corresponding 19 // outputs parameters based on the content. Any previous content in the output 20 // parameters is overwritten regardless of the content in `message`. 21 void GoogleRtcAudioProcessingParseSofConfigMessage( 22 uint8_t *message, size_t message_size, 23 uint8_t **google_rtc_audio_processing_config, 24 size_t *google_rtc_audio_processing_config_size, 25 int *num_capture_input_channels, int *num_capture_output_channels, 26 float *aec_reference_delay, float *mic_gain, 27 bool *google_rtc_audio_processing_config_present, 28 bool *num_capture_input_channels_present, 29 bool *num_capture_output_channels_present, 30 bool *aec_reference_delay_present, bool *mic_gain_present); 31 32 #ifdef __cplusplus 33 } 34 #endif 35 36 #endif // GOOGLE_RTC_AUDIO_PROCESSING_SOF_MESSAGE_READER_H_ 37