// ----------------------------------------- // SoundScribe (TM) and related software. // // Copyright (C) 2007-2011 Vannatech // http://www.vannatech.com // All rights reserved. // // This source code is subject to the MIT License. // http://www.opensource.org/licenses/mit-license.php // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // ----------------------------------------- using System; using System.Runtime.InteropServices; using Vannatech.CoreAudio.Enumerations; using Vannatech.CoreAudio.Externals; using Vannatech.CoreAudio.Constants; namespace Vannatech.CoreAudio.Interfaces { /// /// Provides notifications when an audio endpoint device is added or removed, when the state /// or properties of a device change, or when there is a change in the default role assigned to a device. /// /// /// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd371417.aspx /// public partial interface IMMNotificationClient { /// /// Notifies the client that the default audio endpoint device for a particular role has changed. /// /// The endpoint ID string that identifies the audio endpoint device. /// The constant that indicates the new state. void OnDeviceStateChanged( [MarshalAs(UnmanagedType.LPWStr)] string deviceId, [MarshalAs(UnmanagedType.U4)] UInt32 newState); /// /// Indicates that a new audio endpoint device has been added. /// /// The endpoint ID string that identifies the audio endpoint device. void OnDeviceAdded( [MarshalAs(UnmanagedType.LPWStr)] string deviceId); /// /// Indicates that an audio endpoint device has been removed. /// /// The endpoint ID string that identifies the audio endpoint device. void OnDeviceRemoved( [MarshalAs(UnmanagedType.LPWStr)] string deviceId); /// /// Notifies the client that the default audio endpoint device for a particular role has changed. /// /// The data-flow direction of the endpoint device. /// The device role of the audio endpoint device. /// The endpoint ID string that identifies the audio endpoint device. void OnDefaultDeviceChanged( [MarshalAs(UnmanagedType.I4)] EDataFlow dataFlow, [MarshalAs(UnmanagedType.I4)] ERole deviceRole, [MarshalAs(UnmanagedType.LPWStr)] string defaultDeviceId); /// /// Indicates that the value of a property belonging to an audio endpoint device has changed. /// /// The endpoint ID string that identifies the audio endpoint device. /// A that specifies the type of property. void OnPropertyValueChanged( [MarshalAs(UnmanagedType.LPWStr)] string deviceId, PROPERTYKEY propertyKey); } }