| 225 | } |
| 226 | |
| 227 | void CInstrumentEditorDPCM::UpdateKey(int Index) |
| 228 | { |
| 229 | CStringW NameStr = NO_SAMPLE_STR; |
| 230 | CStringW PitchStr = L"-"; |
| 231 | |
| 232 | if (m_pInstrument->GetSampleIndex(Index) != CInstrument2A03::NO_DPCM) { |
| 233 | int Pitch = m_pInstrument->GetSamplePitch(Index); |
| 234 | auto pSample = m_pInstrument->GetDSample(Index); // // // |
| 235 | NameStr = !pSample ? L"(n/a)" : conv::to_wide(pSample->name()).data(); |
| 236 | PitchStr = FormattedW(L"%i %s", Pitch & 0x0F, (Pitch & 0x80) ? L"L" : L""); |
| 237 | } |
| 238 | |
| 239 | m_cTableListCtrl.SetItemText(Index, 1, PitchStr); |
| 240 | m_cTableListCtrl.SetItemText(Index, 2, NameStr); |
| 241 | } |
| 242 | |
| 243 | int CInstrumentEditorDPCM::GetSelectedSampleIndex() const { // // // |
| 244 | if (int Index = m_cSampleListCtrl.GetSelectionMark(); Index != -1) |
nothing calls this directly
no test coverage detected