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

Method Cut

Source/NoteQueue.cpp:111–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111stChannelID CNoteChannelQueue::Cut(int Note, stChannelID Channel)
112{
113 auto it = m_iNoteState.find(Note);
114 if (it != m_iNoteState.end()) {
115 m_iNoteState.erase(it);
116 auto pit = m_iNotePriority.find(Note);
117 if (pit != m_iNotePriority.end()) m_iNotePriority.erase(pit);
118 auto pit2 = m_iNoteChannel.find(Note);
119 if (pit2 != m_iNoteChannel.end()) m_iNoteChannel.erase(pit2);
120 for (int i = 0; i < m_iChannelCount; ++i)
121 if (m_iCurrentNote[i] == (unsigned)Note) {
122 m_iCurrentNote[i] = -1;
123 return m_iChannelMapID[i];
124 }
125 }
126 return { };
127}
128
129std::vector<stChannelID> CNoteChannelQueue::StopChannel(stChannelID Channel)
130{

Callers 2

ReleaseNoteMethod · 0.80
HaltNoteMethod · 0.80

Calls 1

endMethod · 0.45

Tested by

no test coverage detected