Closed Hammit closed 2 days ago
Hi, thank you for the PR and the new issue.
I created this repo last year, to try to understand how to use libav {decoder, format...} to decode audio files into a player. The reality is, I don't understand it very well and the API for the library is confusing to me.
I will check to see if I can spot the problem and come back to you, but i don't think I will have time to do it soon.
I'm glad I'm not the only one having a tough time with it then :) Thanks for the repo
Just a heads up. I think the issue with the audio cutting out prematurely was due to there only being one fread
of the audio file. I think this should be looped until fread
returns 0, indicating the EOF.
Ok, problem solved. I've just given you a PR that fixes the problem for me. Not sure how an official example could have such a bug, but ah well, glad it's fixed now :)
OS: KUbuntu 24.04 Compiler: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
I put an MP3 file in the same directory as the miniaudio binary called output.mp3 I run the miniaudio binary Only a very limited amount of audio comes out of the speakers (a split second to 1 or 2 seconds) and there is very limited output in the console showing "Inserted x into fifo"