Beispiel #1
0
        internal NativeOggStream(int serialNumber)
        {
            Contract.Ensures(_state != IntPtr.Zero);

            _state = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(OggStreamState)));
            if (SafeNativeMethods.OggStreamInitialize(_state, serialNumber) != 0)
            {
                throw new IOException(Resources.NativeOggStreamInitializationError);
            }
        }