ReXGlue SDK
Loading...
Searching...
No Matches
rex::apu::IAudioDriver Class Referenceabstract

#include <rex/apu/audio_driver.h>

Inheritance diagram for rex::apu::IAudioDriver:
[legend]

Public Member Functions

virtual Result< u32 > OpenDevice (u32 channels, AudioFill fill)=0
virtual void CloseDevice ()=0
virtual bool IsDeviceLost () const =0
Public Member Functions inherited from rex::IDriver
virtual std::string_view GetName () const =0
virtual Result< void > Initialize (IDriverContext &context)=0
virtual void Shutdown ()=0

Detailed Description

An audio device that pulls samples through its AudioFill. The mix thread makes the calls.

Member Function Documentation

◆ CloseDevice()

virtual void rex::apu::IAudioDriver::CloseDevice ( )
pure virtual

Closes the device. Returns once no call to the fill is running and none starts again.

◆ OpenDevice()

virtual Result< u32 > rex::apu::IAudioDriver::OpenDevice ( u32 channels,
AudioFill fill )
nodiscardpure virtual

Opens the default output device and starts it playing.

Parameters
channelsThe channel count wanted, 6 or 2.
fillCalled for every buffer the device needs. It stays valid until CloseDevice returns.
Returns
The channel count the device plays, 6 or 2, or an error when no device opens.

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