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

Method OnEnChangeDeltaCounter

Source/InstrumentEditorDPCM.cpp:683–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683void CInstrumentEditorDPCM::OnEnChangeDeltaCounter()
684{
685 BOOL Trans;
686
687 if (!m_pInstrument)
688 return;
689
690 int Value = GetDlgItemInt(IDC_DELTA_COUNTER, &Trans, FALSE);
691
692 if (Trans == TRUE)
693 Value = std::clamp(Value, 0, 127);
694 else
695 Value = -1;
696
697 if (m_pInstrument->GetSampleDeltaValue(m_iSelectedNote) != Value) {
698 m_pInstrument->SetSampleDeltaValue(m_iSelectedNote, Value);
699 GetDocument()->ModifyIrreversible(); // // //
700 }
701}
702
703void CInstrumentEditorDPCM::OnDeltaposDeltaSpin(NMHDR *pNMHDR, LRESULT *pResult)
704{

Callers

nothing calls this directly

Calls 4

clampFunction · 0.85
GetSampleDeltaValueMethod · 0.80
SetSampleDeltaValueMethod · 0.80
ModifyIrreversibleMethod · 0.80

Tested by

no test coverage detected