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

Method HaltNoteSingle

Source/FamiTrackerView.cpp:1896–1915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1894}
1895
1896void CFamiTrackerView::HaltNoteSingle(std::size_t Index) const
1897{
1898 // Halts one single channel only
1899 stChanNote NoteData; // // //
1900
1901 NoteData.Note = note_t::halt;
1902 NoteData.Instrument = GetInstrument();
1903
1904 stChannelID Channel = SplitAdjustChannel(TranslateChannel(Index), NoteData); // ?
1905 const CChannelOrder &order = GetSongView()->GetChannelOrder();
1906 if (order.HasChannel(Channel)) {
1907 for (const auto &i : m_pNoteQueue->StopChannel(Channel)) {
1908 if (order.HasChannel(i))
1909 FTEnv.GetSoundGenerator()->QueueNote(i, NoteData, NOTE_PRIO_2);
1910 }
1911 }
1912
1913 if (FTEnv.GetSoundGenerator()->IsPlaying())
1914 FTEnv.GetSoundGenerator()->QueueNote(Channel, NoteData, NOTE_PRIO_2);
1915}
1916
1917//////////////////////////////////////////////////////////////////////////////////////////////////////////
1918/// MIDI note handling functions

Callers

nothing calls this directly

Calls 5

HasChannelMethod · 0.80
StopChannelMethod · 0.80
QueueNoteMethod · 0.45
GetSoundGeneratorMethod · 0.45
IsPlayingMethod · 0.45

Tested by

no test coverage detected