Пример #1
0
        internal void Initialize(int channels, int sampleRate, float baseQuality)
        {
            Contract.Ensures(_dspState != IntPtr.Zero);
            Contract.Ensures(_block != IntPtr.Zero);

            Result result = SafeNativeMethods.VorbisEncodeInitializeVbr(_info, channels, sampleRate, baseQuality);

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

            CompleteInitialization();
        }