TracktionEngine
Loading...
Searching...
No Matches
engine::WaveDeviceDescription Struct Reference

Describes a group of audio channels from a physical device, which are to be treated as a WaveInputDevice or WaveOutputDevice. More...

#include <tracktion_WaveDeviceDescription.h>

Public Member Functions

 WaveDeviceDescription ()
 Creates an invalid device description.
 WaveDeviceDescription (const juce::String &name, ChannelConfiguration, bool isEnabled)
 Creates a WaveDeviceDescription for a given set of channels.
choc::value::Value toJSON () const
std::string toString () const
void setNumChannels (uint32_t firstChannelIndexInDevice, uint32_t newNumChannels)
void setNumChannels (uint32_t newNumChannels)
void setChannelConfiguration (ChannelConfiguration newChannels)
uint32_t getNumChannels () const
std::pair< uint32_t, uint32_t > getDeviceChannelRange () const
bool operator== (const WaveDeviceDescription &) const
bool operator!= (const WaveDeviceDescription &) const

Static Public Member Functions

static WaveDeviceDescription withNumChannels (const juce::String &name, uint32_t firstChannelIndexInDevice, uint32_t numChannels, bool enabled)
 Creates a canonical WaveDeviceDescription for a number of channels.
static WaveDeviceDescription fromJSON (const choc::value::ValueView &)
static WaveDeviceDescription fromString (const std::string &)

Public Attributes

juce::String name
ChannelConfiguration channels
bool enabled = true

Detailed Description

Describes a group of audio channels from a physical device, which are to be treated as a WaveInputDevice or WaveOutputDevice.

Constructor & Destructor Documentation

◆ WaveDeviceDescription() [1/2]

engine::WaveDeviceDescription::WaveDeviceDescription ( )

Creates an invalid device description.

Referenced by fromJSON(), fromString(), operator!=(), operator==(), and withNumChannels().

◆ WaveDeviceDescription() [2/2]

engine::WaveDeviceDescription::WaveDeviceDescription ( const juce::String & name,
ChannelConfiguration ,
bool isEnabled )

Creates a WaveDeviceDescription for a given set of channels.

References name.

Member Function Documentation

◆ withNumChannels()

WaveDeviceDescription engine::WaveDeviceDescription::withNumChannels ( const juce::String & name,
uint32_t firstChannelIndexInDevice,
uint32_t numChannels,
bool enabled )
static

Creates a canonical WaveDeviceDescription for a number of channels.

References enabled, name, and WaveDeviceDescription().

◆ toJSON()

choc::value::Value engine::WaveDeviceDescription::toJSON ( ) const

◆ fromJSON()

WaveDeviceDescription engine::WaveDeviceDescription::fromJSON ( const choc::value::ValueView & )
static

◆ toString()

std::string engine::WaveDeviceDescription::toString ( ) const

◆ fromString()

WaveDeviceDescription engine::WaveDeviceDescription::fromString ( const std::string & )
static

◆ setNumChannels() [1/2]

void engine::WaveDeviceDescription::setNumChannels ( uint32_t firstChannelIndexInDevice,
uint32_t newNumChannels )

◆ setNumChannels() [2/2]

void engine::WaveDeviceDescription::setNumChannels ( uint32_t newNumChannels)

◆ setChannelConfiguration()

void engine::WaveDeviceDescription::setChannelConfiguration ( ChannelConfiguration newChannels)

◆ getNumChannels()

uint32_t engine::WaveDeviceDescription::getNumChannels ( ) const

◆ getDeviceChannelRange()

std::pair< uint32_t, uint32_t > engine::WaveDeviceDescription::getDeviceChannelRange ( ) const

◆ operator==()

bool engine::WaveDeviceDescription::operator== ( const WaveDeviceDescription & ) const

◆ operator!=()

bool engine::WaveDeviceDescription::operator!= ( const WaveDeviceDescription & ) const

Member Data Documentation

◆ name

juce::String engine::WaveDeviceDescription::name

◆ channels

ChannelConfiguration engine::WaveDeviceDescription::channels

◆ enabled

bool engine::WaveDeviceDescription::enabled = true

Referenced by withNumChannels().


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