| 230 | } |
| 231 | |
| 232 | void CInstrumentEditorN163Wave::ParseString(std::string_view sv) |
| 233 | { |
| 234 | int i = 0; |
| 235 | int im = WaveSizeAvailable(); |
| 236 | for (auto x : re::tokens(sv)) { // // // |
| 237 | int value = CSequenceInstrumentEditPanel::ReadStringValue(re::sv_from_submatch(x[0])); |
| 238 | m_pInstrument->SetSample(m_iWaveIndex, i, std::clamp(value, 0, 15)); // // // |
| 239 | if (++i >= im) |
| 240 | break; |
| 241 | } |
| 242 | |
| 243 | int size = std::clamp(i & 0xFC, 4, im); |
| 244 | m_pInstrument->SetWaveSize(size); |
| 245 | |
| 246 | static_cast<CComboBox*>(GetDlgItem(IDC_WAVE_SIZE))->SelectString(0, conv::to_wide(conv::sv_from_int(size)).data()); |
| 247 | |
| 248 | FillPosBox(size); |
| 249 | |
| 250 | GetDocument()->ModifyIrreversible(); // // // |
| 251 | m_pWaveEditor->SetLength(size); |
| 252 | m_pWaveEditor->WaveChanged(); |
| 253 | } |
| 254 | |
| 255 | LRESULT CInstrumentEditorN163Wave::OnWaveChanged(WPARAM wParam, LPARAM lParam) |
| 256 | { |
nothing calls this directly
no test coverage detected