nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
lc3_streamer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef LC3_STREAMER_H
8#define LC3_STREAMER_H
9
10#include <stddef.h>
11#include <stdint.h>
12#include <stdbool.h>
13#include <sys/types.h>
14
17 uint32_t bit_rate_bps;
19};
20
37int lc3_streamer_next_frame_get(const uint8_t streamer_idx, const uint8_t **const frame_buffer);
38
52bool lc3_streamer_file_compatible_check(const char *const filename,
53 const struct lc3_stream_cfg *const cfg);
54
71int lc3_streamer_stream_register(const char *const filename, uint8_t *const streamer_idx,
72 const bool loop);
73
80
94int lc3_streamer_file_path_get(const uint8_t streamer_idx, char *const path, const size_t path_len);
95
104bool lc3_streamer_is_looping(const uint8_t streamer_idx);
105
117int lc3_streamer_stream_close(const uint8_t streamer_idx);
118
126
137
138#endif /* LC3_STREAMER_H */
static const struct event_proxy_config cfg
Definition event_proxy_def.h:28
int lc3_streamer_stream_register(const char *const filename, uint8_t *const streamer_idx, const bool loop)
Register a new stream that will be played by the LC3 streamer.
bool lc3_streamer_file_compatible_check(const char *const filename, const struct lc3_stream_cfg *const cfg)
Verify that the LC3 header matches the stream configuration.
int lc3_streamer_stream_close(const uint8_t streamer_idx)
End a stream that's playing.
int lc3_streamer_next_frame_get(const uint8_t streamer_idx, const uint8_t **const frame_buffer)
Get the next frame for the stream.
uint8_t lc3_streamer_num_active_streams(void)
Get the number of active streams.
bool lc3_streamer_is_looping(const uint8_t streamer_idx)
Check if a stream is configured to loop.
int lc3_streamer_close_all_streams(void)
Close all streams and drain the work queue.
int lc3_streamer_file_path_get(const uint8_t streamer_idx, char *const path, const size_t path_len)
Get the file path for a stream.
int lc3_streamer_init(void)
Initializes the LC3 streamer.
uint32_t sample_rate_hz
Definition lc3_streamer.h:16
uint32_t bit_rate_bps
Definition lc3_streamer.h:17
uint32_t frame_duration_us
Definition lc3_streamer.h:18
Definition lc3_streamer.h:15