Output samples from beginning of the sample buffer. Copies demanded number of samples to output and removes them from the sample buffer. If there are less than 'numsample' samples in the buffer, returns all available. Returns number of samples copied.
| 215 | // |
| 216 | // Returns number of samples copied. |
| 217 | uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples) |
| 218 | { |
| 219 | uint num; |
| 220 | |
| 221 | num = (maxSamples > samplesInBuffer) ? samplesInBuffer : maxSamples; |
| 222 | |
| 223 | memcpy(output, ptrBegin(), channels * sizeof(SAMPLETYPE) * num); |
| 224 | return receiveSamples(num); |
| 225 | } |
| 226 | |
| 227 | |
| 228 | // Removes samples from the beginning of the sample buffer without copying them |
no outgoing calls
no test coverage detected