OpenShot Audio Library | OpenShotAudio: juce::AudioSourceChannelInfo Struct Reference

OpenShot Audio Library | OpenShotAudio 0.3.1

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::AudioSourceChannelInfo Struct Reference

`#include <juce_AudioSource.h>`

## Public Member Functions
| AudioSourceChannelInfo ()=default
| AudioSourceChannelInfo (AudioBuffer< float > *bufferToUse, int startSampleOffset, int numSamplesToUse) noexcept
| AudioSourceChannelInfo (AudioBuffer< float > &bufferToUse) noexcept
void | clearActiveBufferRegion () const

## Public Attributes
AudioBuffer< float > * | buffer
int | startSample
int | numSamples

## Detailed Description

Used by AudioSource::getNextAudioBlock().

Definition at line 32 of file juce_AudioSource.h.

## Constructor & Destructor Documentation

## ◆ AudioSourceChannelInfo() [1/3]

juce::AudioSourceChannelInfo::AudioSourceChannelInfo | ( |  | ) |
| default

Creates an uninitialised AudioSourceChannelInfo.

## ◆ AudioSourceChannelInfo() [2/3]

juce::AudioSourceChannelInfo::AudioSourceChannelInfo | ( | AudioBuffer< float > * | bufferToUse,
|  | int | startSampleOffset,
|  | int | numSamplesToUse
| ) |  |
| inlinenoexcept

Creates an AudioSourceChannelInfo.

Definition at line 38 of file juce_AudioSource.h.

## ◆ AudioSourceChannelInfo() [3/3]

juce::AudioSourceChannelInfo::AudioSourceChannelInfo | ( | AudioBuffer< float > & | bufferToUse | ) |
| inlineexplicitnoexcept

Creates an AudioSourceChannelInfo that uses the whole of a buffer. Note that the buffer provided must not be deleted while the AudioSourceChannelInfo is still using it.

Definition at line 50 of file juce_AudioSource.h.

## Member Function Documentation

## ◆ clearActiveBufferRegion()

void juce::AudioSourceChannelInfo::clearActiveBufferRegion | ( |  | ) | const
| inline

Convenient method to clear the buffer if the source is not producing any data.

Definition at line 84 of file juce_AudioSource.h.

Referenced by juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), and juce::AudioFormatWriter::writeFromAudioSource().

## Member Data Documentation

## ◆ buffer

AudioBuffer<float>* juce::AudioSourceChannelInfo::buffer

The destination buffer to fill with audio data.

When the AudioSource::getNextAudioBlock() method is called, the active section of this buffer should be filled with whatever output the source produces.

Only the samples specified by the startSample and numSamples members of this structure should be affected by the call.

The contents of the buffer when it is passed to the AudioSource::getNextAudioBlock() method can be treated as the input if the source is performing some kind of filter operation, but should be cleared if this is not the case - the clearActiveBufferRegion() is a handy way of doing this.

The number of channels in the buffer could be anything, so the AudioSource must cope with this in whatever way is appropriate for its function.

Definition at line 73 of file juce_AudioSource.h.

Referenced by juce::AudioSourcePlayer::audioDeviceIOCallback(), juce::ChannelRemappingAudioSource::ChannelRemappingAudioSource(), juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::ReverbAudioSource::getNextAudioBlock(), juce::ToneGeneratorAudioSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), juce::AudioFormatReaderSource::getNextAudioBlock(), and juce::MemoryAudioSource::getNextAudioBlock().

## ◆ numSamples

int juce::AudioSourceChannelInfo::numSamples

The number of samples in the buffer which the callback is expected to fill with data.

Definition at line 81 of file juce_AudioSource.h.

Referenced by juce::AudioSourcePlayer::audioDeviceIOCallback(), juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::ReverbAudioSource::getNextAudioBlock(), juce::ToneGeneratorAudioSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), juce::AudioFormatReaderSource::getNextAudioBlock(), juce::MemoryAudioSource::getNextAudioBlock(), and juce::BufferingAudioSource::waitForNextAudioBlockReady().

## ◆ startSample

int juce::AudioSourceChannelInfo::startSample

The first sample in the buffer from which the callback is expected to write data.

Definition at line 77 of file juce_AudioSource.h.

Referenced by juce::AudioSourcePlayer::audioDeviceIOCallback(), juce::ChannelRemappingAudioSource::ChannelRemappingAudioSource(), juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::ReverbAudioSource::getNextAudioBlock(), juce::ToneGeneratorAudioSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), juce::AudioFormatReaderSource::getNextAudioBlock(), and juce::MemoryAudioSource::getNextAudioBlock().

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

- juce_AudioSource.h