MCPcopy Create free account
hub / github.com/SFML/SFML / getDefaultDevice

Function getDefaultDevice

src/SFML/Audio/PlaybackDevice.cpp:52–61  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

50
51////////////////////////////////////////////////////////////
52std::optional<std::string> getDefaultDevice()
53{
54 for (const auto& device : priv::AudioDevice::getAvailableDevices())
55 {
56 if (device.isDefault)
57 return device.name;
58 }
59
60 return std::nullopt;
61}
62
63
64////////////////////////////////////////////////////////////

Callers 2

SoundRecorder::ImplClass · 0.85
mainFunction · 0.85

Calls 1

getAvailableDevicesFunction · 0.85

Tested by

no test coverage detected