我是 SFML 库的忠实粉丝.它确实提供了额外的图形和网络功能,但与这个问题相关的是它还有简洁的音频包.
I'm a big fan of the SFML library. It does provide additional graphics and network features, but what is relevant to this question, is that it also has neat audio package.
音频功能是:
- Uses hardware acceleration whenever possible
- Can load and save standard sound formats:
Ogg, WAV, FLAC, AIFF, Au, RAW, paf, 8SVX, NIST, VOC, IRCAM, W64, MAT4, MAT5 PVF, HTK, SDS, AVR, SD2, Core Audio Format, WVE, MPC2K, RF64
- Can load all audio resources directly from files in memory
- 3D sound spacialization
- Easy interface for capturing audio
- Manages memory efficiently, so that you don't have to worry about resources lifetime or storage
- Supports streaming for big files; you can even write your custom streaming class for any source (network, ...)
- Supports multi-channels formats (mono, stereo, 4.0, 5.1, 6.1, 7.1)
网站:http://www.sfml-dev.org/