MCPcopy Create free account
hub / github.com/VCVRack/Rack / appendAudioDriverMenu

Function appendAudioDriverMenu

src/app/AudioDisplay.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34};
35
36static void appendAudioDriverMenu(ui::Menu* menu, audio::Port* port) {
37 if (!port)
38 return;
39
40 for (int driverId : audio::getDriverIds()) {
41 AudioDriverValueItem* item = new AudioDriverValueItem;
42 item->port = port;
43 item->driverId = driverId;
44 item->text = audio::getDriver(driverId)->getName();
45 item->rightText = CHECKMARK(item->driverId == port->getDriverId());
46 menu->addChild(item);
47 }
48}
49
50void AudioDriverChoice::onAction(const ActionEvent& e) {
51 ui::Menu* menu = createMenu();

Callers 3

onActionMethod · 0.85
createChildMenuMethod · 0.85
appendAudioMenuFunction · 0.85

Calls 5

addChildMethod · 0.80
getDriverIdsFunction · 0.50
getDriverFunction · 0.50
getNameMethod · 0.45
getDriverIdMethod · 0.45

Tested by

no test coverage detected