#include <tracktion_BufferedFileReader.h>
Inherits juce::AudioFormatReader, and juce::TimeSliceClient.
|
| | BufferedFileReader (juce::AudioFormatReader *sourceReader, juce::TimeSliceThread &timeSliceThread, int samplesToBuffer) |
| | Creates a reader.
|
| |
| | ~BufferedFileReader () override |
| | Destructor.
|
| |
| void | setReadTimeout (int timeoutMilliseconds) noexcept |
| | Sets a number of milliseconds that the reader can block for in its readSamples() method before giving up and returning silence.
|
| |
| bool | isFullyBuffered () const |
| | Returns true if this has been initialised to buffer the whole file once that is complete, false otherwise.
|
| |
| bool | readSamples (int *const *destSamples, int numDestChannels, int startOffsetInDestBuffer, juce::int64 startSampleInFile, int numSamples) override |
| |
An AudioFormatReader that uses a background thread to pre-read data from another reader.
N.B. This class is in development and not ready for public use yet!!
◆ BufferedFileReader()
| tracktion::engine::BufferedFileReader::BufferedFileReader |
( |
juce::AudioFormatReader * |
sourceReader, |
|
|
juce::TimeSliceThread & |
timeSliceThread, |
|
|
int |
samplesToBuffer |
|
) |
| |
Creates a reader.
- Parameters
-
| sourceReader | the source reader to wrap. This BufferingAudioReader takes ownership of this object and will delete it later when no longer needed |
| timeSliceThread | the thread that should be used to do the background reading. Make sure that the thread you supply is running, and won't be deleted while the reader object still exists. |
| samplesToBuffer | the total number of samples to buffer ahead. Pass -1 to buffer the whole source |
◆ ~BufferedFileReader()
| tracktion::engine::BufferedFileReader::~BufferedFileReader |
( |
| ) |
|
|
override |
◆ setReadTimeout()
| void tracktion::engine::BufferedFileReader::setReadTimeout |
( |
int |
timeoutMilliseconds | ) |
|
|
noexcept |
Sets a number of milliseconds that the reader can block for in its readSamples() method before giving up and returning silence.
A value of less that 0 means "wait forever". The default timeout is 0 which means don't wait at all.
◆ isFullyBuffered()
| bool tracktion::engine::BufferedFileReader::isFullyBuffered |
( |
| ) |
const |
Returns true if this has been initialised to buffer the whole file once that is complete, false otherwise.
◆ readSamples()
| bool tracktion::engine::BufferedFileReader::readSamples |
( |
int *const * |
destSamples, |
|
|
int |
numDestChannels, |
|
|
int |
startOffsetInDestBuffer, |
|
|
juce::int64 |
startSampleInFile, |
|
|
int |
numSamples |
|
) |
| |
|
override |
The documentation for this class was generated from the following file: