// ----------------------------------------- // 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; namespace Vannatech.CoreAudio.Interfaces { /// /// Represents a peak meter on the audio stream to or from an audio endpoint device. /// /// /// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd368227.aspx /// public partial interface IAudioMeterInformation { /// /// Gets the peak sample value for the channels in the audio stream. /// /// The peak sample value for the audio stream. /// An HRESULT code indicating whether the operation passed of failed. [PreserveSig] int GetPeakValue( [Out] [MarshalAs(UnmanagedType.R4)] out float peak); /// /// Gets the number of channels in the audio stream that are monitored by peak meters. /// /// The channel count. /// An HRESULT code indicating whether the operation passed of failed. [PreserveSig] int GetMeteringChannelCount( [Out] [MarshalAs(UnmanagedType.U4)] out UInt32 channelCount); /// /// Gets the peak sample values for all the channels in the audio stream. /// /// The channel count. /// An array of peak sample values. /// An HRESULT code indicating whether the operation passed of failed. [PreserveSig] int GetChannelsPeakValues( [In] [MarshalAs(UnmanagedType.U4)] UInt32 channelCount, [In, Out] [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.R4)] float[] peakValues); /// /// Queries the audio endpoint device for its hardware-supported functions. /// /// A hardware support mask that indicates the capabilities of the endpoint. /// An HRESULT code indicating whether the operation passed of failed. [PreserveSig] int QueryHardwareSupport( [Out] [MarshalAs(UnmanagedType.U4)] out UInt32 hardwareSupportMask); } }