MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / ParseWaveString

Method ParseWaveString

Source/InstrumentEditorFDS.cpp:308–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void CInstrumentEditorFDS::ParseWaveString(std::string_view sv)
309{
310 int i = 0;
311 for (auto x : re::tokens(sv)) { // // //
312 int value = CSequenceInstrumentEditPanel::ReadStringValue(re::sv_from_submatch(x[0]));
313 m_pInstrument->SetSample(i, std::clamp(value, 0, 63)); // // //
314 if (++i >= 64)
315 break;
316 }
317
318 GetDocument()->ModifyIrreversible(); // // //
319 m_pWaveEditor->RedrawWindow();
320 FTEnv.GetSoundGenerator()->WaveChanged();
321}
322
323void CInstrumentEditorFDS::OnBnClickedCopyTable()
324{

Callers

nothing calls this directly

Calls 7

tokensFunction · 0.85
sv_from_submatchFunction · 0.85
clampFunction · 0.85
ModifyIrreversibleMethod · 0.80
SetSampleMethod · 0.45
WaveChangedMethod · 0.45
GetSoundGeneratorMethod · 0.45

Tested by

no test coverage detected