|
SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for AudioDevice.


Public Member Functions | |
| AudioDeviceRef (AudioDeviceParam resource) | |
| Constructs from AudioDeviceParam. More... | |
| AudioDeviceRef (const AudioDeviceRef &other) | |
| Copy constructor. | |
| ~AudioDeviceRef () | |
| Destructor. | |
Public Member Functions inherited from SDL::AudioDevice | |
| constexpr | AudioDevice ()=default |
| Default ctor. | |
| constexpr | AudioDevice (const AudioDeviceID resource) |
| Constructs from AudioDeviceParam. More... | |
| constexpr | AudioDevice (const AudioDevice &other)=delete |
| Copy constructor. | |
| constexpr | AudioDevice (AudioDevice &&other) |
| Move constructor. | |
| constexpr | AudioDevice (const AudioDeviceRef &other)=delete |
| constexpr | AudioDevice (AudioDeviceRef &&other)=delete |
| AudioDevice (AudioDeviceParam devid, OptionalRef< const AudioSpec > spec) | |
| Open a specific audio device. More... | |
| ~AudioDevice () | |
| Destructor. | |
| AudioDevice & | operator= (AudioDevice other) |
| Assignment operator. | |
| constexpr AudioDeviceID | get () const |
| Retrieves underlying AudioDeviceID. | |
| constexpr AudioDeviceID | release () |
| Retrieves underlying AudioDeviceID and clear this. | |
| constexpr auto | operator<=> (const AudioDevice &other) const =default |
| Comparison. | |
| constexpr bool | operator== (std::nullptr_t _) const |
| Comparison. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr | operator AudioDeviceParam () const |
| Converts to AudioDeviceParam. | |
| void | Close () |
| Close a previously-opened audio device. More... | |
| const char * | GetName () const |
| Get the human-readable name of a specific audio device. More... | |
| AudioSpec | GetFormat (int *sample_frames=nullptr) const |
| Get the current audio format of a specific audio device. More... | |
| OwnArray< int > | GetChannelMap () const |
| Get the current channel map of an audio device. More... | |
| bool | IsPhysical () const |
| Determine if an audio device is physical (instead of logical). More... | |
| bool | IsPlayback () const |
| Determine if an audio device is a playback device (instead of recording). More... | |
| void | Pause () |
| Use this function to pause audio playback on a specified device. More... | |
| void | Resume () |
| Use this function to unpause audio playback on a specified device. More... | |
| bool | Paused () const |
| Use this function to query if an audio device is paused. More... | |
| float | GetGain () const |
| Get the gain of an audio device. More... | |
| void | SetGain (float gain) |
| Change the gain of an audio device. More... | |
| void | BindAudioStreams (std::span< AudioStreamRef > streams) |
| Bind a list of audio streams to an audio device. More... | |
| void | BindAudioStream (AudioStreamParam stream) |
| Bind a single audio stream to an audio device. More... | |
| void | SetPostmixCallback (AudioPostmixCallback callback, void *userdata) |
| Set a callback that fires when data is about to be fed to an audio device. More... | |
| void | SetPostmixCallback (AudioPostmixCB callback) |
| Set a callback that fires when data is about to be fed to an audio device. More... | |
| AudioStream | OpenStream (OptionalRef< const AudioSpec > spec, AudioStreamCallback callback, void *userdata) |
| Convenience function for straightforward audio init for the common case. More... | |
| AudioStream | OpenStream (OptionalRef< const AudioSpec > spec, AudioStreamCB callback) |
| Convenience function for straightforward audio init for the common case. More... | |
|
inline |
| resource | a AudioDeviceID or AudioDevice. |
This does not takes ownership!