Audio devices#

namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

namespace DEVICE#

Functions

managerObject &Manager()#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

class device#

Read-only descriptor of an audio device on the host system.

Enumerated and populated by the engine — applications retrieve instances through System().getDevices() (or the indexed getNumDevices / getDevice pair when libYSE is linked dynamically). Use the device to inspect its name, host (ASIO / WASAPI / ALSA / …), available channel layouts, sample rates, and buffer sizes; then pass a deviceSetup derived from that info to System().openDevice.

See also

YSE::deviceSetup

Note

Do not construct directly — instances handed out by the engine are the only valid ones.

Public Functions

device()#

Default constructor used internally by the device enumerator.

device &setName(const std::string &name)#

Set the device name.

Used by the engine when populating the device list.

const std::string &getName() const#

Device name as reported by the host.

device &setTypeName(const std::string &name)#

Set the host (driver) name.

Used internally.

const std::string &getTypeName() const#

Host (driver) name, e.g.

ASIO, WASAPI, ALSA, JACK.

device &addInputChannelName(const std::string &name)#

Internal: append an input channel name to the descriptor.

device &addOutputChannelName(const std::string &name)#

Internal: append an output channel name to the descriptor.

device &addAvailableSampleRate(double sr)#

Internal: register an available sample rate.

device &addAvailableBufferSize(int bs)#

Internal: register an available buffer size.

const std::vector<std::string> &getOutputChannelNames() const#

All output channel names.

Note

Not usable across DLL boundaries — use the indexed getNumOutputChannelNames / getOutputChannelName pair when libYSE is linked dynamically.

const std::vector<std::string> &getInputChannelNames() const#

All input channel names.

Same DLL caveat as getOutputChannelNames.

const std::vector<double> &getAvailableSampleRates() const#

All available sample rates.

Same DLL caveat.

const std::vector<int> &getAvailableBufferSizes() const#

All available buffer sizes.

Same DLL caveat.

unsigned int getNumOutputChannelNames() const#

Number of output channels.

const std::string &getOutputChannelName(unsigned int nr) const#

Name of output channel nr.

unsigned int getNumInputChannelNames() const#

Number of input channels.

const std::string &getInputChannelName(unsigned int nr) const#

Name of input channel nr.

unsigned int getNumAvailableSampleRates() const#

Number of supported sample rates.

double getAvailableSampleRate(unsigned int nr) const#

Supported sample rate at index nr.

unsigned int getNumAvailableBufferSizes() const#

Number of supported buffer sizes.

int getAvailableBufferSize(unsigned int nr) const#

Supported buffer size at index nr.

device &setDefaultBufferSize(int value)#

Set the default buffer size to use when this device is opened.

int getDefaultBufferSize() const#

Default buffer size for this device.

device &setOutputLatency(int value)#

Set the reported output latency in samples.

int getOutputLatency() const#

Reported output latency in samples.

device &setInputLatency(int value)#

Set the reported input latency in samples.

int getInputLatency() const#

Reported input latency in samples.

device &setID(int value)#

Set the host-assigned ID for this device.

int getID() const#

Host-assigned ID for this device.

Private Members

std::string name#
std::string typeName#
std::vector<std::string> outputChannelNames#
std::vector<std::string> inputChannelNames#
std::vector<double> sampleRates#
std::vector<int> bufferSizes#
int defaultBufferSize#
int inputLatency#
int outputLatency#
int ID#
namespace YSE

Public API of libYSE — sound playback, mixing, and 3D positional audio.

Entry points: YSE::System (lifecycle and audio device), YSE::Listener (3D origin), YSE::sound (a playable source), YSE::channel (mixing tree), YSE::reverb (positioned reverb zone), YSE::patcher (modular DSP graph), YSE::player (note sequencer). Sub-namespaces group domain-specific types: YSE::DSP for signal processing, YSE::MIDI for MIDI I/O, YSE::MUSIC for note / chord / motif primitives.

Note

Apart from their constructors, the oscillator and vcf classes must only be invoked from inside a DSP callback / process body.

class deviceSetup#

Public Functions

deviceSetup()#
deviceSetup &setInput(const device &in)#
deviceSetup &setOutput(const device &out)#
deviceSetup &setSampleRate(double value)#
deviceSetup &setBufferSize(int value)#
int getOutputChannels() const#

Private Members

const device *in#
const device *out#
double sampleRate#
int bufferSize#