02-20-2023, 07:52 PM
Quote:Just one question: 32 bit WAV sound. Is the type SINGLE used in WAV containers? Windows media player didn't really want to understand it and played like if you ride a bike on a road paved with cobblestones and sing along... (so I converted it to the LONG type and it plays cleanly). Does anyone know?
It does support 32-bit floating-point WAV files. I think I know what is happening here. For floating point samples each sample has to be between -1 .. 1 (0 being the mid-point). I think during the conversion from MP3 > PCM some of these samples go way above or below that range. miniaudio deals with this by clipping the samples during playback / mixing.
Since you are writing out this unclipped data to the file, you'll have to do the clipping yourself.
Again, I may be completely wrong because I have not studied other parts of your code.
I will play with this as soon as I get some time.