// -----------------------------------------
// 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 CoreAudioTests.Common
{
///
/// Defines the format of waveform-audio data for formats having more than two channels.
///
///
/// MSDN Reference: http://msdn.microsoft.com/en-us/library/dd757721.aspx
///
[StructLayout(LayoutKind.Explicit)]
public struct WAVEFORMATEXTENSIBLE
{
///
/// The structure that specifies the basic format.
///
[FieldOffset(0)]
public WAVEFORMATEX Format;
///
/// Variant data, which may contain either the valid bits per sample, or samples per block.
///
[FieldOffset(18)]
public SamplesUnion Samples;
///
/// Bitmask specifying the assignment of channels in the stream to speaker positions.
///
[FieldOffset(20)]
public UInt32 dwChannelMask;
///
/// Subformat of the data.
///
[FieldOffset(24)]
public Guid SubFormat;
///
/// Defines possible values of variant data for the Samples member.
///
[StructLayout(LayoutKind.Explicit)]
public struct SamplesUnion
{
///
/// The number of bits of precision in the signal.
///
[FieldOffset(0)]
public UInt16 wValidBitsPerSample;
///
/// The number of samples contained in one compressed block of audio data.
///
[FieldOffset(0)]
public UInt16 wSamplesPerBlock;
///
/// Reserved for internal use by operating system.
///
[FieldOffset(0)]
public UInt16 wReserved;
}
}
}