nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
audio_system.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _AUDIO_SYSTEM_H_
8#define _AUDIO_SYSTEM_H_
9
10#include <stddef.h>
11#include <stdbool.h>
12#include <stdint.h>
13
14#define VALUE_NOT_SET 0
15
20
28
40
50
63int audio_system_config_set(uint32_t encoder_sample_rate_hz, uint32_t encoder_bitrate,
64 uint32_t decoder_sample_rate_hz);
65
75int audio_system_decode(void const *const encoded_data, size_t encoded_data_size, bool bad_frame);
76
81
86
96
103
110
111#endif /* _AUDIO_SYSTEM_H_ */
void audio_system_stop(void)
Stop all activities related to audio.
int audio_system_decoder_num_ch_get(void)
Get number of decoder channels.
int audio_system_init(void)
Initialize the audio_system.
int audio_system_encode_test_tone_set(uint32_t freq)
Toggle a test tone on and off.
void audio_system_encoder_stop(void)
Stop the encoder thread from executing.
int audio_system_fifo_rx_block_drop(void)
Drop oldest block from the fifo_rx buffer.
void audio_system_encoder_start(void)
Start the execution of the encoder thread.
int audio_system_encode_test_tone_step(void)
Step through different test tones.
int audio_system_config_set(uint32_t encoder_sample_rate_hz, uint32_t encoder_bitrate, uint32_t decoder_sample_rate_hz)
Set the sample rates for the encoder and the decoder, and the bit rate for encoder.
int audio_system_decode(void const *const encoded_data, size_t encoded_data_size, bool bad_frame)
Decode data and then add it to TX FIFO buffer.
void audio_system_start(void)
Initialize and start both HW and SW audio codec.