How to control & adjust the sound volume in windows 7?

a 夏天 提交于 2019-12-11 03:27:17

问题


I would like to control and adjust sound volume of windows 7 in C# Win Form? Any tips, how is this be done?


回答1:


You might need to use winmm API. You can try this link.

Volume Control

I have used NAudio for visualization. Not sure if that might help you. With WPF it should be fairly simple, you can either use MediaElement or MediaPlayer and bind it to a Slider.




回答2:


Take a look here : http://www.geekpedia.com/tutorial176_Get-and-set-the-wave-sound-volume.html

You can also use NAudio wich is a managed wrapper for the IAudioMeterInformation interface.

More info on IAudioMeterInformation interface : http://msdn.microsoft.com/en-us/library/dd368227%28VS.85%29.aspx

NAudio projet on CodePlex : http://naudio.codeplex.com/



来源:https://stackoverflow.com/questions/6341344/how-to-control-adjust-the-sound-volume-in-windows-7

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