1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef FEEDBACK_H_ 8 #define FEEDBACK_H_ 9 10 #include <stdint.h> 11 12 /* This sample is currently supporting only 48 kHz sample rate. */ 13 #define SAMPLE_RATE 48000 14 15 struct feedback_ctx *feedback_init(void); 16 void feedback_reset_ctx(struct feedback_ctx *ctx, bool microframes); 17 void feedback_process(struct feedback_ctx *ctx); 18 void feedback_start(struct feedback_ctx *ctx, int i2s_blocks_queued, 19 bool microframes); 20 uint32_t feedback_value(struct feedback_ctx *ctx); 21 #define SAMPLES_PER_SOF 48 22 #endif /* FEEDBACK_H_ */ 23