| 1866 | } |
| 1867 | |
| 1868 | void CFamiTrackerView::HaltNote(std::size_t Index, int MidiNote) const { |
| 1869 | if (MidiNote < 0 || MidiNote >= NOTE_COUNT) |
| 1870 | return; |
| 1871 | |
| 1872 | // Halts a channel |
| 1873 | stChanNote NoteData; // // // |
| 1874 | |
| 1875 | NoteData.Note = note_t::halt; |
| 1876 | NoteData.Instrument = GetInstrument(); |
| 1877 | |
| 1878 | stChannelID Channel = SplitAdjustChannel(TranslateChannel(Index), NoteData); |
| 1879 | const CChannelOrder &order = GetSongView()->GetChannelOrder(); |
| 1880 | if (order.HasChannel(Channel)) { |
| 1881 | stChannelID ch = m_pNoteQueue->Cut(MidiNote, Channel); |
| 1882 | if (order.HasChannel(ch)) |
| 1883 | FTEnv.GetSoundGenerator()->QueueNote(ch, NoteData, NOTE_PRIO_2); |
| 1884 | |
| 1885 | if (FTEnv.GetSettings()->General.bPreviewFullRow) { |
| 1886 | NoteData.Instrument = MAX_INSTRUMENTS; |
| 1887 | |
| 1888 | order.ForeachChannel([&] (stChannelID i) { |
| 1889 | if (i != ch) |
| 1890 | FTEnv.GetSoundGenerator()->QueueNote(i, NoteData, NOTE_PRIO_1); |
| 1891 | }); |
| 1892 | } |
| 1893 | } |
| 1894 | } |
| 1895 | |
| 1896 | void CFamiTrackerView::HaltNoteSingle(std::size_t Index) const |
| 1897 | { |
nothing calls this directly
no test coverage detected