| 1836 | } |
| 1837 | |
| 1838 | void CFamiTrackerView::ReleaseNote(std::size_t Index, int MidiNote) const { |
| 1839 | if (MidiNote < 0 || MidiNote >= NOTE_COUNT) |
| 1840 | return; |
| 1841 | |
| 1842 | // Releases a channel |
| 1843 | stChanNote NoteData; // // // |
| 1844 | |
| 1845 | NoteData.Note = note_t::release; |
| 1846 | NoteData.Instrument = GetInstrument(); |
| 1847 | |
| 1848 | stChannelID Channel = SplitAdjustChannel(TranslateChannel(Index), NoteData); |
| 1849 | const CChannelOrder &order = GetSongView()->GetChannelOrder(); |
| 1850 | if (order.HasChannel(Channel)) { |
| 1851 | stChannelID ch = m_pNoteQueue->Cut(MidiNote, Channel); |
| 1852 | // stChannelID ch = m_pNoteQueue->Release(MidiNote, Channel); |
| 1853 | if (order.HasChannel(ch)) |
| 1854 | FTEnv.GetSoundGenerator()->QueueNote(ch, NoteData, NOTE_PRIO_2); |
| 1855 | |
| 1856 | if (FTEnv.GetSettings()->General.bPreviewFullRow) { |
| 1857 | NoteData.Note = note_t::halt; |
| 1858 | NoteData.Instrument = MAX_INSTRUMENTS; |
| 1859 | |
| 1860 | order.ForeachChannel([&] (stChannelID i) { |
| 1861 | if (i != ch) |
| 1862 | FTEnv.GetSoundGenerator()->QueueNote(i, NoteData, NOTE_PRIO_1); |
| 1863 | }); |
| 1864 | } |
| 1865 | } |
| 1866 | } |
| 1867 | |
| 1868 | void CFamiTrackerView::HaltNote(std::size_t Index, int MidiNote) const { |
| 1869 | if (MidiNote < 0 || MidiNote >= NOTE_COUNT) |
no test coverage detected