Esempio n. 1
0
 internal void __MarshalFrom(ref WaveFormatExtensible.__Native @ref)
 {
     base.__MarshalFrom(ref @ref.waveFormat);
     this.wValidBitsPerSample = @ref.wValidBitsPerSample;
     this.ChannelMask         = @ref.dwChannelMask;
     this.GuidSubFormat       = @ref.subFormat;
 }
Esempio n. 2
0
        public WaveFormatExtensible(int rate, int bits, int channels)
            : base(rate, bits, channels)
        {
            this.waveFormatTag       = WAVE_FORMAT.EXTENSIBLE;
            this.extraSize           = 22;
            this.wValidBitsPerSample = (short)bits;
            int num = 0;

            for (int i = 0; i < channels; i++)
            {
                num |= 1 << i;
            }
            this.ChannelMask   = (SPEAKER_FLAGS)num;
            this.GuidSubFormat = ((bits == 32) ? new Guid("00000003-0000-0010-8000-00aa00389b71") : new Guid("00000001-0000-0010-8000-00aa00389b71"));
        }