private void updateDevice(CoreAudioApi.MMDevice dev) { List <KeyValuePair <string, string> > lst = new List <KeyValuePair <string, string> >(); lst.Add(new KeyValuePair <string, string>("名前", dev.FriendlyName)); lst.Add(new KeyValuePair <string, string>("Id", dev.Id)); lst.Add(new KeyValuePair <string, string>("DataFlow", dev.DataFlow.ToString())); lst.Add(new KeyValuePair <string, string>("状態", dev.State.ToString())); CoreAudioApi.WAVEFORMATEXTENSIBLE format = dev.AudioClient.MixFormat; lst.Add(new KeyValuePair <string, string>("チャンネル", format.nChannels.ToString())); lst.Add(new KeyValuePair <string, string>("ビット数/サンプル", format.wBitsPerSample.ToString())); lst.Add(new KeyValuePair <string, string>("フォーマット", format.wFormatTag.ToString())); lst.Add(new KeyValuePair <string, string>("サンプル数/秒", format.nSamplesPerSec.ToString())); lst.Add(new KeyValuePair <string, string>("ブロックサイズ", format.nBlockAlign.ToString())); Guid subFormat = format.SubFormat; lst.Add(new KeyValuePair <string, string>("サブタイプ", CoreAudioApi.AudioMediaSubtypes.GetAudioSubtypeName(subFormat))); devListViewAdd(lst); }
public AudioMixerVista() { CoreAudioApi.MMDeviceEnumerator devEnum = new CoreAudioApi.MMDeviceEnumerator(); _device = devEnum.GetDefaultAudioEndpoint(CoreAudioApi.EDataFlow.eRender, CoreAudioApi.ERole.eMultimedia); }