Loading...
Searching...
No Matches
PlaybackDevice.hpp File Reference
#include <SFML/Audio/Export.hpp>#include <functional>#include <optional>#include <string>#include <vector>#include <cstdint>Go to the source code of this file.
Namespaces | |
| namespace | sf |
| namespace | sf::PlaybackDevice |
Typedefs | |
| using | sf::PlaybackDevice::NotificationCallback = std::function<void(Notification notification)> |
| Callable that is called to notify of changes to the playback device state. | |
Enumerations | |
| enum class | sf::PlaybackDevice::Notification { sf::PlaybackDevice::DeviceStarted , sf::PlaybackDevice::DeviceStopped , sf::PlaybackDevice::DeviceRerouted , sf::PlaybackDevice::DeviceInterruptionBegan , sf::PlaybackDevice::DeviceInterruptionEnded , sf::PlaybackDevice::DeviceUnlocked } |
| Enumeration of the playback device notifications. More... | |
Functions | |
| std::vector< std::string > | sf::PlaybackDevice::getAvailableDevices () |
| Get a list of the names of all available audio playback devices. | |
| std::optional< std::string > | sf::PlaybackDevice::getDefaultDevice () |
| Get the name of the default audio playback device. | |
| bool | sf::PlaybackDevice::setDevice (const std::string &name) |
| Set the audio playback device. | |
| bool | sf::PlaybackDevice::setDeviceToDefault () |
| Set the audio playback device to the default. | |
| bool | sf::PlaybackDevice::setDeviceToNull () |
| Set the audio playback device to the null device. | |
| std::optional< std::string > | sf::PlaybackDevice::getDevice () |
| Get the name of the current audio playback device. | |
| std::optional< std::uint32_t > | sf::PlaybackDevice::getDeviceSampleRate () |
| Get the sample rate of the current audio playback device. | |
| bool | sf::PlaybackDevice::isDefaultDevice () |
| Check if the current playback device is the default device. | |
| void | sf::PlaybackDevice::setNotificationCallback (NotificationCallback callback) |
| Set a callback that should be called to notify of changes to the playback device state. | |