• Home
  • Raw
  • Download

Lines Matching refs:numSamples

70     int numSamples,  in scaleSamples()  argument
76 while(numSamples--) { in scaleSamples()
312 int numSamples) in enlargeOutputBufferIfNeeded() argument
314 if(stream->numOutputSamples + numSamples > stream->outputBufferSize) { in enlargeOutputBufferIfNeeded()
315 stream->outputBufferSize += (stream->outputBufferSize >> 1) + numSamples; in enlargeOutputBufferIfNeeded()
328 int numSamples) in enlargeInputBufferIfNeeded() argument
330 if(stream->numInputSamples + numSamples > stream->inputBufferSize) { in enlargeInputBufferIfNeeded()
331 stream->inputBufferSize += (stream->inputBufferSize >> 1) + numSamples; in enlargeInputBufferIfNeeded()
345 int numSamples) in addFloatSamplesToInputBuffer() argument
348 int count = numSamples*stream->numChannels; in addFloatSamplesToInputBuffer()
350 if(numSamples == 0) { in addFloatSamplesToInputBuffer()
353 if(!enlargeInputBufferIfNeeded(stream, numSamples)) { in addFloatSamplesToInputBuffer()
360 stream->numInputSamples += numSamples; in addFloatSamplesToInputBuffer()
368 int numSamples) in addShortSamplesToInputBuffer() argument
370 if(numSamples == 0) { in addShortSamplesToInputBuffer()
373 if(!enlargeInputBufferIfNeeded(stream, numSamples)) { in addShortSamplesToInputBuffer()
377 numSamples*sizeof(short)*stream->numChannels); in addShortSamplesToInputBuffer()
378 stream->numInputSamples += numSamples; in addShortSamplesToInputBuffer()
386 int numSamples) in addUnsignedCharSamplesToInputBuffer() argument
389 int count = numSamples*stream->numChannels; in addUnsignedCharSamplesToInputBuffer()
391 if(numSamples == 0) { in addUnsignedCharSamplesToInputBuffer()
394 if(!enlargeInputBufferIfNeeded(stream, numSamples)) { in addUnsignedCharSamplesToInputBuffer()
401 stream->numInputSamples += numSamples; in addUnsignedCharSamplesToInputBuffer()
423 int numSamples) in copyToOutput() argument
425 if(!enlargeOutputBufferIfNeeded(stream, numSamples)) { in copyToOutput()
429 samples, numSamples*sizeof(short)*stream->numChannels); in copyToOutput()
430 stream->numOutputSamples += numSamples; in copyToOutput()
440 int numSamples = stream->remainingInputToCopy; in copyInputToOutput() local
442 if(numSamples > stream->maxRequired) { in copyInputToOutput()
443 numSamples = stream->maxRequired; in copyInputToOutput()
446 numSamples)) { in copyInputToOutput()
449 stream->remainingInputToCopy -= numSamples; in copyInputToOutput()
450 return numSamples; in copyInputToOutput()
460 int numSamples = stream->numOutputSamples; in sonicReadFloatFromStream() local
465 if(numSamples == 0) { in sonicReadFloatFromStream()
468 if(numSamples > maxSamples) { in sonicReadFloatFromStream()
469 remainingSamples = numSamples - maxSamples; in sonicReadFloatFromStream()
470 numSamples = maxSamples; in sonicReadFloatFromStream()
473 count = numSamples*stream->numChannels; in sonicReadFloatFromStream()
478 memmove(stream->outputBuffer, stream->outputBuffer + numSamples*stream->numChannels, in sonicReadFloatFromStream()
482 return numSamples; in sonicReadFloatFromStream()
492 int numSamples = stream->numOutputSamples; in sonicReadShortFromStream() local
495 if(numSamples == 0) { in sonicReadShortFromStream()
498 if(numSamples > maxSamples) { in sonicReadShortFromStream()
499 remainingSamples = numSamples - maxSamples; in sonicReadShortFromStream()
500 numSamples = maxSamples; in sonicReadShortFromStream()
502 memcpy(samples, stream->outputBuffer, numSamples*sizeof(short)*stream->numChannels); in sonicReadShortFromStream()
504 memmove(stream->outputBuffer, stream->outputBuffer + numSamples*stream->numChannels, in sonicReadShortFromStream()
508 return numSamples; in sonicReadShortFromStream()
518 int numSamples = stream->numOutputSamples; in sonicReadUnsignedCharFromStream() local
523 if(numSamples == 0) { in sonicReadUnsignedCharFromStream()
526 if(numSamples > maxSamples) { in sonicReadUnsignedCharFromStream()
527 remainingSamples = numSamples - maxSamples; in sonicReadUnsignedCharFromStream()
528 numSamples = maxSamples; in sonicReadUnsignedCharFromStream()
531 count = numSamples*stream->numChannels; in sonicReadUnsignedCharFromStream()
536 memmove(stream->outputBuffer, stream->outputBuffer + numSamples*stream->numChannels, in sonicReadUnsignedCharFromStream()
540 return numSamples; in sonicReadUnsignedCharFromStream()
592 int numSamples = stream->maxRequired/skip; in downSampleInput() local
598 for(i = 0; i < numSamples; i++) { in downSampleInput()
736 int numSamples, in overlapAdd() argument
749 for(t = 0; t < numSamples; t++) { in overlapAdd()
751 float ratio = sin(t*M_PI/(2*numSamples)); in overlapAdd()
754 *o = (*d*(numSamples - t) + *u*t)/numSamples; in overlapAdd()
766 int numSamples, in overlapAddWithSeparation() argument
780 for(t = 0; t < numSamples + separation; t++) { in overlapAddWithSeparation()
782 *o = *d*(numSamples - t)/numSamples; in overlapAddWithSeparation()
784 } else if(t < numSamples) { in overlapAddWithSeparation()
785 *o = (*d*(numSamples - t) + *u*(t - separation))/numSamples; in overlapAddWithSeparation()
789 *o = *u*(t - separation)/numSamples; in overlapAddWithSeparation()
802 int numSamples = stream->numOutputSamples - originalNumOutputSamples; in moveNewSamplesToPitchBuffer() local
805 if(stream->numPitchSamples + numSamples > stream->pitchBufferSize) { in moveNewSamplesToPitchBuffer()
806 stream->pitchBufferSize += (stream->pitchBufferSize >> 1) + numSamples; in moveNewSamplesToPitchBuffer()
815 numSamples*sizeof(short)*numChannels); in moveNewSamplesToPitchBuffer()
817 stream->numPitchSamples += numSamples; in moveNewSamplesToPitchBuffer()
824 int numSamples) in removePitchSamples() argument
827 short *source = stream->pitchBuffer + numSamples*numChannels; in removePitchSamples()
829 if(numSamples == 0) { in removePitchSamples()
832 if(numSamples != stream->numPitchSamples) { in removePitchSamples()
834 numSamples)*sizeof(short)*numChannels); in removePitchSamples()
836 stream->numPitchSamples -= numSamples; in removePitchSamples()
1015 int numSamples = stream->numInputSamples; in changeSpeed() local
1040 } while(position + maxRequired <= numSamples); in changeSpeed()
1089 int numSamples) in sonicWriteFloatToStream() argument
1091 if(!addFloatSamplesToInputBuffer(stream, samples, numSamples)) { in sonicWriteFloatToStream()
1102 int numSamples) in sonicWriteShortToStream() argument
1104 if(!addShortSamplesToInputBuffer(stream, samples, numSamples)) { in sonicWriteShortToStream()
1115 int numSamples) in sonicWriteUnsignedCharToStream() argument
1117 if(!addUnsignedCharSamplesToInputBuffer(stream, samples, numSamples)) { in sonicWriteUnsignedCharToStream()
1126 int numSamples, in sonicChangeFloatSpeed() argument
1142 sonicWriteFloatToStream(stream, samples, numSamples); in sonicChangeFloatSpeed()
1144 numSamples = sonicSamplesAvailable(stream); in sonicChangeFloatSpeed()
1145 sonicReadFloatFromStream(stream, samples, numSamples); in sonicChangeFloatSpeed()
1147 return numSamples; in sonicChangeFloatSpeed()
1153 int numSamples, in sonicChangeShortSpeed() argument
1169 sonicWriteShortToStream(stream, samples, numSamples); in sonicChangeShortSpeed()
1171 numSamples = sonicSamplesAvailable(stream); in sonicChangeShortSpeed()
1172 sonicReadShortFromStream(stream, samples, numSamples); in sonicChangeShortSpeed()
1174 return numSamples; in sonicChangeShortSpeed()