mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Add sfPlaybackDevice to manage the audio playback device
This commit is contained in:
7 files changed
+374
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#include <CSFML/Audio/PlaybackDevice.h>
|
||||
|
||||
#include <SFML/Audio/PlaybackDevice.hpp>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
TEST_CASE("[Audio] sfPlaybackDevice")
|
||||
{
|
||||
SECTION("sfPlaybackDeviceNotification")
|
||||
{
|
||||
STATIC_CHECK(sfPlaybackDeviceStarted == static_cast<int>(sf::PlaybackDevice::Notification::DeviceStarted));
|
||||
STATIC_CHECK(sfPlaybackDeviceStopped == static_cast<int>(sf::PlaybackDevice::Notification::DeviceStopped));
|
||||
STATIC_CHECK(sfPlaybackDeviceRerouted == static_cast<int>(sf::PlaybackDevice::Notification::DeviceRerouted));
|
||||
STATIC_CHECK(sfPlaybackDeviceInterruptionBegan ==
|
||||
static_cast<int>(sf::PlaybackDevice::Notification::DeviceInterruptionBegan));
|
||||
STATIC_CHECK(sfPlaybackDeviceInterruptionEnded ==
|
||||
static_cast<int>(sf::PlaybackDevice::Notification::DeviceInterruptionEnded));
|
||||
STATIC_CHECK(sfPlaybackDeviceUnlocked == static_cast<int>(sf::PlaybackDevice::Notification::DeviceUnlocked));
|
||||
}
|
||||
|
||||
SECTION("sfPlaybackDevice_setNotificationCallback")
|
||||
{
|
||||
sfPlaybackDevice_setNotificationCallback([](sfPlaybackDeviceNotification, void*) {}, nullptr);
|
||||
sfPlaybackDevice_setNotificationCallback(nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user