OpenShot Library | libopenshot-audio
0.2.0
|
31 const bool deleteReaderWhenThisIsDeleted)
32 : reader (r, deleteReaderWhenThisIsDeleted),
36 jassert (reader !=
nullptr);
47 return looping ? nextPlayPos % reader->lengthInSamples
58 const int64 start = nextPlayPos;
62 const int64 newStart = start % reader->lengthInSamples;
63 const int64 newEnd = (start + info.
numSamples) % reader->lengthInSamples;
65 if (newEnd > newStart)
68 (
int) (newEnd - newStart), newStart,
true,
true);
72 const int endSamps = (int) (reader->lengthInSamples - newStart);
75 endSamps, newStart,
true,
true);
78 (
int) newEnd, 0,
true,
true);
int startSample
The first sample in the buffer from which the callback is expected to write data.
int numSamples
The number of samples in the buffer which the callback is expected to fill with data.
AudioBuffer< float > * buffer
The destination buffer to fill with audio data.
Used by AudioSource::getNextAudioBlock().