Lines Matching refs:numSamples

67     	int numSamples)  in move()  argument
69 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in move()
78 int numSamples, in scaleSamples() argument
83 int stop = start + numSamples*numChannels; in scaleSamples()
242 int numSamples) in enlargeOutputBufferIfNeeded() argument
244 if(numOutputSamples + numSamples > outputBufferSize) { in enlargeOutputBufferIfNeeded()
245 outputBufferSize += (outputBufferSize >> 1) + numSamples; in enlargeOutputBufferIfNeeded()
252 int numSamples) in enlargeInputBufferIfNeeded() argument
254 if(numInputSamples + numSamples > inputBufferSize) { in enlargeInputBufferIfNeeded()
255 inputBufferSize += (inputBufferSize >> 1) + numSamples; in enlargeInputBufferIfNeeded()
263 int numSamples) in addFloatSamplesToInputBuffer() argument
265 if(numSamples == 0) { in addFloatSamplesToInputBuffer()
268 enlargeInputBufferIfNeeded(numSamples); in addFloatSamplesToInputBuffer()
270 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in addFloatSamplesToInputBuffer()
273 numInputSamples += numSamples; in addFloatSamplesToInputBuffer()
279 int numSamples) in addShortSamplesToInputBuffer() argument
281 if(numSamples == 0) { in addShortSamplesToInputBuffer()
284 enlargeInputBufferIfNeeded(numSamples); in addShortSamplesToInputBuffer()
285 move(inputBuffer, numInputSamples, samples, 0, numSamples); in addShortSamplesToInputBuffer()
286 numInputSamples += numSamples; in addShortSamplesToInputBuffer()
292 int numSamples) in addUnsignedByteSamplesToInputBuffer() argument
296 enlargeInputBufferIfNeeded(numSamples); in addUnsignedByteSamplesToInputBuffer()
298 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in addUnsignedByteSamplesToInputBuffer()
302 numInputSamples += numSamples; in addUnsignedByteSamplesToInputBuffer()
310 int numSamples = numBytes/(2*numChannels); in addBytesToInputBuffer() local
313 enlargeInputBufferIfNeeded(numSamples); in addBytesToInputBuffer()
319 numInputSamples += numSamples; in addBytesToInputBuffer()
336 int numSamples) in copyToOutput() argument
338 enlargeOutputBufferIfNeeded(numSamples); in copyToOutput()
339 move(outputBuffer, numOutputSamples, samples, position, numSamples); in copyToOutput()
340 numOutputSamples += numSamples; in copyToOutput()
347 int numSamples = remainingInputToCopy; in copyInputToOutput() local
349 if(numSamples > maxRequired) { in copyInputToOutput()
350 numSamples = maxRequired; in copyInputToOutput()
352 copyToOutput(inputBuffer, position, numSamples); in copyInputToOutput()
353 remainingInputToCopy -= numSamples; in copyInputToOutput()
354 return numSamples; in copyInputToOutput()
363 int numSamples = numOutputSamples; in readFloatFromStream() local
366 if(numSamples == 0) { in readFloatFromStream()
369 if(numSamples > maxSamples) { in readFloatFromStream()
370 remainingSamples = numSamples - maxSamples; in readFloatFromStream()
371 numSamples = maxSamples; in readFloatFromStream()
373 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in readFloatFromStream()
376 move(outputBuffer, 0, outputBuffer, numSamples, remainingSamples); in readFloatFromStream()
378 return numSamples; in readFloatFromStream()
387 int numSamples = numOutputSamples; in readShortFromStream() local
390 if(numSamples == 0) { in readShortFromStream()
393 if(numSamples > maxSamples) { in readShortFromStream()
394 remainingSamples = numSamples - maxSamples; in readShortFromStream()
395 numSamples = maxSamples; in readShortFromStream()
397 move(samples, 0, outputBuffer, 0, numSamples); in readShortFromStream()
398 move(outputBuffer, 0, outputBuffer, numSamples, remainingSamples); in readShortFromStream()
400 return numSamples; in readShortFromStream()
409 int numSamples = numOutputSamples; in readUnsignedByteFromStream() local
412 if(numSamples == 0) { in readUnsignedByteFromStream()
415 if(numSamples > maxSamples) { in readUnsignedByteFromStream()
416 remainingSamples = numSamples - maxSamples; in readUnsignedByteFromStream()
417 numSamples = maxSamples; in readUnsignedByteFromStream()
419 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in readUnsignedByteFromStream()
422 move(outputBuffer, 0, outputBuffer, numSamples, remainingSamples); in readUnsignedByteFromStream()
424 return numSamples; in readUnsignedByteFromStream()
434 int numSamples = numOutputSamples; in readBytesFromStream() local
437 if(numSamples == 0 || maxSamples == 0) { in readBytesFromStream()
440 if(numSamples > maxSamples) { in readBytesFromStream()
441 remainingSamples = numSamples - maxSamples; in readBytesFromStream()
442 numSamples = maxSamples; in readBytesFromStream()
444 for(int xSample = 0; xSample < numSamples*numChannels; xSample++) { in readBytesFromStream()
449 move(outputBuffer, 0, outputBuffer, numSamples, remainingSamples); in readBytesFromStream()
451 return 2*numSamples*numChannels; in readBytesFromStream()
495 int numSamples = maxRequired/skip; in downSampleInput() local
500 for(int i = 0; i < numSamples; i++) { in downSampleInput()
631 int numSamples, in overlapAdd() argument
644 for(int t = 0; t < numSamples; t++) { in overlapAdd()
645 out[o] = (short)((rampDown[d]*(numSamples - t) + rampUp[u]*t)/numSamples); in overlapAdd()
656 int numSamples, in overlapAddWithSeparation() argument
670 for(int t = 0; t < numSamples + separation; t++) { in overlapAddWithSeparation()
672 out[o] = (short)(rampDown[d]*(numSamples - t)/numSamples); in overlapAddWithSeparation()
674 } else if(t < numSamples) { in overlapAddWithSeparation()
675 … out[o] = (short)((rampDown[d]*(numSamples - t) + rampUp[u]*(t - separation))/numSamples); in overlapAddWithSeparation()
679 out[o] = (short)(rampUp[u]*(t - separation)/numSamples); in overlapAddWithSeparation()
691 int numSamples = numOutputSamples - originalNumOutputSamples; in moveNewSamplesToPitchBuffer() local
693 if(numPitchSamples + numSamples > pitchBufferSize) { in moveNewSamplesToPitchBuffer()
694 pitchBufferSize += (pitchBufferSize >> 1) + numSamples; in moveNewSamplesToPitchBuffer()
697 move(pitchBuffer, numPitchSamples, outputBuffer, originalNumOutputSamples, numSamples); in moveNewSamplesToPitchBuffer()
699 numPitchSamples += numSamples; in moveNewSamplesToPitchBuffer()
704 int numSamples) in removePitchSamples() argument
706 if(numSamples == 0) { in removePitchSamples()
709 move(pitchBuffer, 0, pitchBuffer, numSamples, numPitchSamples - numSamples); in removePitchSamples()
710 numPitchSamples -= numSamples; in removePitchSamples()
854 int numSamples = numInputSamples; in changeSpeed() local
874 } while(position + maxRequired <= numSamples); in changeSpeed()
911 int numSamples) in writeFloatToStream() argument
913 addFloatSamplesToInputBuffer(samples, numSamples); in writeFloatToStream()
920 int numSamples) in writeShortToStream() argument
922 addShortSamplesToInputBuffer(samples, numSamples); in writeShortToStream()
930 int numSamples) in writeUnsignedByteToStream() argument
932 addUnsignedByteSamplesToInputBuffer(samples, numSamples); in writeUnsignedByteToStream()
948 int numSamples, in changeFloatSpeed() argument
964 stream.writeFloatToStream(samples, numSamples); in changeFloatSpeed()
966 numSamples = stream.samplesAvailable(); in changeFloatSpeed()
967 stream.readFloatFromStream(samples, numSamples); in changeFloatSpeed()
968 return numSamples; in changeFloatSpeed()
974 int numSamples, in sonicChangeShortSpeed() argument
990 stream.writeShortToStream(samples, numSamples); in sonicChangeShortSpeed()
992 numSamples = stream.samplesAvailable(); in sonicChangeShortSpeed()
993 stream.readShortFromStream(samples, numSamples); in sonicChangeShortSpeed()
994 return numSamples; in sonicChangeShortSpeed()