sac_utils.h
Utility functions for the SPARK Audio Core.
- Copyright
Copyright (C) 2023 SPARK Microsystems International Inc. All rights reserved.
- License
This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.
- Author
SPARK FW Team.
Functions
-
sac_word_size_t sac_get_word_size_from_bit_depth(sac_bit_depth_t bit_depth)
Get the number of bytes used to store a sample of a given bit depth.
- Parameters:
bit_depth – [in] Sample bit depth.
- Returns:
Word size.
-
uint16_t sac_get_nb_packets_in_x_ms(uint16_t ms, uint16_t audio_payload_size, uint8_t nb_channel, sac_bit_depth_t sample_bit_depth, uint32_t sampling_rate)
Get the number of audio packets in a given amount of milliseconds.
- Parameters:
ms – [in] The number of milliseconds.
audio_payload_size – [in] The size of the audio payload in bytes.
nb_channel – [in] The number of audio channels.
sample_bit_depth – [in] The bit depth of the samples in the audio payload.
sampling_rate – [in] The sampling rate of the samples in the audio payload in Hz.
- Returns:
Number of audio packets, rounded down.