Lines Matching refs:period
617 int period, bestPeriod = 0, worstPeriod = 255; in findPitchPeriodInRange() local
622 for(period = minPeriod; period <= maxPeriod; period++) { in findPitchPeriodInRange()
625 p = samples + period; in findPitchPeriodInRange()
626 for(i = 0; i < period; i++) { in findPitchPeriodInRange()
635 if(diff*bestPeriod < minDiff*period) { in findPitchPeriodInRange()
637 bestPeriod = period; in findPitchPeriodInRange()
639 if(diff*worstPeriod > maxDiff*period) { in findPitchPeriodInRange()
641 worstPeriod = period; in findPitchPeriodInRange()
653 int period, in prevPeriodBetter() argument
692 int period; in findPitchPeriod() local
698 period = findPitchPeriodInRange(samples, minPeriod, maxPeriod, &minDiff, &maxDiff); in findPitchPeriod()
701 period = findPitchPeriodInRange(stream->downSampleBuffer, minPeriod/skip, in findPitchPeriod()
704 period *= skip; in findPitchPeriod()
705 minPeriod = period - (skip << 2); in findPitchPeriod()
706 maxPeriod = period + (skip << 2); in findPitchPeriod()
714 period = findPitchPeriodInRange(samples, minPeriod, maxPeriod, in findPitchPeriod()
718 period = findPitchPeriodInRange(stream->downSampleBuffer, minPeriod, in findPitchPeriod()
723 if(prevPeriodBetter(stream, period, minDiff, maxDiff, preferNewPeriod)) { in findPitchPeriod()
726 retPeriod = period; in findPitchPeriod()
729 stream->prevPeriod = period; in findPitchPeriod()
847 int period, newPeriod, separation; in adjustPitch() local
858 period = findPitchPeriod(stream, stream->pitchBuffer + position*numChannels, 0); in adjustPitch()
859 newPeriod = period/pitch; in adjustPitch()
866 rampUp = stream->pitchBuffer + (position + period - newPeriod)*numChannels; in adjustPitch()
871 separation = newPeriod - period; in adjustPitch()
872 overlapAddWithSeparation(period, numChannels, separation, out, rampDown, rampUp); in adjustPitch()
875 position += period; in adjustPitch()
960 int period) in skipPitchPeriod() argument
966 newSamples = period/(speed - 1.0f); in skipPitchPeriod()
968 newSamples = period; in skipPitchPeriod()
969 stream->remainingInputToCopy = period*(2.0f - speed)/(speed - 1.0f); in skipPitchPeriod()
975 stream->numOutputSamples*numChannels, samples, samples + period*numChannels); in skipPitchPeriod()
985 int period) in insertPitchPeriod() argument
992 newSamples = period*speed/(1.0f - speed); in insertPitchPeriod()
994 newSamples = period; in insertPitchPeriod()
995 stream->remainingInputToCopy = period*(2.0f*speed - 1.0f)/(1.0f - speed); in insertPitchPeriod()
997 if(!enlargeOutputBufferIfNeeded(stream, period + newSamples)) { in insertPitchPeriod()
1001 memcpy(out, samples, period*sizeof(short)*numChannels); in insertPitchPeriod()
1002 out = stream->outputBuffer + (stream->numOutputSamples + period)*numChannels; in insertPitchPeriod()
1003 overlapAdd(newSamples, numChannels, out, samples + period*numChannels, samples); in insertPitchPeriod()
1004 stream->numOutputSamples += period + newSamples; in insertPitchPeriod()
1016 int position = 0, period, newSamples; in changeSpeed() local
1028 period = findPitchPeriod(stream, samples, 1); in changeSpeed()
1030 newSamples = skipPitchPeriod(stream, samples, speed, period); in changeSpeed()
1031 position += period + newSamples; in changeSpeed()
1033 newSamples = insertPitchPeriod(stream, samples, speed, period); in changeSpeed()