public MainForm() { logger.Debug("MainForm()"); InitializeComponent(); this.Icon = Properties.Resources.clock; // create the refresh image button's completely flat appearance //btnRefreshImage.FlatStyle = FlatStyle.Flat; //btnRefreshImage.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); //Transparent //btnRefreshImage.FlatAppearance.BorderSize = 0; //btnRefreshImage.FlatAppearance.MouseOverBackColor = pnlMainContent.BackColor; //btnRefreshImage.FlatAppearance.MouseDownBackColor = pnlMainContent.BackColor; _sizMainPanelSize = pnlMainContent.Size; _sizMainPanelSize.Height -= pbPictureBox.Height; _updateRealClock(); try { logger.Debug("setting up audio device control"); // set up the audio device control MMDeviceEnumerator mmdEnumerator = new MMDeviceEnumerator(); _mmdAudioDevice = mmdEnumerator.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); } catch (Exception ex) { logger.Error(ex, "Error while trying to set up the audio device: {0}", ex.Message); } #if !DEBUG btnExit.Visible = false; #endif }
public Form1() { InitializeComponent(); MMDeviceEnumerator DevEnum = new MMDeviceEnumerator(); device = DevEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); tbMaster.Value = (int)(device.AudioEndpointVolume.MasterVolumeLevelScalar * 100); device.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification); timer1.Enabled = true; }
public MainForm() { DevEnum = new MMDeviceEnumerator(); device = DevEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); InitializeComponent(); Rectangle workingArea = Screen.GetWorkingArea(this); this.Location = new Point(workingArea.Right - Size.Width, workingArea.Bottom - Size.Height); lblStatusBar.Text = "Ready | Stopped"; }
public MainWindow() { InitializeComponent(); MMDeviceEnumerator DevEnum = new MMDeviceEnumerator(); device = DevEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia); OscServer oscServer; oscServer = new OscServer(TransportType.Udp, IPAddress.Any, Port); oscServer.FilterRegisteredMethods = false; oscServer.RegisterMethod(AliveMethod); oscServer.RegisterMethod(TestMethod); oscServer.BundleReceived += new EventHandler<OscBundleReceivedEventArgs>(oscServer_BundleReceived); oscServer.MessageReceived += new EventHandler<OscMessageReceivedEventArgs>(oscServer_MessageReceived); oscServer.ReceiveErrored += new EventHandler<Bespoke.Common.ExceptionEventArgs>(oscServer_ReceiveErrored); oscServer.ConsumeParsingExceptions = false; oscServer.Start(); }
public void SetDefaultAudioEndpoint(MMDevice device) { //Marshal.ThrowExceptionForHR(((IMMDeviceEnumerator)_realEnumerator).SetDefaultAudioEndpoint(device.ReadDevice)); device.Selected = true; }
public MMDeviceEventArgs(MMDevice device) { _device = device; }
public MMDeviceStateEventArgs(MMDevice device, DEVICE_STATE newState) : base(device) { _newState = newState; }
public DefaultAudioDeviceEventArgs(MMDevice device, EDataFlow flow, ERole role) : base(device) { _flow = flow; _role = role; }
public Mixer(MMDevice device) { dev = device; }
public Mixer() { dev = Devices.DefaultPlayback; }