I dig trough internet to find an audio library that is modern and reguralrly maintained and one that is MIT licensed.
But unfortunatelly not such audio library exists.
I found some forums post elsehwere people are saying that audio library in C++ is the greatest "myth" in a sense that such libraries are very rare and not many people work with audio.
They even suggest that using native platform specific code for audio is the best way to go.
I personally use Media Foundation for already some time and find it to suit my needs, there are no programming limitations and there is no need for a license.
I even made a small MF library with which I can play various audio formats that most current audio libraries do not support.
However there is one issue I'm having, it difficult as hell to debug Media Foundation and it's difficult to write audio library because of many concepts that need to be learned and mastered, and I also have one issue that I'm not able to resolve for already some time.
I started to wonder how many people have experience with MF? since I see there are no MF based audio libraries on the internet at all.
PortAudio works well for both playback and recording, although it does have the problem that you can't tell it to only use one API, so when you list devices you get the same physicaly device on multiple virtual devices; one for each API that exposes it.
They're contemporary interfaces. Both were introduced in Windows Vista. It looks like WASAPI is a lower-level interface, in that it deals only with I/O of audio data to and from devices, as well as management of those devices, while WMF is a more integral solution. It deals with file formats, codecs, filters, DRM, etc. It also does video, not only audio. If all you need is audio input and output, I'd say it's overkill.
I've never used it, but at a glance the API is reminiscent of OpenAL. Before sound cards became basically irrelevant and Creative became assholes and close-sourced it, OpenAL rendered audio sources in a virtual 3D space by changing the volumes in the different channels. You could also set a value for the speed of sound, and moving sources would get a Doppler effect applied based on their movement relative to the listener's position in the 3D space. In other words, exactly what you'd need to play sound effects in a 3D video game.
PortAudio (and WASAPI, since they're intended for the same use cases) is more basic. It just lets you select a device and send data to it. If you need to do mixing, panning, or any other effects more complex than a simple volume control, the application is expected to handle it.
On the other hand, video game-oriented libraries typically don't let you select the output device, and generally don't implement audio input.