Ejemplo n.º 1
0
        private unsafe void GetDeviceDetails(int index, out DeviceDetails deviceDetailsRef)
        {
            DeviceDetails.__Native _Native = default(DeviceDetails.__Native);
            Result result = LocalInterop.Calliint(this._nativePointer, index, &_Native, *(*(void ***)this._nativePointer + 4));

            deviceDetailsRef = default(DeviceDetails);
            deviceDetailsRef.__MarshalFrom(ref _Native);
            result.CheckError();
        }
Ejemplo n.º 2
0
        internal unsafe void __MarshalFrom(ref DeviceDetails.__Native @ref)
        {
            fixed(char *ptr = & @ref.DeviceID)
            {
                this.DeviceID = Utilities.PtrToStringUni((IntPtr)((void *)ptr), 256);
            }

            fixed(char *ptr2 = & @ref.DisplayName)
            {
                this.DisplayName = Utilities.PtrToStringUni((IntPtr)((void *)ptr2), 256);
            }

            this.Role         = @ref.Role;
            this.OutputFormat = new WaveFormatExtensible();
            this.OutputFormat.__MarshalFrom(ref @ref.OutputFormat);
        }
Ejemplo n.º 3
0
        internal unsafe void __MarshalTo(ref DeviceDetails.__Native @ref)
        {
            fixed(char *deviceID = this.DeviceID)
            {
                fixed(char *ptr = & @ref.DeviceID)
                {
                    Utilities.CopyMemory((IntPtr)((void *)ptr), (IntPtr)((void *)deviceID), this.DeviceID.Length * 2);
                }
            }

            fixed(char *displayName = this.DisplayName)
            {
                fixed(char *ptr2 = & @ref.DisplayName)
                {
                    Utilities.CopyMemory((IntPtr)((void *)ptr2), (IntPtr)((void *)displayName), this.DisplayName.Length * 2);
                }
            }

            @ref.Role         = this.Role;
            @ref.OutputFormat = WaveFormatExtensible.__NewNative();
            this.OutputFormat.__MarshalTo(ref @ref.OutputFormat);
        }
Ejemplo n.º 4
0
 internal void __MarshalFree(ref DeviceDetails.__Native @ref)
 {
     @ref.__MarshalFree();
 }