You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi~
I'm looking a way to extract the mucis/sound wave info into a int array.
I want to know, can I use miniaudio to get the music wave data?
I have try this which I don't it's right or not.
Absolutely. Just use ma_decode_file() or ma_decode_memory():
ma_decoder_configaudioConfig=ma_decoder_config_init(MY_FORMAT, MY_CHANNELS, MY_SAMPLE_RATE);
ma_uint64frameCount;
void*pAudioData;
result=ma_decode_file("my_file.wav", &audioConfig, &frameCount, &pAudioData);
if (result!=MA_SUCCESS) {
/* Error */
}
/* At this point the audio data will be in the format you specified in audioConfig. */
You set audioConfig to the audio format you want - just replace MY_FORMAT, etc. to whatever you want. If you need more flexibility you need to use the lower level decoding APIs. Free the pAudioData pointer with ma_free()
You don't need to create a device if you just want to decode audio data from a file.
Hi~
I'm looking a way to extract the mucis/sound wave info into a int array.
I want to know, can I use miniaudio to get the music wave data?
I have try this which I don't it's right or not.
Can I decode the music without playing it?
The text was updated successfully, but these errors were encountered: