C# How to programatically change the playback device

…衆ロ難τιáo~ 提交于 2019-11-27 03:26:37

问题


How can I programatically change the default audio device on a vista / win 7 system? Using C# or a Win API call?


回答1:


The WinMM API should provide the functionality that you request.

You would use the DRVM_MAPPER_PREFERRED_SET message, which is sent with waveOutMessage() function.

Documentation: http://msdn.microsoft.com/en-us/library/aa909789.aspx

However, if you are trying to send the waveform sound out yourself, you should look at the WinMM.Net library.

http://winmm.codeplex.com



来源:https://stackoverflow.com/questions/1555156/c-sharp-how-to-programatically-change-the-playback-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!