/dev/dsp windows alternative
in Linux playing or recording some audio is just read or write /dev/dsp But how to do the same in w开发者_运维百科indows ? (with C)
There is no static device name, you should use waveOut*
functions, here
is a nice example of using those APIs.
The Media Control Interface (MCI) provides standard commands for playing multimedia devices and recording multimedia resource files. These commands are a generic interface to nearly every kind of multimedia device.
You can open a device using MCI_OPEN and can send the command using mciSendCommand function. Refer http://msdn.microsoft.com/en-us/library/dd743441%28VS.85%29.aspx for more details.
Or you can also use audio/video apis: http://msdn.microsoft.com/en-us/library/ee663260%28v=VS.85%29.aspx
精彩评论