-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
After messing around with the gui and felt comfortable with using it, it is time for doing some audio, but seems I have faced some issues on loading .wav files using zaudio.
In the original mini_audio, there is a type called the ma_decoder, and it is used for decoding the incoming .wav files like shown:
// from main:
result = ma_decoder_init_file(argv[1], NULL, &decoder); // where argv[1] is the name of the audio file
if (result != MA_SUCCESS) {
printf("Could not load file: %s\n", argv[1]);
return -2;
}
// ... after some device configs
ma_decoder decoder;
deviceConfig.pUserData = &decoder;
// from the data_callback:
ma_decoder* pDecoder = (ma_decoder*)pDevice->pUserData;
We need to load the decoder into the user data and cast it during the audio callback, but in the zaudio version, I don't seem to find anything related the ma_decoder. Has the naming changed or there are alternatives with this type in the low level setup?
Metadata
Metadata
Assignees
Labels
No labels