Example #1
0
        internal void SetupInitialize()
        {
            Contract.Ensures(_dspState != IntPtr.Zero);
            Contract.Ensures(_block != IntPtr.Zero);

            Result result = SafeNativeMethods.VorbisEncodeSetupInitialize(_info);

            if (result != Result.Ok)
            {
                throw new IOException(string.Format(CultureInfo.CurrentCulture,
                                                    Resources.NativeVorbisEncoderInitializationError, result));
            }

            CompleteInitialization();
        }