MCPcopy Create free account
hub / github.com/cinder/Cinder / setNumFrames

Method setNumFrames

src/cinder/audio/SampleRecorderNode.cpp:139–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void BufferRecorderNode::setNumFrames( size_t numFrames, bool shrinkToFit )
140{
141 if( mRecorderBuffer.getNumFrames() == numFrames )
142 return;
143
144 lock_guard<mutex> lock( getContext()->getMutex() );
145
146 if( mWritePos != 0 )
147 resizeBufferAndShuffleChannels( &mRecorderBuffer, numFrames );
148 else
149 mRecorderBuffer.setNumFrames( numFrames );
150
151 if( shrinkToFit )
152 mRecorderBuffer.shrinkToFit();
153}
154
155BufferRef BufferRecorderNode::getRecordedCopy() const
156{

Callers 11

updateMethod · 0.45
testConverterMethod · 0.45
updateMethod · 0.45
initializeMethod · 0.45
readMethod · 0.45
loadBufferMethod · 0.45
initInternalBufferMethod · 0.45
readImplMethod · 0.45
processNextReadSampleMethod · 0.45
captureAudioMethod · 0.45

Calls 4

getContextFunction · 0.85
getNumFramesMethod · 0.45
shrinkToFitMethod · 0.45

Tested by 3

updateMethod · 0.36
testConverterMethod · 0.36
updateMethod · 0.36