OpenShot Audio Library | OpenShotAudio 0.3.2
Loading...
Searching...
No Matches
juce::dsp::AudioBlock< SampleType > Class Template Reference

#include <juce_AudioBlock.h>

Public Types

using NumericType = typename SampleTypeHelpers::ElementType< SampleType >::Type
 

Public Member Functions

 AudioBlock () noexcept=default
 
constexpr AudioBlock (SampleType *const *channelData, size_t numberOfChannels, size_t numberOfSamples) noexcept
 
constexpr AudioBlock (SampleType *const *channelData, size_t numberOfChannels, size_t startSampleIndex, size_t numberOfSamples) noexcept
 
 AudioBlock (HeapBlock< char > &heapBlockToUseForAllocation, size_t numberOfChannels, size_t numberOfSamples, size_t alignmentInBytes=defaultAlignment) noexcept
 
template<typename OtherSampleType >
constexpr AudioBlock (AudioBuffer< OtherSampleType > &buffer) noexcept
 
template<typename OtherSampleType >
 AudioBlock (AudioBuffer< OtherSampleType > &buffer, size_t startSampleIndex) noexcept
 
 AudioBlock (const AudioBlock &other) noexcept=default
 
AudioBlockoperator= (const AudioBlock &other) noexcept=default
 
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0>
 AudioBlock (const AudioBlock< OtherSampleType > &other) noexcept
 
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0>
AudioBlockoperator= (const AudioBlock< OtherSampleType > &other) noexcept
 
void swap (AudioBlock &other) noexcept
 
template<typename OtherSampleType >
constexpr bool operator== (const AudioBlock< OtherSampleType > &other) const noexcept
 
template<typename OtherSampleType >
constexpr bool operator!= (const AudioBlock< OtherSampleType > &other) const noexcept
 
constexpr size_t getNumChannels () const noexcept
 
constexpr size_t getNumSamples () const noexcept
 
SampleType * getChannelPointer (size_t channel) const noexcept
 
AudioBlock getSingleChannelBlock (size_t channel) const noexcept
 
AudioBlock getSubsetChannelBlock (size_t channelStart, size_t numChannelsToUse) const noexcept
 
SampleType getSample (int channel, int sampleIndex) const noexcept
 
void setSample (int destChannel, int destSample, SampleType newValue) const noexcept
 
void addSample (int destChannel, int destSample, SampleType valueToAdd) const noexcept
 
AudioBlockclear () noexcept
 
const AudioBlockclear () const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE fill (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE fill (NumericType value) const noexcept
 
template<typename OtherSampleType >
AudioBlockcopyFrom (const AudioBlock< OtherSampleType > &src) noexcept
 
template<typename OtherSampleType >
const AudioBlockcopyFrom (const AudioBlock< OtherSampleType > &src) const noexcept
 
template<typename OtherNumericType >
AudioBlockcopyFrom (const AudioBuffer< OtherNumericType > &src, size_t srcPos=0, size_t dstPos=0, size_t numElements=std::numeric_limits< size_t >::max())
 
template<typename OtherNumericType >
const AudioBlockcopyFrom (const AudioBuffer< OtherNumericType > &src, size_t srcPos=0, size_t dstPos=0, size_t numElements=std::numeric_limits< size_t >::max()) const
 
void copyTo (AudioBuffer< typename std::remove_const< NumericType >::type > &dst, size_t srcPos=0, size_t dstPos=0, size_t numElements=std::numeric_limits< size_t >::max()) const
 
AudioBlockmove (size_t srcPos, size_t dstPos, size_t numElements=std::numeric_limits< size_t >::max()) noexcept
 
const AudioBlockmove (size_t srcPos, size_t dstPos, size_t numElements=std::numeric_limits< size_t >::max()) const noexcept
 
AudioBlock getSubBlock (size_t newOffset, size_t newLength) const noexcept
 
AudioBlock getSubBlock (size_t newOffset) const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE add (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE add (NumericType value) const noexcept
 
template<typename OtherSampleType >
AudioBlockadd (AudioBlock< OtherSampleType > src) noexcept
 
template<typename OtherSampleType >
const AudioBlockadd (AudioBlock< OtherSampleType > src) const noexcept
 
template<typename OtherSampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithSumOf (AudioBlock< OtherSampleType > src, NumericType value) noexcept
 
template<typename OtherSampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithSumOf (AudioBlock< OtherSampleType > src, NumericType value) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockreplaceWithSumOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockreplaceWithSumOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE subtract (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE subtract (NumericType value) const noexcept
 
template<typename OtherSampleType >
AudioBlocksubtract (AudioBlock< OtherSampleType > src) noexcept
 
template<typename OtherSampleType >
const AudioBlocksubtract (AudioBlock< OtherSampleType > src) const noexcept
 
template<typename OtherSampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithDifferenceOf (AudioBlock< OtherSampleType > src, NumericType value) noexcept
 
template<typename OtherSampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithDifferenceOf (AudioBlock< OtherSampleType > src, NumericType value) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockreplaceWithDifferenceOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockreplaceWithDifferenceOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE multiplyBy (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE multiplyBy (NumericType value) const noexcept
 
template<typename OtherSampleType >
AudioBlockmultiplyBy (AudioBlock< OtherSampleType > src) noexcept
 
template<typename OtherSampleType >
const AudioBlockmultiplyBy (AudioBlock< OtherSampleType > src) const noexcept
 
template<typename OtherSampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithProductOf (AudioBlock< OtherSampleType > src, NumericType value) noexcept
 
template<typename OtherSampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE replaceWithProductOf (AudioBlock< OtherSampleType > src, NumericType value) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockreplaceWithProductOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockreplaceWithProductOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
template<typename SmoothingType >
AudioBlockmultiplyBy (SmoothedValue< SampleType, SmoothingType > &value) noexcept
 
template<typename SmoothingType >
const AudioBlockmultiplyBy (SmoothedValue< SampleType, SmoothingType > &value) const noexcept
 
template<typename OtherSampleType , typename SmoothingType >
AudioBlockreplaceWithProductOf (AudioBlock< OtherSampleType > src, SmoothedValue< SampleType, SmoothingType > &value) noexcept
 
template<typename OtherSampleType , typename SmoothingType >
const AudioBlockreplaceWithProductOf (AudioBlock< OtherSampleType > src, SmoothedValue< SampleType, SmoothingType > &value) const noexcept
 
template<typename OtherSampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE addProductOf (AudioBlock< OtherSampleType > src, NumericType factor) noexcept
 
template<typename OtherSampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE addProductOf (AudioBlock< OtherSampleType > src, NumericType factor) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockaddProductOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockaddProductOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
AudioBlocknegate () noexcept
 
const AudioBlocknegate () const noexcept
 
template<typename OtherSampleType >
AudioBlockreplaceWithNegativeOf (AudioBlock< OtherSampleType > src) noexcept
 
template<typename OtherSampleType >
const AudioBlockreplaceWithNegativeOf (AudioBlock< OtherSampleType > src) const noexcept
 
template<typename OtherSampleType >
AudioBlockreplaceWithAbsoluteValueOf (AudioBlock< OtherSampleType > src) noexcept
 
template<typename OtherSampleType >
const AudioBlockreplaceWithAbsoluteValueOf (AudioBlock< OtherSampleType > src) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockreplaceWithMinOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockreplaceWithMinOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
AudioBlockreplaceWithMaxOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept
 
template<typename Src1SampleType , typename Src2SampleType >
const AudioBlockreplaceWithMaxOf (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) const noexcept
 
Range< typename std::remove_const< NumericType >::type > findMinAndMax () const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE operator+= (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE operator+= (NumericType value) const noexcept
 
AudioBlockoperator+= (AudioBlock src) noexcept
 
const AudioBlockoperator+= (AudioBlock src) const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE operator-= (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE operator-= (NumericType value) const noexcept
 
AudioBlockoperator-= (AudioBlock src) noexcept
 
const AudioBlockoperator-= (AudioBlock src) const noexcept
 
AudioBlock &JUCE_VECTOR_CALLTYPE operator*= (NumericType value) noexcept
 
const AudioBlock &JUCE_VECTOR_CALLTYPE operator*= (NumericType value) const noexcept
 
AudioBlockoperator*= (AudioBlock src) noexcept
 
const AudioBlockoperator*= (AudioBlock src) const noexcept
 
template<typename SmoothingType >
AudioBlockoperator*= (SmoothedValue< SampleType, SmoothingType > &value) noexcept
 
template<typename SmoothingType >
const AudioBlockoperator*= (SmoothedValue< SampleType, SmoothingType > &value) const noexcept
 

Static Public Member Functions

template<typename Src1SampleType , typename Src2SampleType , typename FunctionType >
static void process (AudioBlock< Src1SampleType > inBlock, AudioBlock< Src2SampleType > outBlock, FunctionType &&function)
 

Detailed Description

template<typename SampleType>
class juce::dsp::AudioBlock< SampleType >

Minimal and lightweight data-structure which contains a list of pointers to channels containing some kind of sample data.

This class doesn't own any of the data which it points to, it's simply a view into data that is owned elsewhere. You can construct one from some raw data that you've allocated yourself, or give it a HeapBlock to use, or give it an AudioBuffer which it can refer to, but in all cases the user is responsible for making sure that the data doesn't get deleted while there's still an AudioBlock using it.

Definition at line 64 of file juce_AudioBlock.h.

Member Typedef Documentation

◆ NumericType

template<typename SampleType >
using juce::dsp::AudioBlock< SampleType >::NumericType = typename SampleTypeHelpers::ElementType<SampleType>::Type

Definition at line 77 of file juce_AudioBlock.h.

Constructor & Destructor Documentation

◆ AudioBlock() [1/7]

template<typename SampleType >
juce::dsp::AudioBlock< SampleType >::AudioBlock ( )
defaultnoexcept

Create a zero-sized AudioBlock.

◆ AudioBlock() [2/7]

template<typename SampleType >
constexpr juce::dsp::AudioBlock< SampleType >::AudioBlock ( SampleType *const channelData,
size_t  numberOfChannels,
size_t  numberOfSamples 
)
inlineconstexprnoexcept

Creates an AudioBlock from a pointer to an array of channels. AudioBlock does not copy nor own the memory pointed to by dataToUse. Therefore it is the user's responsibility to ensure that the memory is retained throughout the life-time of the AudioBlock and released when no longer needed.

Definition at line 88 of file juce_AudioBlock.h.

◆ AudioBlock() [3/7]

template<typename SampleType >
constexpr juce::dsp::AudioBlock< SampleType >::AudioBlock ( SampleType *const channelData,
size_t  numberOfChannels,
size_t  startSampleIndex,
size_t  numberOfSamples 
)
inlineconstexprnoexcept

Creates an AudioBlock from a pointer to an array of channels. AudioBlock does not copy nor own the memory pointed to by dataToUse. Therefore it is the user's responsibility to ensure that the memory is retained throughout the life-time of the AudioBlock and released when no longer needed.

Definition at line 101 of file juce_AudioBlock.h.

◆ AudioBlock() [4/7]

template<typename SampleType >
juce::dsp::AudioBlock< SampleType >::AudioBlock ( HeapBlock< char > &  heapBlockToUseForAllocation,
size_t  numberOfChannels,
size_t  numberOfSamples,
size_t  alignmentInBytes = defaultAlignment 
)
inlinenoexcept

Allocates a suitable amount of space in a HeapBlock, and initialises this object to point into it. The HeapBlock must of course not be freed or re-allocated while this object is still in use, because it will be referencing its data.

Definition at line 115 of file juce_AudioBlock.h.

◆ AudioBlock() [5/7]

template<typename SampleType >
constexpr juce::dsp::AudioBlock< SampleType >::AudioBlock ( AudioBuffer< OtherSampleType > &  buffer)
inlineconstexprnoexcept

Creates an AudioBlock that points to the data in an AudioBuffer. AudioBlock does not copy nor own the memory pointed to by dataToUse. Therefore it is the user's responsibility to ensure that the buffer is retained throughout the life-time of the AudioBlock without being modified.

Definition at line 147 of file juce_AudioBlock.h.

◆ AudioBlock() [6/7]

template<typename SampleType >
juce::dsp::AudioBlock< SampleType >::AudioBlock ( AudioBuffer< OtherSampleType > &  buffer,
size_t  startSampleIndex 
)
inlinenoexcept

Creates an AudioBlock that points to the data in an AudioBuffer. AudioBlock does not copy nor own the memory pointed to by dataToUse. Therefore it is the user's responsibility to ensure that the buffer is retained throughout the life-time of the AudioBlock without being modified.

Definition at line 160 of file juce_AudioBlock.h.

◆ AudioBlock() [7/7]

template<typename SampleType >
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0>
juce::dsp::AudioBlock< SampleType >::AudioBlock ( const AudioBlock< OtherSampleType > &  other)
inlinenoexcept

Definition at line 173 of file juce_AudioBlock.h.

Member Function Documentation

◆ add() [1/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::add ( AudioBlock< OtherSampleType src) const
inlinenoexcept

Definition at line 386 of file juce_AudioBlock.h.

◆ add() [2/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::add ( AudioBlock< OtherSampleType src)
inlinenoexcept

Adds the elements in the src block to the elements in this block.

Definition at line 384 of file juce_AudioBlock.h.

◆ add() [3/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::add ( NumericType  value) const
inlinenoexcept

Definition at line 380 of file juce_AudioBlock.h.

◆ add() [4/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::add ( NumericType  value)
inlinenoexcept

Adds a fixed value to the elements in this block.

Definition at line 379 of file juce_AudioBlock.h.

◆ addProductOf() [1/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::addProductOf ( AudioBlock< OtherSampleType src,
NumericType  factor 
) const
inlinenoexcept

Definition at line 464 of file juce_AudioBlock.h.

◆ addProductOf() [2/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::addProductOf ( AudioBlock< OtherSampleType src,
NumericType  factor 
)
inlinenoexcept

Multiplies each value in src by a fixed value and adds the result to this block.

Definition at line 462 of file juce_AudioBlock.h.

◆ addProductOf() [3/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::addProductOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 470 of file juce_AudioBlock.h.

◆ addProductOf() [4/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::addProductOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Multiplies each value in srcA with the corresponding value in srcB and adds the result to this block.

Definition at line 468 of file juce_AudioBlock.h.

◆ addSample()

template<typename SampleType >
void juce::dsp::AudioBlock< SampleType >::addSample ( int  destChannel,
int  destSample,
SampleType  valueToAdd 
) const
inlinenoexcept

Adds a value to a sample in the buffer. The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.

Definition at line 278 of file juce_AudioBlock.h.

◆ clear() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::clear ( ) const
inlinenoexcept

Definition at line 288 of file juce_AudioBlock.h.

◆ clear() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::clear ( )
inlinenoexcept

Clears the memory referenced by this AudioBlock.

Definition at line 287 of file juce_AudioBlock.h.

Referenced by juce::dsp::Convolution::reset().

◆ copyFrom() [1/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::copyFrom ( const AudioBlock< OtherSampleType > &  src) const
inlinenoexcept

Definition at line 298 of file juce_AudioBlock.h.

◆ copyFrom() [2/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::copyFrom ( const AudioBlock< OtherSampleType > &  src)
inlinenoexcept

Copies the values in src to this block.

Definition at line 296 of file juce_AudioBlock.h.

◆ copyFrom() [3/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::copyFrom ( const AudioBuffer< OtherNumericType > &  src,
size_t  srcPos = 0,
size_t  dstPos = 0,
size_t  numElements = std::numeric_limits<size_t>::max() 
)
inline

Copy the values from an AudioBuffer to this block.

All indices and sizes are in this AudioBlock's units, i.e. if SampleType is a SIMDRegister then incrementing srcPos by one will increase the sample position in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.

Definition at line 307 of file juce_AudioBlock.h.

◆ copyFrom() [4/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::copyFrom ( const AudioBuffer< OtherNumericType > &  src,
size_t  srcPos = 0,
size_t  dstPos = 0,
size_t  numElements = std::numeric_limits<size_t>::max() 
) const
inline

Definition at line 311 of file juce_AudioBlock.h.

◆ copyTo()

template<typename SampleType >
void juce::dsp::AudioBlock< SampleType >::copyTo ( AudioBuffer< typename std::remove_const< NumericType >::type > &  dst,
size_t  srcPos = 0,
size_t  dstPos = 0,
size_t  numElements = std::numeric_limits<size_t>::max() 
) const
inline

Copies the values from this block to an AudioBuffer.

All indices and sizes are in this AudioBlock's units, i.e. if SampleType is a SIMDRegister then incrementing dstPos by one will increase the sample position in the AudioBuffer's units by a factor of SIMDRegister<SampleType>::SIMDNumElements.

Definition at line 322 of file juce_AudioBlock.h.

◆ fill() [1/2]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::fill ( NumericType  value) const
inlinenoexcept

Definition at line 292 of file juce_AudioBlock.h.

◆ fill() [2/2]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::fill ( NumericType  value)
inlinenoexcept

Fills the memory referenced by this AudioBlock with value.

Definition at line 291 of file juce_AudioBlock.h.

◆ findMinAndMax()

template<typename SampleType >
Range< typename std::remove_const< NumericType >::type > juce::dsp::AudioBlock< SampleType >::findMinAndMax ( ) const
inlinenoexcept

Finds the minimum and maximum value of the buffer.

Definition at line 504 of file juce_AudioBlock.h.

◆ getChannelPointer()

template<typename SampleType >
SampleType * juce::dsp::AudioBlock< SampleType >::getChannelPointer ( size_t  channel) const
inlinenoexcept

Returns a raw pointer into one of the channels in this block.

Definition at line 223 of file juce_AudioBlock.h.

Referenced by juce::dsp::Convolution::Pimpl::copyBufferToTemporaryLocation().

◆ getNumChannels()

template<typename SampleType >
constexpr size_t juce::dsp::AudioBlock< SampleType >::getNumChannels ( ) const
inlineconstexprnoexcept

Returns the number of channels referenced by this block.

Definition at line 217 of file juce_AudioBlock.h.

Referenced by juce::dsp::Convolution::Pimpl::copyBufferToTemporaryLocation().

◆ getNumSamples()

template<typename SampleType >
constexpr size_t juce::dsp::AudioBlock< SampleType >::getNumSamples ( ) const
inlineconstexprnoexcept

Returns the number of samples referenced by this block.

Definition at line 220 of file juce_AudioBlock.h.

Referenced by juce::dsp::Convolution::Pimpl::copyBufferToTemporaryLocation(), and juce::dsp::AudioBlock< SampleType >::getSubBlock().

◆ getSample()

template<typename SampleType >
SampleType juce::dsp::AudioBlock< SampleType >::getSample ( int  channel,
int  sampleIndex 
) const
inlinenoexcept

Returns a sample from the buffer. The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.

Definition at line 254 of file juce_AudioBlock.h.

◆ getSingleChannelBlock()

template<typename SampleType >
AudioBlock juce::dsp::AudioBlock< SampleType >::getSingleChannelBlock ( size_t  channel) const
inlinenoexcept

Returns an AudioBlock that represents one of the channels in this block.

Definition at line 231 of file juce_AudioBlock.h.

◆ getSubBlock() [1/2]

template<typename SampleType >
AudioBlock juce::dsp::AudioBlock< SampleType >::getSubBlock ( size_t  newOffset) const
inlinenoexcept

Return a new AudioBlock pointing to a sub-block inside this block. This function does not copy the memory and you must ensure that the original memory pointed to by the receiver remains valid through-out the life-time of the returned sub-block.

Parameters
newOffsetThe index of an element inside the block which will will become the first element of the return value. The return value will include all subsequent elements of the receiver.

Definition at line 372 of file juce_AudioBlock.h.

◆ getSubBlock() [2/2]

template<typename SampleType >
AudioBlock juce::dsp::AudioBlock< SampleType >::getSubBlock ( size_t  newOffset,
size_t  newLength 
) const
inlinenoexcept

Return a new AudioBlock pointing to a sub-block inside this block. This function does not copy the memory and you must ensure that the original memory pointed to by the receiver remains valid through-out the life-time of the returned sub-block.

Parameters
newOffsetThe index of an element inside the receiver which will will become the first element of the return value.
newLengthThe number of elements of the newly created sub-block.

Definition at line 354 of file juce_AudioBlock.h.

Referenced by juce::dsp::AudioBlock< SampleType >::getSubBlock(), and juce::dsp::Convolution::Pimpl::processSamples().

◆ getSubsetChannelBlock()

template<typename SampleType >
AudioBlock juce::dsp::AudioBlock< SampleType >::getSubsetChannelBlock ( size_t  channelStart,
size_t  numChannelsToUse 
) const
inlinenoexcept

Returns a subset of contiguous channels

Parameters
channelStartFirst channel of the subset
numChannelsToUseCount of channels in the subset

Definition at line 241 of file juce_AudioBlock.h.

◆ move() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::move ( size_t  srcPos,
size_t  dstPos,
size_t  numElements = std::numeric_limits<size_t>::max() 
) const
inlinenoexcept

Definition at line 341 of file juce_AudioBlock.h.

◆ move() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::move ( size_t  srcPos,
size_t  dstPos,
size_t  numElements = std::numeric_limits<size_t>::max() 
)
inlinenoexcept

Move memory within this block from the position srcPos to the position dstPos. If numElements is not specified then move will move the maximum amount of memory.

Definition at line 339 of file juce_AudioBlock.h.

◆ multiplyBy() [1/6]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::multiplyBy ( AudioBlock< OtherSampleType src) const
inlinenoexcept

Definition at line 432 of file juce_AudioBlock.h.

◆ multiplyBy() [2/6]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::multiplyBy ( AudioBlock< OtherSampleType src)
inlinenoexcept

Multiplies the elements in this block by the elements in the src block

Definition at line 430 of file juce_AudioBlock.h.

◆ multiplyBy() [3/6]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::multiplyBy ( NumericType  value) const
inlinenoexcept

Definition at line 426 of file juce_AudioBlock.h.

◆ multiplyBy() [4/6]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::multiplyBy ( NumericType  value)
inlinenoexcept

Multiplies the elements in this block by a fixed value.

Definition at line 425 of file juce_AudioBlock.h.

◆ multiplyBy() [5/6]

template<typename SampleType >
template<typename SmoothingType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::multiplyBy ( SmoothedValue< SampleType, SmoothingType > &  value) const
inlinenoexcept

Definition at line 451 of file juce_AudioBlock.h.

◆ multiplyBy() [6/6]

template<typename SampleType >
template<typename SmoothingType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::multiplyBy ( SmoothedValue< SampleType, SmoothingType > &  value)
inlinenoexcept

Multiplies each channels of this block by a smoothly changing value.

Definition at line 449 of file juce_AudioBlock.h.

◆ negate() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::negate ( ) const
inlinenoexcept

Definition at line 475 of file juce_AudioBlock.h.

◆ negate() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::negate ( )
inlinenoexcept

Negates each value of this block.

Definition at line 474 of file juce_AudioBlock.h.

◆ operator!=()

template<typename SampleType >
constexpr bool juce::dsp::AudioBlock< SampleType >::operator!= ( const AudioBlock< OtherSampleType > &  other) const
inlineconstexprnoexcept

Definition at line 210 of file juce_AudioBlock.h.

◆ operator*=() [1/6]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::operator*= ( AudioBlock< SampleType >  src) const
inlinenoexcept

Definition at line 536 of file juce_AudioBlock.h.

◆ operator*=() [2/6]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::operator*= ( AudioBlock< SampleType >  src)
inlinenoexcept

Definition at line 535 of file juce_AudioBlock.h.

◆ operator*=() [3/6]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator*= ( NumericType  value) const
inlinenoexcept

Definition at line 533 of file juce_AudioBlock.h.

◆ operator*=() [4/6]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator*= ( NumericType  value)
inlinenoexcept

Definition at line 532 of file juce_AudioBlock.h.

◆ operator*=() [5/6]

template<typename SampleType >
template<typename SmoothingType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::operator*= ( SmoothedValue< SampleType, SmoothingType > &  value) const
inlinenoexcept

Definition at line 541 of file juce_AudioBlock.h.

◆ operator*=() [6/6]

template<typename SampleType >
template<typename SmoothingType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::operator*= ( SmoothedValue< SampleType, SmoothingType > &  value)
inlinenoexcept

Definition at line 539 of file juce_AudioBlock.h.

◆ operator+=() [1/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::operator+= ( AudioBlock< SampleType >  src) const
inlinenoexcept

Definition at line 524 of file juce_AudioBlock.h.

◆ operator+=() [2/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::operator+= ( AudioBlock< SampleType >  src)
inlinenoexcept

Definition at line 523 of file juce_AudioBlock.h.

◆ operator+=() [3/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator+= ( NumericType  value) const
inlinenoexcept

Definition at line 521 of file juce_AudioBlock.h.

◆ operator+=() [4/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator+= ( NumericType  value)
inlinenoexcept

Definition at line 520 of file juce_AudioBlock.h.

◆ operator-=() [1/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::operator-= ( AudioBlock< SampleType >  src) const
inlinenoexcept

Definition at line 530 of file juce_AudioBlock.h.

◆ operator-=() [2/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::operator-= ( AudioBlock< SampleType >  src)
inlinenoexcept

Definition at line 529 of file juce_AudioBlock.h.

◆ operator-=() [3/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator-= ( NumericType  value) const
inlinenoexcept

Definition at line 527 of file juce_AudioBlock.h.

◆ operator-=() [4/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::operator-= ( NumericType  value)
inlinenoexcept

Definition at line 526 of file juce_AudioBlock.h.

◆ operator=()

template<typename SampleType >
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0>
AudioBlock & juce::dsp::AudioBlock< SampleType >::operator= ( const AudioBlock< OtherSampleType > &  other)
inlinenoexcept

Definition at line 182 of file juce_AudioBlock.h.

◆ operator==()

template<typename SampleType >
constexpr bool juce::dsp::AudioBlock< SampleType >::operator== ( const AudioBlock< OtherSampleType > &  other) const
inlineconstexprnoexcept

Definition at line 199 of file juce_AudioBlock.h.

◆ process()

template<typename SampleType >
static void juce::dsp::AudioBlock< SampleType >::process ( AudioBlock< Src1SampleType inBlock,
AudioBlock< Src2SampleType outBlock,
FunctionType &&  function 
)
inlinestatic

Applies a function to each value in an input block, putting the result into an output block. The function supplied must take a SampleType as its parameter, and return a SampleType. The two blocks must have the same number of channels and samples.

Definition at line 559 of file juce_AudioBlock.h.

Referenced by juce::dsp::WaveShaper< FloatType, Function >::process().

◆ replaceWithAbsoluteValueOf() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithAbsoluteValueOf ( AudioBlock< OtherSampleType src) const
inlinenoexcept

Definition at line 487 of file juce_AudioBlock.h.

◆ replaceWithAbsoluteValueOf() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithAbsoluteValueOf ( AudioBlock< OtherSampleType src)
inlinenoexcept

Replaces the contents of this block with the absolute values of the src block.

Definition at line 485 of file juce_AudioBlock.h.

◆ replaceWithDifferenceOf() [1/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithDifferenceOf ( AudioBlock< OtherSampleType src,
NumericType  value 
) const
inlinenoexcept

Definition at line 415 of file juce_AudioBlock.h.

◆ replaceWithDifferenceOf() [2/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithDifferenceOf ( AudioBlock< OtherSampleType src,
NumericType  value 
)
inlinenoexcept

Subtracts a fixed value from each source value and replaces the contents of this block.

Definition at line 413 of file juce_AudioBlock.h.

◆ replaceWithDifferenceOf() [3/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithDifferenceOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 421 of file juce_AudioBlock.h.

◆ replaceWithDifferenceOf() [4/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithDifferenceOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Subtracts each source2 value from the corresponding source1 value and replaces the contents of this block.

Definition at line 419 of file juce_AudioBlock.h.

◆ replaceWithMaxOf() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithMaxOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 500 of file juce_AudioBlock.h.

◆ replaceWithMaxOf() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithMaxOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Replaces each element of this block with the maximum of the corresponding element of the source arrays.

Definition at line 498 of file juce_AudioBlock.h.

◆ replaceWithMinOf() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithMinOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 494 of file juce_AudioBlock.h.

◆ replaceWithMinOf() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithMinOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Replaces each element of this block with the minimum of the corresponding element of the source arrays.

Definition at line 492 of file juce_AudioBlock.h.

◆ replaceWithNegativeOf() [1/2]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithNegativeOf ( AudioBlock< OtherSampleType src) const
inlinenoexcept

Definition at line 481 of file juce_AudioBlock.h.

◆ replaceWithNegativeOf() [2/2]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithNegativeOf ( AudioBlock< OtherSampleType src)
inlinenoexcept

Replaces the contents of this block with the negative of the values in the src block.

Definition at line 479 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [1/6]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< OtherSampleType src,
NumericType  value 
) const
inlinenoexcept

Definition at line 438 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [2/6]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< OtherSampleType src,
NumericType  value 
)
inlinenoexcept

Replaces the elements in this block with the product of the elements in the source src block and a fixed value.

Definition at line 436 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [3/6]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< OtherSampleType src,
SmoothedValue< SampleType, SmoothingType > &  value 
) const
inlinenoexcept

Definition at line 457 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [4/6]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< OtherSampleType src,
SmoothedValue< SampleType, SmoothingType > &  value 
)
inlinenoexcept

Replaces each channel of this block with the product of the src block and a smoothed value.

Definition at line 455 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [5/6]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 444 of file juce_AudioBlock.h.

◆ replaceWithProductOf() [6/6]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithProductOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Replaces the elements in this block with the product of the elements in the src1 and scr2 blocks.

Definition at line 442 of file juce_AudioBlock.h.

◆ replaceWithSumOf() [1/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithSumOf ( AudioBlock< OtherSampleType src,
NumericType  value 
) const
inlinenoexcept

Definition at line 392 of file juce_AudioBlock.h.

◆ replaceWithSumOf() [2/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::replaceWithSumOf ( AudioBlock< OtherSampleType src,
NumericType  value 
)
inlinenoexcept

Adds a fixed value to each source value and replaces the contents of this block.

Definition at line 390 of file juce_AudioBlock.h.

◆ replaceWithSumOf() [3/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithSumOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
) const
inlinenoexcept

Definition at line 398 of file juce_AudioBlock.h.

◆ replaceWithSumOf() [4/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::replaceWithSumOf ( AudioBlock< Src1SampleType src1,
AudioBlock< Src2SampleType src2 
)
inlinenoexcept

Adds each source1 value to the corresponding source2 value and replaces the contents of this block.

Definition at line 396 of file juce_AudioBlock.h.

◆ setSample()

template<typename SampleType >
void juce::dsp::AudioBlock< SampleType >::setSample ( int  destChannel,
int  destSample,
SampleType  newValue 
) const
inlinenoexcept

Modifies a sample in the buffer. The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.

Definition at line 266 of file juce_AudioBlock.h.

◆ subtract() [1/4]

template<typename SampleType >
const AudioBlock & juce::dsp::AudioBlock< SampleType >::subtract ( AudioBlock< OtherSampleType src) const
inlinenoexcept

Definition at line 409 of file juce_AudioBlock.h.

◆ subtract() [2/4]

template<typename SampleType >
AudioBlock & juce::dsp::AudioBlock< SampleType >::subtract ( AudioBlock< OtherSampleType src)
inlinenoexcept

Subtracts the source values from the elements in this block.

Definition at line 407 of file juce_AudioBlock.h.

◆ subtract() [3/4]

template<typename SampleType >
const AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::subtract ( NumericType  value) const
inlinenoexcept

Definition at line 403 of file juce_AudioBlock.h.

◆ subtract() [4/4]

template<typename SampleType >
AudioBlock &JUCE_VECTOR_CALLTYPE juce::dsp::AudioBlock< SampleType >::subtract ( NumericType  value)
inlinenoexcept

Subtracts a fixed value from the elements in this block.

Definition at line 402 of file juce_AudioBlock.h.

◆ swap()

template<typename SampleType >
void juce::dsp::AudioBlock< SampleType >::swap ( AudioBlock< SampleType > &  other)
inlinenoexcept

Definition at line 189 of file juce_AudioBlock.h.


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