Lines 698-704
Link Here
|
698 |
// other than 1.0. |
697 |
// other than 1.0. |
699 |
uint32_t flushedFrames = 0; |
698 |
uint32_t flushedFrames = 0; |
700 |
if (mTimeStretcher && mTimeStretcher->numSamples()) { |
699 |
if (mTimeStretcher && mTimeStretcher->numSamples()) { |
701 |
flushedFrames = mTimeStretcher->receiveSamples(reinterpret_cast<AudioDataValue*>(wpos), aFrames); |
700 |
flushedFrames = mTimeStretcher->receiveSamples((soundtouch::SAMPLETYPE*)reinterpret_cast<AudioDataValue*>(wpos), aFrames); |
702 |
wpos += FramesToBytes(flushedFrames); |
701 |
wpos += FramesToBytes(flushedFrames); |
703 |
} |
702 |
} |
704 |
uint32_t toPopBytes = FramesToBytes(aFrames - flushedFrames); |
703 |
uint32_t toPopBytes = FramesToBytes(aFrames - flushedFrames); |
Lines 772-781
Link Here
|
772 |
&input[1], &input_size[1]); |
771 |
&input[1], &input_size[1]); |
773 |
mReadPoint += BytesToFrames(available); |
772 |
mReadPoint += BytesToFrames(available); |
774 |
for(uint32_t i = 0; i < 2; i++) { |
773 |
for(uint32_t i = 0; i < 2; i++) { |
775 |
mTimeStretcher->putSamples(reinterpret_cast<AudioDataValue*>(input[i]), BytesToFrames(input_size[i])); |
774 |
mTimeStretcher->putSamples((soundtouch::SAMPLETYPE*)reinterpret_cast<AudioDataValue*>(input[i]), BytesToFrames(input_size[i])); |
776 |
} |
775 |
} |
777 |
} |
776 |
} |
778 |
uint32_t receivedFrames = mTimeStretcher->receiveSamples(reinterpret_cast<AudioDataValue*>(wpos), aFrames - processedFrames); |
777 |
uint32_t receivedFrames = mTimeStretcher->receiveSamples((soundtouch::SAMPLETYPE*)reinterpret_cast<AudioDataValue*>(wpos), aFrames - processedFrames); |
779 |
wpos += FramesToBytes(receivedFrames); |
778 |
wpos += FramesToBytes(receivedFrames); |
780 |
processedFrames += receivedFrames; |
779 |
processedFrames += receivedFrames; |
781 |
} while (processedFrames < aFrames && !lowOnBufferedData); |
780 |
} while (processedFrames < aFrames && !lowOnBufferedData); |