Skip to content

I cannot convert pcm data correctly #1021

@Wanxiaace

Description

@Wanxiaace

I try to convert pcm data, using ma_data_converter
[input] : format : s32, sample rate: 44100 channels : 2
I want to convert it to
[target] : format : s16, sample rate: 48000, channels: 2
but it doesn't work

I tried to debug it and found that after calling ma_data_converter_init , the executepath of the data_converter was set to ma_data_converter_execution_path_resample_only, it didn`t convert the format, I dont know why

source code:

ma_data_converter_config converterConfig = ma_data_converter_config_init(
	buffer.outputFormat, MINIMUSIC_SAMPLE_FORMAT,
	buffer.outputChannels, MINIMUSIC_CHANNELS,
	buffer.outputSampleRate, MINIMUSIC_SAMPLE_RATE);
ma_data_converter converter;
ma_data_converter_init(&converterConfig, NULL, &converter);
// i got ma_data_converter_execution_path_resample_only

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions