Contents

class

SushiDSP::AsioAudioDevice

ASIO-backed IAudioDevice.

Declared in
include/SushiDSP/device/AsioAudioDevice.hpp
Inherits
SushiDSP::IAudioDevice

The only class in SushiDSP that touches ASIO SDK types - no ASIO header leaks past this class's own .cpp file, which is why every SDK-typed member lives behind the opaque Impl below rather than in this header. Windows-only; only built when the ASIO SDK is present (see CMakeLists.txt's SUSHIDSP_BUILD_ASIO block). Duplex: reports genuine input_channels alongside output_channels.

Static public member functions

static std::vector< std::string > enumerate_drivers()

Lists the ASIO driver names currently registered on this machine.

Returns

Driver names, suitable for passing to the constructor.

Public member functions

AsioAudioDevice(const std::string &driver_name, const DeviceFormat &requested_format)

Parameters

driver_name

An exact name from enumerate_drivers().

requested_format

sample_rate/block_size are requests; the opened device's actual negotiated format is returned by format() and may differ. input_channels/ output_channels select how many of the driver's hardware channels (starting from channel 0) this device presents through IAudioDevice.

Exceptions

std::runtime_error

if the driver cannot be loaded or initialized.

~AsioAudioDevice() override

Stops the stream if running, releases the driver's buffers, and unloads it.

AsioAudioDevice(const AsioAudioDevice &)=delete
AsioAudioDevice & operator=(const AsioAudioDevice &)=delete
virtual DeviceFormat format() const override

The negotiated format the driver actually opened with.

Returns

This device's DeviceFormat.

virtual void start(DeviceCallback callback) override

Starts the driver's real-time stream, invoking callback once per block.

Parameters

callback

The per-block render callback.

Exceptions

std::runtime_error

if ASIOStart fails.

virtual void stop() override

Stops the driver's real-time stream and releases the callback.