OpenShot Library | OpenShotAudio  0.2.2
juce::AudioFormatReaderSource Class Reference

A type of AudioSource that will read from an AudioFormatReader. More...

#include <juce_AudioFormatReaderSource.h>

+ Inheritance diagram for juce::AudioFormatReaderSource:

Public Member Functions

 AudioFormatReaderSource (AudioFormatReader *sourceReader, bool deleteReaderWhenThisIsDeleted)
 Creates an AudioFormatReaderSource for a given reader. More...
 
 ~AudioFormatReaderSource () override
 Destructor.
 
void setLooping (bool shouldLoop) override
 Toggles loop-mode. More...
 
bool isLooping () const override
 Returns whether loop-mode is turned on or not.
 
AudioFormatReadergetAudioFormatReader () const noexcept
 Returns the reader that's being used.
 
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override
 Implementation of the AudioSource method.
 
void releaseResources () override
 Implementation of the AudioSource method.
 
void getNextAudioBlock (const AudioSourceChannelInfo &) override
 Implementation of the AudioSource method.
 
void setNextReadPosition (int64 newPosition) override
 Implements the PositionableAudioSource method.
 
int64 getNextReadPosition () const override
 Implements the PositionableAudioSource method.
 
int64 getTotalLength () const override
 Implements the PositionableAudioSource method.
 
- Public Member Functions inherited from juce::PositionableAudioSource
 ~PositionableAudioSource () override=default
 Destructor.
 
- Public Member Functions inherited from juce::AudioSource
virtual ~AudioSource ()=default
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from juce::PositionableAudioSource
 PositionableAudioSource ()=default
 Creates the PositionableAudioSource.
 
- Protected Member Functions inherited from juce::AudioSource
 AudioSource ()=default
 Creates an AudioSource.
 

Detailed Description

Constructor & Destructor Documentation

◆ AudioFormatReaderSource()

juce::AudioFormatReaderSource::AudioFormatReaderSource ( AudioFormatReader sourceReader,
bool  deleteReaderWhenThisIsDeleted 
)

Creates an AudioFormatReaderSource for a given reader.

Parameters
sourceReaderthe reader to use as the data source - this must not be null
deleteReaderWhenThisIsDeletedif true, the reader passed-in will be deleted when this object is deleted; if false it will be left up to the caller to manage its lifetime

Definition at line 30 of file juce_AudioFormatReaderSource.cpp.

Member Function Documentation

◆ setLooping()

void juce::AudioFormatReaderSource::setLooping ( bool  shouldLoop)
overridevirtual

Toggles loop-mode.

If set to true, it will continuously loop the input source. If false, it will just emit silence after the source has finished.

See also
isLooping

Reimplemented from juce::PositionableAudioSource.

Definition at line 43 of file juce_AudioFormatReaderSource.cpp.


The documentation for this class was generated from the following files: