Contents

class

SushiDSP::Sdl2AudioDevice

SDL2-backed IAudioDevice.

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

The only class in SushiDSP that touches SDL2 — no SDL type or header leaks past this class's own .cpp file.

Public member functions

explicit Sdl2AudioDevice(const DeviceFormat &requested_format)

Opens the default SDL2 audio playback device at the requested format.

Parameters

requested_format

The sample rate, block size, and channel count to request.

~Sdl2AudioDevice() override
virtual DeviceFormat format() const override

The sample rate, block size, and channel counts this device is configured for.

Returns

The device's DeviceFormat.

virtual void start(DeviceCallback callback) override

Begins real-time playback, invoking callback on the device's audio thread.

Parameters

callback

The per-block render callback.

virtual void stop() override

Stops playback and joins the audio thread.