内容へ移動
FiFiWiki2
FiFiWikiの第2版
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
top
»
c.sharp
»
windowsボリュームを操作
c.sharp:windowsボリュームを操作
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
C#を使用してWindowsボリュームをミュート https://code.i-harness.com/ja/q/259e9 ```cpp try { //Instantiate an Enumerator to find audio devices NAudio.CoreAudioApi.MMDeviceEnumerator MMDE = new NAudio.CoreAudioApi.MMDeviceEnumerator(); //Get all the devices, no matter what condition or status NAudio.CoreAudioApi.MMDeviceCollection DevCol = MMDE.EnumerateAudioEndPoints(NAudio.CoreAudioApi.DataFlow.All, NAudio.CoreAudioApi.DeviceState.All); //Loop through all devices foreach (NAudio.CoreAudioApi.MMDevice dev in DevCol) { try { //Show us the human understandable name of the device System.Diagnostics.Debug.Print(dev.FriendlyName); //Mute it dev.AudioEndpointVolume.Mute = true; } catch (Exception ex) { //Do something with exception when an audio endpoint could not be muted } } } catch (Exception ex) { //When something happend that prevent us to iterate through the devices } ```
c.sharp/windowsボリュームを操作.txt
· 最終更新: 2018/04/21 12:08 by
fifi
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
ページの名称変更
文書の先頭へ