andrewrk / libsoundio

C library for cross-platform real-time audio input and output
http://libsound.io/
MIT License
1.94k stars 230 forks source link

Fixed WASAPI input stream failing and removed /WX compile flag for MSVC. #155

Closed Slin closed 7 years ago

Slin commented 7 years ago

I removed the /WX compile flag for MSVC debug builds as it turns warnings into errors and there are many warnings, making it impossible to compile with MSVC...

Also in the WASAPI backend, IAudioCaptureClient::ReleaseBuffer expects the whole buffer to be released or nothing. This fix keeps the buffer open until all frames have been read. This might not be great in some cases, but when I tried closing it with 0 as size, opening it again would sometimes fail.