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

Method AddTrack

Source/MultitrackRecorder.cpp:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89void MultitrackRecorder::AddTrack()
90{
91 int recordingLength = GetRecordingLength();
92
93 ModuleFactory::Spawnable spawnable;
94 spawnable.mLabel = "multitrackrecordertrack";
95 MultitrackRecorderTrack* track = dynamic_cast<MultitrackRecorderTrack*>(TheSynth->SpawnModuleOnTheFly(spawnable, 0, 0, true));
96 track->Setup(this, recordingLength);
97 track->SetName(GetUniqueName("track", mModuleContainer.GetModuleNames<MultitrackRecorderTrack*>()).c_str());
98 mModuleContainer.TakeModule(track);
99 mTracks.push_back(track);
100}
101
102void MultitrackRecorder::RemoveTrack(MultitrackRecorderTrack* track)
103{

Callers

nothing calls this directly

Calls 5

GetUniqueNameFunction · 0.85
SpawnModuleOnTheFlyMethod · 0.80
TakeModuleMethod · 0.80
SetupMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected