Ejemplo n.º 1
0
        internal unsafe AudioChannelLayout(IntPtr h)
        {
            AudioTag     = (AudioChannelLayoutTag)Marshal.ReadInt32(h, 0);
            ChannelUsage = (AudioChannelBit)Marshal.ReadInt32(h, 4);
            Channels     = new AudioChannelDescription [Marshal.ReadInt32(h, 8)];
            int p    = 12;
            int size = sizeof(AudioChannelDescription);

            for (int i = 0; i < Channels.Length; i++)
            {
                Channels [i] = *(AudioChannelDescription *)(unchecked (((byte *)h) + p));
                p           += size;
            }
        }
Ejemplo n.º 2
0
 internal unsafe AudioChannelLayout(IntPtr h)
 {
     AudioTag = (AudioChannelLayoutTag) Marshal.ReadInt32 (h, 0);
     ChannelUsage = (AudioChannelBit) Marshal.ReadInt32 (h, 4);
     Channels = new AudioChannelDescription [Marshal.ReadInt32 (h, 8)];
     int p = 12;
     int size = sizeof (AudioChannelDescription);
     for (int i = 0; i < Channels.Length; i++){
         Channels [i] = *(AudioChannelDescription *) (unchecked (((byte *) h) + p));
         p += size;
     }
 }