Minimal and lightweight data-structure which contains a list of pointers to channels containing some kind of sample data.
More...
|
forcedinline | AudioBlock () noexcept=default |
| Create a zero-sized AudioBlock. More...
|
|
forcedinline | AudioBlock (SampleType *const *channelData, size_t numberOfChannels, size_t numberOfSamples) noexcept |
| Creates an AudioBlock from a pointer to an array of channels. More...
|
|
forcedinline | AudioBlock (SampleType *const *channelData, size_t numberOfChannels, size_t startSampleIndex, size_t numberOfSamples) noexcept |
| Creates an AudioBlock from a pointer to an array of channels. More...
|
|
| AudioBlock (HeapBlock< char > &heapBlockToUseForAllocation, size_t numberOfChannels, size_t numberOfSamples, size_t alignmentInBytes=defaultAlignment) noexcept |
| Allocates a suitable amount of space in a HeapBlock, and initialises this object to point into it. More...
|
|
template<typename OtherSampleType > |
| AudioBlock (AudioBuffer< OtherSampleType > &buffer) noexcept |
| Creates an AudioBlock that points to the data in an AudioBuffer. More...
|
|
template<typename OtherSampleType > |
| AudioBlock (AudioBuffer< OtherSampleType > &buffer, size_t startSampleIndex) noexcept |
| Creates an AudioBlock that points to the data in an AudioBuffer. More...
|
|
| AudioBlock (const AudioBlock &other) noexcept=default |
|
AudioBlock & | operator= (const AudioBlock &other) noexcept=default |
|
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0> |
| AudioBlock (const AudioBlock< OtherSampleType > &other) noexcept |
|
template<typename OtherSampleType , MayUseConvertingConstructor< OtherSampleType > = 0> |
AudioBlock & | operator= (const AudioBlock< OtherSampleType > &other) noexcept |
|
void | swap (AudioBlock &other) noexcept |
|
template<typename OtherSampleType > |
bool | operator== (const AudioBlock< OtherSampleType > &other) const noexcept |
|
template<typename OtherSampleType > |
bool | operator!= (const AudioBlock< OtherSampleType > &other) const noexcept |
|
forcedinline size_t | getNumSamples () const noexcept |
|
forcedinline size_t | getNumChannels () const noexcept |
|
forcedinline const SampleType * | getChannelPointer (size_t channel) const noexcept |
| Returns a raw pointer into one of the channels in this block. More...
|
|
forcedinline SampleType * | getChannelPointer (size_t channel) noexcept |
| Returns a raw pointer into one of the channels in this block. More...
|
|
forcedinline AudioBlock | getSingleChannelBlock (size_t channel) const noexcept |
| Returns an AudioBlock that represents one of the channels in this block. More...
|
|
forcedinline AudioBlock | getSubsetChannelBlock (size_t channelStart, size_t numChannelsToUse) const noexcept |
| Returns a subset of continguous channels. More...
|
|
SampleType | getSample (int channel, int sampleIndex) const noexcept |
| Returns a sample from the buffer. More...
|
|
void | setSample (int destChannel, int destSample, SampleType newValue) noexcept |
| Modifies a sample in the buffer. More...
|
|
void | addSample (int destChannel, int destSample, SampleType valueToAdd) noexcept |
| Adds a value to a sample in the buffer. More...
|
|
forcedinline AudioBlock & | clear () noexcept |
| Clear the memory described by this AudioBlock. More...
|
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | fill (SampleType value) noexcept |
| Fill memory with value. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | copy (const AudioBlock< OtherSampleType > &src) noexcept |
| Copy the values in src to the receiver. More...
|
|
forcedinline AudioBlock & | copyFrom (const AudioBuffer< NumericType > &src, size_t srcPos=0, size_t dstPos=0, size_t numElements=std::numeric_limits< size_t >::max()) |
| Copy the values from a JUCE's AudioBuffer to the receiver. More...
|
|
forcedinline const AudioBlock & | copyTo (AudioBuffer< NumericType > &dst, size_t srcPos=0, size_t dstPos=0, size_t numElements=std::numeric_limits< size_t >::max()) const |
| Copy the values from the receiver to a JUCE's AudioBuffer. More...
|
|
forcedinline AudioBlock & | move (size_t srcPos, size_t dstPos, size_t numElements=std::numeric_limits< size_t >::max()) noexcept |
| Move memory within the receiver from the position srcPos to the position dstPos. More...
|
|
AudioBlock | getSubBlock (size_t newOffset, size_t newLength) const noexcept |
| Return a new AudioBlock pointing to a sub-block inside the receiver. More...
|
|
AudioBlock | getSubBlock (size_t newOffset) const noexcept |
| Return a new AudioBlock pointing to a sub-block inside the receiver. More...
|
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | add (SampleType value) noexcept |
| Adds a fixed value to the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | add (AudioBlock< OtherSampleType > src) noexcept |
| Adds the source values to the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | add (AudioBlock< OtherSampleType > src, SampleType value) noexcept |
| Adds a fixed value to each source value and stores it in the destination array of the receiver. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | add (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Adds each source1 value to the corresponding source2 value and stores it in the destination array of the receiver. More...
|
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | subtract (SampleType value) noexcept |
| Subtracts a fixed value from the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | subtract (AudioBlock< OtherSampleType > src) noexcept |
| Subtracts the source values from the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | subtract (AudioBlock< OtherSampleType > src, SampleType value) noexcept |
| Subtracts a fixed value from each source value and stores it in the destination array of the receiver. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | subtract (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Subtracts each source2 value from the corresponding source1 value and stores it in the destination array of the receiver. More...
|
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | multiply (SampleType value) noexcept |
| Multiplies a fixed value to the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | multiply (AudioBlock< OtherSampleType > src) noexcept |
| Multiplies the source values to the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | multiply (AudioBlock< OtherSampleType > src, SampleType value) noexcept |
| Multiplies a fixed value to each source value and stores it in the destination array of the receiver. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | multiply (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Multiplies each source1 value to the corresponding source2 value and stores it in the destination array of the receiver. More...
|
|
template<typename SmoothingType > |
AudioBlock & | multiply (SmoothedValue< SampleType, SmoothingType > &value) noexcept |
| Multiplies all channels of the AudioBlock by a smoothly changing value and stores them . More...
|
|
template<typename OtherSampleType , typename SmoothingType > |
AudioBlock & | multiply (AudioBlock< OtherSampleType > src, SmoothedValue< SampleType, SmoothingType > &value) noexcept |
| Multiplies all channels of the source by a smoothly changing value and stores them in the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | addWithMultiply (AudioBlock< OtherSampleType > src, SampleType factor) noexcept |
| Multiplies each value in src with factor and adds the result to the receiver. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | addWithMultiply (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Multiplies each value in srcA with the corresponding value in srcB and adds the result to the receiver. More...
|
|
forcedinline AudioBlock & | negate () noexcept |
| Negates each value of the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | replaceWithNegativeOf (AudioBlock< OtherSampleType > src) noexcept |
| Negates each value of source and stores it in the receiver. More...
|
|
template<typename OtherSampleType > |
forcedinline AudioBlock & | replaceWithAbsoluteValueOf (AudioBlock< OtherSampleType > src) noexcept |
| Takes the absolute value of each element of src and stores it inside the receiver. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | min (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Each element of receiver will be the minimum of the corresponding element of the source arrays. More...
|
|
template<typename Src1SampleType , typename Src2SampleType > |
forcedinline AudioBlock & | max (AudioBlock< Src1SampleType > src1, AudioBlock< Src2SampleType > src2) noexcept |
| Each element of the receiver will be the maximum of the corresponding element of the source arrays. More...
|
|
forcedinline Range< NumericType > | findMinAndMax () const noexcept |
| Finds the minimum and maximum value of the buffer. More...
|
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | operator+= (SampleType src) noexcept |
|
forcedinline AudioBlock & | operator+= (AudioBlock src) noexcept |
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | operator-= (SampleType src) noexcept |
|
forcedinline AudioBlock & | operator-= (AudioBlock src) noexcept |
|
forcedinline AudioBlock &JUCE_VECTOR_CALLTYPE | operator*= (SampleType src) noexcept |
|
forcedinline AudioBlock & | operator*= (AudioBlock src) noexcept |
|
template<typename SmoothingType > |
forcedinline AudioBlock & | operator*= (SmoothedValue< SampleType, SmoothingType > &value) noexcept |
|
template<typename SampleType>
class 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.