Problems with update from Version 10 to Version 11 #757
Replies: 1 comment
-
For log levels, 0.11.x will now post all errors regardless of log level which makes those old defines redundant. So your change is correct - just remove them. If you want to filter your log levels simply inspect the log level in your log callback and filter it as per your needs. The For the For the Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Until today I' using MiniAudio V 10.37 in combination with a Wrapper to access it from the language BlitzMax NG. It works perfect
Now I tried to update to MiniAudio V 11.xx and got many problem in my wrapper.c code.
First question is: Is their a Update guide to get from V10 to V11? This would be very helpful to have a explanation what has to be done now.
Problems in details:
Problem 1: MA_LOG_LEVEL
First problem were this two lines:
This worked in V10, but throws errors in V11. As a workaroud I commented out both lines, which removes the error messages. But I want to know what is the correct use now.
Problem 2: ma_resource_format_wav
this line in my wrapper.c fails:
ma_encoder_config config = ma_encoder_config_init(ma_resource_format_wav, format, channels, hertz);
It looks like only the wording changes? I replaced this with ma_encoding_format_wav and it looks like working
The word "ma_encoding_format_wav" does not appear in the changes.md, but this sentence appears:
I gues this is related to the problem? Is it sufficient only to use the new wording?
Problem 3: ma_encoder_write_pcm_frames
this line in my wrapper.c fails:
int framesWritten = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, frames);
with an error message:
In the latest version of miniaudio.h I can read in line 2678 (manual part of the file):
I think this is an source code ISSUE, and needs to be updated? As I can see in line 65752 that the function now has 4 parameters:
MA_API ma_result ma_encoder_write_pcm_frames(ma_encoder* pEncoder, const void* pFramesIn, ma_uint64 frameCount, ma_uint64* pFramesWritten)
But there is no explanation how to handle it now. As my C-Skills are very basic I do not understand how to update my related code line.
int framesWritten = ma_encoder_write_pcm_frames(&encoder, pPCMFramesToWrite, frames);
Problem 4: ma_device_callback_proc
The last error message I have in this line in my wrapper.c:
void MM_SetDeviceConfig (struct ma_device_config *config, int playformat, int playchannels, int captformat, int captchannels, int hertz, ma_device_callback_proc Callback) {
The error message says: error: unknown type name 'ma_device_callback_proc'. But no advise in the changes.md. The compiler suggests to use now: 'ma_enum_devices_callback_proc'. But is that the solution?
To both keywords ma_device_callback_proc and ma_enum_devices_callback_proc I cannot find anything in the changes.md
Can somebody please help me with problem 3 or 4? Or confirm that I'm on the right way with problem 1 and 2?
Beta Was this translation helpful? Give feedback.
All reactions