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

Method getFramesPerBlock

src/cinder/audio/android/DeviceManagerOpenSl.cpp:142–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142size_t DeviceManagerOpenSl::getFramesPerBlock( const DeviceRef &device )
143{
144 // Nodes require frames per block to to be power of 2, and most android devices don't want power of 2 blocksizes
145 // So we round up, OutputDeviceNodeOpenSl will ask for hardware block size directly.
146 size_t framesPerBlockHardware = getFramesPerBlockHardware( device );
147 size_t framesPerBlockPow2 = ( isPowerOf2( framesPerBlockHardware ) ? framesPerBlockHardware : nextPowerOf2( framesPerBlockHardware ) );
148 CI_LOG_I( "framesPerBlockHardware: " << framesPerBlockHardware << ", framesPerBlockPow2: " << framesPerBlockPow2 );
149 return framesPerBlockPow2;
150}
151
152size_t DeviceManagerOpenSl::getFramesPerBlockHardware( const DeviceRef &device )
153{

Callers 1

Calls 2

isPowerOf2Function · 0.85
nextPowerOf2Function · 0.85

Tested by

no test coverage detected