Exemplo n.º 1
0
 internal void __MarshalTo(ref DSBUFFERDESC.__Native @ref)
 {
     @ref.dwSize          = this.dwSize;
     @ref.dwFlags         = this.dwFlags;
     @ref.dwBufferBytes   = this.dwBufferBytes;
     @ref.dwReserved      = this.dwReserved;
     @ref.lpwfxFormat     = WaveFormat.MarshalToPtr(this.Format);
     @ref.guid3DAlgorithm = this.guid3DAlgorithm;
 }
Exemplo n.º 2
0
        // <unmanaged>HRESULT IDirectSoundBuffer::Initialize([In] IDirectSound* pDirectSound,[In] const DSBUFFERDESC* pcDSBufferDesc)</unmanaged>
        public unsafe void Initialize(DirectSoundBase directSoundRef, DSBUFFERDESC cDSBufferDescRef)
        {
            DSBUFFERDESC.__Native _Native = DSBUFFERDESC.__NewNative();
            cDSBufferDescRef.__MarshalTo(ref _Native);
            //Result result = calli(System.Int32(System.Void*,System.Void*,System.Void*), this._nativePointer, (void*)((directSoundRef == null) ? IntPtr.Zero : directSoundRef.NativePointer), &_Native, *(*(IntPtr*)this._nativePointer + (IntPtr)10 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(10, _nativePointer, (void *)((directSoundRef == null) ? IntPtr.Zero : directSoundRef.NativePointer), (void *)&_Native);

            cDSBufferDescRef.__MarshalFree(ref _Native);
            result.CheckError();
        }
Exemplo n.º 3
0
        // <unmanaged>HRESULT IDirectSound::CreateSoundBuffer([In] const DSBUFFERDESC* pcDSBufferDesc,[Out] void** ppDSBuffer,[In] IUnknown* pUnkOuter)</unmanaged>
        internal unsafe void CreateSoundBuffer(DSBUFFERDESC cDSBufferDescRef, out IntPtr dSBufferOut, ComObject unkOuterRef)
        {
            DSBUFFERDESC.__Native _Native = DSBUFFERDESC.__NewNative();
            cDSBufferDescRef.__MarshalTo(ref _Native);
            IntPtr pDSBuffer;
            //result = calli(System.Int32(System.Void*,System.Void*,System.Void*,System.Void*), this._nativePointer, &_Native, ptr, (void*)((unkOuterRef == null) ? IntPtr.Zero : unkOuterRef.NativePointer), *(*(IntPtr*)this._nativePointer + (IntPtr)3 * (IntPtr)sizeof(void*)));
            var result = (HRESULT)NativeHelper.CalliInt32(3, _nativePointer, &_Native, &pDSBuffer, (void *)((unkOuterRef == null) ? IntPtr.Zero : unkOuterRef.NativePointer));

            dSBufferOut = pDSBuffer;
            cDSBufferDescRef.__MarshalFree(ref _Native);
            result.CheckError();
        }
Exemplo n.º 4
0
 internal void __MarshalFree(ref DSBUFFERDESC.__Native @ref)
 {
     @ref.__MarshalFree();
 }