简体   繁体   中英

What is most common way to play sample buffer in windows in C++?

I am developing a cross-platform audio editor (C++) and it has platform-specific AudioDevice class implementation. This class plays sounds from memory buffer. Primary OS is Linux, but sometimes i give attention to windows port too.

The current windows implementation uses waveOutOpen() , waveOutPrepareHeader() , waveOutWrite() interface and i consider it deprecated (i don't know why exactly). But most important thing is that this interface is still supported and working in Windows 7, and i don't see reasons for Microsoft would kill it.

Anyway, should i move to another interface that kind a better?

The wave functions have been deprecated for several years (mainly since DirectX became supported on the NT platform). You should use the DirectX (DirectSound and/or DirectShow) API.

http://msdn.microsoft.com/en-us/library/windows/desktop/ee416960(v=vs.85).aspx

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375454(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM