Loading...
Searching...
No Matches
juce::AudioFormatReaderSource Class Reference

## Detailed Description

A type of AudioSource that will read from an AudioFormatReader.

See also
  PositionableAudioSource, AudioTransportSource, BufferingAudioSource

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

- juce_audio_formats/format/juce_AudioFormatReaderSource.h

Inheritance diagram for juce::AudioFormatReaderSource:

## Public Member Functions

| AudioFormatReaderSource (AudioFormatReader *sourceReader, bool deleteReaderWhenThisIsDeleted)
| Creates an AudioFormatReaderSource for a given reader.
| ~AudioFormatReaderSource () override
| Destructor.
void | setLooping (bool shouldLoop) override
| Toggles loop-mode.
bool | isLooping () const override
| Returns whether loop-mode is turned on or not.
AudioFormatReader * | getAudioFormatReader () 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.

## Constructors and Destructors

## AudioFormatReaderSource()

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

Creates an AudioFormatReaderSource for a given reader.

Parameters

  sourceReader | the reader to use as the data source - this must not be null
  deleteReaderWhenThisIsDeleted | if 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

Referenced by getTotalLength().

## ~AudioFormatReaderSource()

juce::AudioFormatReaderSource::~AudioFormatReaderSource | ( |  | ) |

override

Destructor.

## Member Functions

## setLooping()

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

override virtual

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.

## isLooping()

bool juce::AudioFormatReaderSource::isLooping | ( |  | ) | const

inline override virtual

Returns whether loop-mode is turned on or not.

Implements juce::PositionableAudioSource.

## getAudioFormatReader()

AudioFormatReader * juce::AudioFormatReaderSource::getAudioFormatReader | ( |  | ) | const

inline noexcept

Returns the reader that's being used.

## prepareToPlay()

void juce::AudioFormatReaderSource::prepareToPlay | ( | int | samplesPerBlockExpected,
|  | double | sampleRate )

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

## releaseResources()

void juce::AudioFormatReaderSource::releaseResources | ( |  | ) |

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

## getNextAudioBlock()

void juce::AudioFormatReaderSource::getNextAudioBlock | ( | const AudioSourceChannelInfo & |  | ) |

override virtual

Implementation of the AudioSource method.

Implements juce::AudioSource.

## setNextReadPosition()

void juce::AudioFormatReaderSource::setNextReadPosition | ( | int64 | newPosition | ) |

override virtual

Implements the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

## getNextReadPosition()

int64 juce::AudioFormatReaderSource::getNextReadPosition | ( |  | ) | const

override virtual

Implements the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

## getTotalLength()

int64 juce::AudioFormatReaderSource::getTotalLength | ( |  | ) | const

override virtual

Implements the PositionableAudioSource method.

Implements juce::PositionableAudioSource.

References AudioFormatReaderSource().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited