private SoundTouchProcessor(TimeStretch stretch)
            : base(stretch)
        {
            _rateTransposer = new RateTransposer();
            _stretch        = stretch;

            _effectiveRate = _effectiveTempo = 0;

            _pitch         =
                _rate      =
                    _tempo = 1.0;

            CalcEffectiveRateAndTempo();

            _samplesExpectedOut = 0;
            _samplesOutput      = 0;

            _channels        = 0;
            _isSampleRateSet = false;
        }
Пример #2
0
        public SoundTouch()
        {
            // Initialize rate transposer and tempo changer instances
            _rateTransposer = RateTransposer <TSampletype> .NewInstance();

            _stretch = TimeStretch <TSampletype, TLongSampleType> .NewInstance();

            SetOutPipe(_stretch);

            _rate = _tempo = 0f;

            _virtualTempo         =
                _virtualRate      =
                    _virtualPitch = 1.0f;

            CalcEffectiveRateAndTempo();

            _channels        = 0;
            _isSampleRateSet = false;
        }