Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/include/IAMF_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ typedef struct IAMF_StreamInfo {
IA_Profile additional_profile; /**< Additional IAMF profile */

IAMF_CodecID codec_ids[IAMF_MAX_CODECS];
IAMF_SampleBitDepth sampling_rate; /**< Output sampling rate */
IAMF_SamplingRate sampling_rate; /**< Output sampling rate */
/**< Number of samples per channel per frame */
uint32_t samples_per_channel_in_frame;

Expand Down Expand Up @@ -284,7 +284,7 @@ int IAMF_decoder_set_normalization_loudness(IAMF_DecoderHandle handle,
* @brief Set pcm output bitdepth.
* @param [in] handle : iamf decoder handle.
* @param [in] bit_depth : target bit depth in bit. Must be one of the
* values defined in @ref iamf_sample_bit_depth_t
* values defined in @ref IAMF_SampleBitDepth
* (16, 24, or 32 bits).
* @return @ref IAErrCode.
*/
Expand Down Expand Up @@ -320,7 +320,7 @@ float IAMF_decoder_peak_limiter_get_threshold(IAMF_DecoderHandle handle);
* @brief Set pcm output sampling rate.
* @param [in] handle : iamf decoder handle.
* @param [in] rate : sampling rate. Must be one of the values defined in
* @ref IAMF_SampleBitDepth (7350, 8000, 11025, 16000,
* @ref IAMF_SamplingRate (7350, 8000, 11025, 16000,
* 22050, 24000, 32000, 44100, 48000, 64000, 88200,
* 96000, 176400, or 192000 Hz).
* @return @ref IAErrCode.
Expand Down
4 changes: 2 additions & 2 deletions code/src/iamf_dec/iamf_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ float IAMF_decoder_peak_limiter_get_threshold(IAMF_DecoderHandle handle) {

int IAMF_decoder_set_sampling_rate(IAMF_DecoderHandle handle, uint32_t rate) {
iamf_decoder_t *self = (iamf_decoder_t *)handle;
IAMF_SampleBitDepth valid_sampling_rates[] = {
IAMF_SamplingRate valid_sampling_rates[] = {
SAMPLING_RATE_8000, SAMPLING_RATE_11025, SAMPLING_RATE_16000,
SAMPLING_RATE_22050, SAMPLING_RATE_24000, SAMPLING_RATE_32000,
SAMPLING_RATE_44100, SAMPLING_RATE_48000, SAMPLING_RATE_64000,
Expand All @@ -1048,7 +1048,7 @@ int IAMF_decoder_set_sampling_rate(IAMF_DecoderHandle handle, uint32_t rate) {
if (!self) return IAMF_ERR_BAD_ARG;

for (int i = 0;
i < sizeof(valid_sampling_rates) / sizeof(IAMF_SampleBitDepth); ++i) {
i < sizeof(valid_sampling_rates) / sizeof(IAMF_SamplingRate); ++i) {
if (rate == valid_sampling_rates[i]) {
if (rate != self->ctx.sampling_rate) self->ctx.sampling_rate = rate;
ret = IAMF_OK;
Expand Down
Loading