// -----------------------------------------
// 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.Externals
{
///
/// Used by the and methods
/// of as the primary way to program item properties.
///
///
/// MSDN Reference: http://msdn.microsoft.com/en-us/library/aa380072.aspx
/// Note: This item is external to CoreAudio API, and is defined in the Windows Structured Storage API.
///
[StructLayout(LayoutKind.Sequential)]
public struct PROPVARIANT
{
///
/// Value type tag.
///
public short vt;
///
/// Reserved for future use.
///
public short wReserved1;
///
/// Reserved for future use.
///
public short wReserved2;
///
/// Reserved for future use.
///
public short wReserved3;
///
/// Represents the variant data section.
///
public VariantData Data;
}
///
/// Represents the variant data section of the PROPVARIANT structure.
///
///
/// This only provides variants for use within the context of MMDevice properties.
///
[StructLayout(LayoutKind.Explicit)]
public struct VariantData
{
///
/// Represents the data as a boolean value.
///
[FieldOffset(0)]
public bool AsBoolean;
///
/// Represents the data as a unsigned 32-bit integer.
///
[FieldOffset(0)]
public UInt32 AsUInt32;
///
/// Represents the data as a unicode string pointer.
///
[FieldOffset(0)]
public IntPtr AsStringPtr;
///
/// Represents the data as a pointer to a WAVEFORMATEX structure.
///
[FieldOffset(4)]
public IntPtr AsFormatPtr;
}
}