Esempio n. 1
0
        /// <summary>
        /// Creates a new resampler instance with the supplied converter type (which equals the resampling quality)
        /// for a supplied number of channels.
        /// </summary>
        /// <param name="type">the type of the internal conversion algorithm (quality level)</param>
        /// <param name="channels">the number of channels that will be provided to the processing method</param>
        public SampleRateConverter(ConverterType type, int channels)
        {
            srcState = InteropWrapper.src_new(type, channels, out error);
            ThrowExceptionForError(error);
            srcData = new SRC_DATA();

            SetRatio(1d);

            this.channels        = channels;
            this.bufferedSamples = 0;
        }
Esempio n. 2
0
 public static extern int src_process(IntPtr state, ref SRC_DATA data);