OpenShot Audio Library | OpenShotAudio 0.4.0
|
#include <juce_ARAAudioReaders.h>
Public Member Functions | |
ARAAudioSourceReader (ARAAudioSource *audioSource) | |
bool | readSamples (int *const *destSamples, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int numSamples) override |
bool | isValid () const |
void | invalidate () |
void | willUpdateAudioSourceProperties (ARAAudioSource *audioSource, ARAAudioSource::PropertiesPtr newProperties) override |
void | doUpdateAudioSourceContent (ARAAudioSource *audioSource, ARAContentUpdateScopes scopeFlags) override |
void | willEnableAudioSourceSamplesAccess (ARAAudioSource *audioSource, bool enable) override |
void | didEnableAudioSourceSamplesAccess (ARAAudioSource *audioSource, bool enable) override |
void | willDestroyAudioSource (ARAAudioSource *audioSource) override |
![]() | |
virtual | ~AudioFormatReader () |
const String & | getFormatName () const noexcept |
bool | read (float *const *destChannels, int numDestChannels, int64 startSampleInSource, int numSamplesToRead) |
bool | read (int *const *destChannels, int numDestChannels, int64 startSampleInSource, int numSamplesToRead, bool fillLeftoverChannelsWithCopies) |
bool | read (AudioBuffer< float > *buffer, int startSampleInDestBuffer, int numSamples, int64 readerStartSample, bool useReaderLeftChan, bool useReaderRightChan) |
virtual void | readMaxLevels (int64 startSample, int64 numSamples, Range< float > *results, int numChannelsToRead) |
virtual void | readMaxLevels (int64 startSample, int64 numSamples, float &lowestLeft, float &highestLeft, float &lowestRight, float &highestRight) |
int64 | searchForLevel (int64 startSample, int64 numSamplesToSearch, double magnitudeRangeMinimum, double magnitudeRangeMaximum, int minimumConsecutiveSamples) |
virtual AudioChannelSet | getChannelLayout () |
virtual bool | readSamples (int *const *destChannels, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int numSamples)=0 |
Additional Inherited Members | |
![]() | |
double | sampleRate = 0 |
unsigned int | bitsPerSample = 0 |
int64 | lengthInSamples = 0 |
unsigned int | numChannels = 0 |
bool | usesFloatingPointData = false |
StringPairArray | metadataValues |
InputStream * | input |
![]() | |
AudioFormatReader (InputStream *sourceStream, const String &formatName) | |
![]() | |
static void | clearSamplesBeyondAvailableLength (int *const *destChannels, int numDestChannels, int startOffsetInDestBuffer, int64 startSampleInFile, int &numSamples, int64 fileLengthInSamples) |
Subclass of AudioFormatReader that reads samples from a single ARA audio source.
Plug-Ins typically use this from their rendering code, wrapped in a BufferingAudioReader to bridge between realtime rendering and non-realtime audio reading.
The reader becomes invalidated if
Definition at line 77 of file juce_ARAAudioReaders.h.
|
explicit |
Use an ARAAudioSource to construct an audio source reader for the given audioSource
.
Definition at line 29 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 48 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 99 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 77 of file juce_ARAAudioReaders.cpp.
void juce::ARAAudioSourceReader::invalidate | ( | ) |
Invalidate the reader - the reader will call this internally if needed, but can also be invalidated from the outside (from message thread only!).
Definition at line 53 of file juce_ARAAudioReaders.cpp.
|
inline |
Returns true as long as the reader's underlying ARAAudioSource remains accessible and its sample content is not changed.
Definition at line 95 of file juce_ARAAudioReaders.h.
Referenced by invalidate(), and readSamples().
|
overridevirtual |
Subclasses must implement this method to perform the low-level read operation.
Callers should use read() instead of calling this directly.
destChannels | the array of destination buffers to fill. Some of these pointers may be null |
numDestChannels | the number of items in the destChannels array. This value is guaranteed not to be greater than the number of channels that this reader object contains |
startOffsetInDestBuffer | the number of samples from the start of the dest data at which to begin writing |
startSampleInFile | the number of samples into the source data at which to begin reading. This value is guaranteed to be >= 0. |
numSamples | the number of samples to read |
Implements juce::AudioFormatReader.
Definition at line 118 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 111 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 87 of file juce_ARAAudioReaders.cpp.
|
override |
Definition at line 66 of file juce_ARAAudioReaders.cpp.