| 143 | } |
| 144 | |
| 145 | void CSampleEditorDlg::OnTimer(UINT_PTR nIDEvent) |
| 146 | { |
| 147 | // Update play cursor |
| 148 | |
| 149 | switch (nIDEvent) { |
| 150 | case TMR_PLAY_CURSOR: { |
| 151 | // Play cursor |
| 152 | stDPCMState state = m_pSoundGen->GetDPCMState(); |
| 153 | |
| 154 | // Pos is in bytes |
| 155 | int Pos = state.SamplePos /*<< 6*/; |
| 156 | |
| 157 | if (m_pSoundGen->PreviewDone()) { |
| 158 | KillTimer(0); |
| 159 | Pos = -1; |
| 160 | } |
| 161 | |
| 162 | m_pSampleEditorView->DrawPlayCursor(Pos); |
| 163 | } |
| 164 | case TMR_START_CURSOR: { |
| 165 | // Start cursor |
| 166 | if (m_pSoundGen->PreviewDone()) { |
| 167 | static bool bDraw = false; |
| 168 | if (!bDraw) |
| 169 | m_pSampleEditorView->DrawStartCursor(); |
| 170 | else |
| 171 | m_pSampleEditorView->DrawPlayCursor(-1); |
| 172 | bDraw = !bDraw; |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | CDialog::OnTimer(nIDEvent); |
| 178 | } |
| 179 | |
| 180 | void CSampleEditorDlg::OnBnClickedDelete() |
| 181 | { |
nothing calls this directly
no test coverage detected