MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / getNames

Method getNames

src/AudioDevices.cpp:21–39  ·  view source on GitHub ↗

Build a list of devices found, and return

Source from the content-addressed store, hash-verified

19
20// Build a list of devices found, and return
21AudioDeviceList AudioDevices::getNames() {
22 // A temporary device manager, used to scan device names.
23 // Its initialize() is never called, and devices are not opened.
24 std::unique_ptr<juce::AudioDeviceManager>
25 manager(new juce::AudioDeviceManager());
26
27 m_devices.clear();
28
29 auto &types = manager->getAvailableDeviceTypes();
30 for (auto* t : types) {
31 t->scanForDevices();
32 const auto names = t->getDeviceNames();
33 for (const auto& name : names) {
34 m_devices.emplace_back(
35 name.toStdString(), t->getTypeName().toStdString());
36 }
37 }
38 return m_devices;
39}

Callers 2

GetAudioDeviceNamesMethod · 0.80
getAudioDeviceNamesMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected