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_formatThe sample rate, block size, and channel count to request.
~Sdl2AudioDevice() overridevirtual DeviceFormat format() const overrideThe sample rate, block size, and channel counts this device is configured for.
Returns
The device's DeviceFormat.
virtual void start(DeviceCallback callback) overrideBegins real-time playback, invoking callback on the device's audio thread.
Parameters
callbackThe per-block render callback.
virtual void stop() overrideStops playback and joins the audio thread.

