LMMS
Loading...
Searching...
No Matches
juce::AudioData Class Reference

#include <juce_AudioDataConverters.h>

Classes

class  BigEndian
class  LittleEndian
class  NativeEndian
class  Int8
class  UInt8
class  Int16
class  Int24
class  Int32
class  Int24in32
class  Float32
class  NonInterleaved
class  Interleaved
class  NonConst
class  Const
class  Pointer
class  Converter
class  ConverterInstance
struct  Format
struct  ChannelDataSubtypes
struct  ChannelDataSubtypes< IsInterleaved, IsConst, DataFormat, Endianness >
struct  ChannelDataSubtypes< IsInterleaved, IsConst, Format< DataFormat, Endianness > >
struct  ChannelData

Public Types

template<typename... Format>
using InterleavedSource = ChannelData<true, true, Format...>
template<typename... Format>
using InterleavedDest = ChannelData<true, false, Format...>
template<typename... Format>
using NonInterleavedSource = ChannelData<false, true, Format...>
template<typename... Format>
using NonInterleavedDest = ChannelData<false, false, Format...>

Static Public Member Functions

template<typename... SourceFormat, typename... DestFormat>
static void interleaveSamples (NonInterleavedSource< SourceFormat... > source, InterleavedDest< DestFormat... > dest, int numSamples)
template<typename... SourceFormat, typename... DestFormat>
static void deinterleaveSamples (InterleavedSource< SourceFormat... > source, NonInterleavedDest< DestFormat... > dest, int numSamples)

Detailed Description

This class a container which holds all the classes pertaining to the AudioData::Pointer audio sample format class.

See also
AudioData::Pointer.

@tags{Audio}

Member Typedef Documentation

◆ InterleavedDest

template<typename... Format>
using juce::AudioData::InterleavedDest = ChannelData<true, false, Format...>

A sequence of interleaved samples used as the destination for the interleaveSamples() method.

◆ InterleavedSource

template<typename... Format>
using juce::AudioData::InterleavedSource = ChannelData<true, true, Format...>

A sequence of interleaved samples used as the source for the deinterleaveSamples() method.

◆ NonInterleavedDest

template<typename... Format>
using juce::AudioData::NonInterleavedDest = ChannelData<false, false, Format...>

A sequence of non-interleaved samples used as the destination for the deinterleaveSamples() method.

◆ NonInterleavedSource

template<typename... Format>
using juce::AudioData::NonInterleavedSource = ChannelData<false, true, Format...>

A sequence of non-interleaved samples used as the source for the interleaveSamples() method.

Member Function Documentation

◆ deinterleaveSamples()

template<typename... SourceFormat, typename... DestFormat>
void juce::AudioData::deinterleaveSamples ( InterleavedSource< SourceFormat... > source,
NonInterleavedDest< DestFormat... > dest,
int numSamples )
inlinestatic

A helper function for converting a sequence of samples from an interleaved source to a non-interleaved destination.

When calling this method you need to specify the source and destination data format and endianness from the AudioData SampleFormat and Endianness types and provide the data and number of channels for each. For example, to convert a floating-point stream of big endian samples to an non-interleaved, native endian stream of 16-bit integer samples you would do the following:

AudioData::NonInterleavedDest<DestFormat> { destData, numDestChannels },
numSamples);
ChannelData< true, true, Format... > InterleavedSource
Definition juce_AudioDataConverters.h:694
ChannelData< false, false, Format... > NonInterleavedDest
Definition juce_AudioDataConverters.h:700
static void deinterleaveSamples(InterleavedSource< SourceFormat... > source, NonInterleavedDest< DestFormat... > dest, int numSamples)
Definition juce_AudioDataConverters.h:764
Definition juce_AudioDataConverters.h:651

◆ interleaveSamples()

template<typename... SourceFormat, typename... DestFormat>
void juce::AudioData::interleaveSamples ( NonInterleavedSource< SourceFormat... > source,
InterleavedDest< DestFormat... > dest,
int numSamples )
inlinestatic

A helper function for converting a sequence of samples from a non-interleaved source to an interleaved destination.

When calling this method you need to specify the source and destination data format and endianness from the AudioData SampleFormat and Endianness types and provide the data and number of channels for each. For example, to convert a floating-point stream of big endian samples to an interleaved, native endian stream of 16-bit integer samples you would do the following:

AudioData::InterleavedDest<DestFormat> { destData, numDestChannels },
numSamples);
static void interleaveSamples(NonInterleavedSource< SourceFormat... > source, InterleavedDest< DestFormat... > dest, int numSamples)
Definition juce_AudioDataConverters.h:720
ChannelData< true, false, Format... > InterleavedDest
Definition juce_AudioDataConverters.h:696
ChannelData< false, true, Format... > NonInterleavedSource
Definition juce_AudioDataConverters.h:698

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