JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType > Class Template Reference

A class that converts between two templated AudioData::Pointer types, and which implements the AudioData::Converter interface. More...

#include <juce_AudioDataConverters.h>

Inheritance diagram for juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >:
Collaboration diagram for juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >:

Public Member Functions

 ConverterInstance (int numSourceChannels=1, int numDestChannels=1)
 
void convertSamples (void *dest, const void *source, int numSamples) const override
 Converts a sequence of samples from the converter's source format into the dest format. More...
 
void convertSamples (void *dest, int destSubChannel, const void *source, int sourceSubChannel, int numSamples) const override
 Converts a sequence of samples from the converter's source format into the dest format. More...
 

Private Attributes

const int destChannels
 
const int sourceChannels
 

Detailed Description

template<class SourceSampleType, class DestSampleType>
class juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >

A class that converts between two templated AudioData::Pointer types, and which implements the AudioData::Converter interface.

This can be used as a concrete instance of the AudioData::Converter abstract class.

See also
AudioData::Converter

Constructor & Destructor Documentation

◆ ConverterInstance()

template<class SourceSampleType , class DestSampleType >
juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >::ConverterInstance ( int  numSourceChannels = 1,
int  numDestChannels = 1 
)
inline

Member Function Documentation

◆ convertSamples() [1/2]

template<class SourceSampleType , class DestSampleType >
void juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples ( void *  destSamples,
const void *  sourceSamples,
int  numSamples 
) const
inlineoverridevirtual

Converts a sequence of samples from the converter's source format into the dest format.

Implements juce::AudioData::Converter.

◆ convertSamples() [2/2]

template<class SourceSampleType , class DestSampleType >
void juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >::convertSamples ( void *  destSamples,
int  destSubChannel,
const void *  sourceSamples,
int  sourceSubChannel,
int  numSamples 
) const
inlineoverridevirtual

Converts a sequence of samples from the converter's source format into the dest format.

This method takes sub-channel indexes, which can be used with interleaved formats in order to choose a particular sub-channel of the data to be used.

Implements juce::AudioData::Converter.

References juce::addBytesToPointer(), jassert, and JUCE_DECLARE_NON_COPYABLE.

Member Data Documentation

◆ destChannels

template<class SourceSampleType , class DestSampleType >
const int juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >::destChannels
private

◆ sourceChannels

template<class SourceSampleType , class DestSampleType >
const int juce::AudioData::ConverterInstance< SourceSampleType, DestSampleType >::sourceChannels
private

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