mackron / miniaudio

Audio playback and capture library written in C, in a single source file.
https://miniaud.io
Other
4.07k stars 361 forks source link

Problems building miniaudio master on Windows with Visual Studio 2019 #385

Closed DJuego closed 2 years ago

DJuego commented 2 years ago

Thank you very much for this very promising project. It is the only one I know of that offers a cross-platform, header-only and dependency-free solution.

I work in Windows x64 environment with Visual Studio 2019. I have run into some inconsistencies with the examples:

error C2660: 'ma_decoder_read_pcm_frames': function does not take 3 arguments.

It's probably the result of recent modifications, and can be easily fixed, although the documentation should be updated to reflect these changes. However, with the above fixed, the library produces another compilation error in your code.

miniaudio.h(23281,156): error C2440: '=': cannot convert from 'LONG' to 'ma_result'.

Thanks in advance!! Happy end of year and new year! :-)

DJuego

mackron commented 2 years ago

Thanks for the reports. The documentation was an oversight on my part. The compilation error should also be fixed, but for some reason I was never getting that error on VS2017. These fixes are in the dev branch and will be released shortly.