Skip to content
Snippets Groups Projects
Commit bc0e1839 authored by jsiegle's avatar jsiegle
Browse files

Split number of items to read from buffer into two lines

parent 17a1b22d
No related branches found
No related tags found
No related merge requests found
......@@ -79,8 +79,14 @@ int DataBuffer::getNumSamples()
int DataBuffer::readAllFromBuffer(AudioSampleBuffer& data, uint64* timestamp, int16* eventCodes, int maxSize)
{
// check to see if the maximum size is smaller than the total number of available ints
int numItems = (maxSize < abstractFifo.getNumReady()) ?
maxSize : abstractFifo.getNumReady();
// Better version (1/27/14)?
int numReady = abstractFifo.getNumReady());
int numItems = (maxSize < numReady ) ? maxSize : numReady;
// Original version:
//int numItems = (maxSize < abstractFifo.getNumReady()) ?
// maxSize : abstractFifo.getNumReady();
int startIndex1, blockSize1, startIndex2, blockSize2;
abstractFifo.prepareToRead(numItems, startIndex1, blockSize1, startIndex2, blockSize2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment