Loading...
Searching...
No Matches
PlaybackDevice.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
Definition PlaybackDevice.hpp:41
std::optional< std::string > getDefaultDevice()
Get the name of the default audio playback device.
bool isDefaultDevice()
Check if the current playback device is the default device.
@ DeviceInterruptionEnded
Playback device interruption has ended (Generated on Apple mobile platforms).
Definition PlaybackDevice.hpp:209
@ DeviceInterruptionBegan
Playback device interruption has begun (Generated on Apple mobile platforms).
Definition PlaybackDevice.hpp:208
@ DeviceRerouted
Playback device has been rerouted (Generated on platforms that support automatic stream routing).
Definition PlaybackDevice.hpp:207
@ DeviceUnlocked
Playback device has been unlocked (Generated by Emscripten/WebAudio).
Definition PlaybackDevice.hpp:210
std::function< void(Notification notification)> NotificationCallback
Callable that is called to notify of changes to the playback device state.
Definition PlaybackDevice.hpp:217
bool setDeviceToNull()
Set the audio playback device to the null device.
std::optional< std::string > getDevice()
Get the name of the current audio playback device.
std::optional< std::uint32_t > getDeviceSampleRate()
Get the sample rate of the current audio playback device.
void setNotificationCallback(NotificationCallback callback)
Set a callback that should be called to notify of changes to the playback device state.
std::vector< std::string > getAvailableDevices()
Get a list of the names of all available audio playback devices.
bool setDeviceToDefault()
Set the audio playback device to the default.