MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / InitController

Method InitController

Source/MidiOutput.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void MidiOutputModule::InitController()
65{
66 MidiController* controller = TheSynth->FindMidiController(mModuleSaveData.GetString("controller"));
67 if (controller)
68 mDevice.ConnectOutput(controller->GetDeviceOut().c_str(), mModuleSaveData.GetInt("channel"));
69
70 BuildControllerList();
71
72 const std::vector<std::string>& devices = mDevice.GetPortList(false);
73 for (int i = 0; i < devices.size(); ++i)
74 {
75 if (strcmp(devices[i].c_str(), mDevice.Name()) == 0)
76 mControllerIndex = i;
77 }
78}
79
80void MidiOutputModule::DrawModule()
81{

Callers

nothing calls this directly

Calls 8

FindMidiControllerMethod · 0.80
GetStringMethod · 0.80
GetDeviceOutMethod · 0.80
GetIntMethod · 0.80
GetPortListMethod · 0.80
sizeMethod · 0.80
ConnectOutputMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected