| 152 | }; |
| 153 | |
| 154 | void SeekWhenAudioActive(double seekStep, wxLongLong &lastSelectionAdjustment) |
| 155 | { |
| 156 | auto gAudioIO = AudioIO::Get(); |
| 157 | #ifdef EXPERIMENTAL_IMPROVED_SEEKING |
| 158 | if (gAudioIO->GetLastPlaybackTime() < lastSelectionAdjustment) { |
| 159 | // Allow time for the last seek to output a buffer before |
| 160 | // discarding samples again |
| 161 | // Do not advance mLastSelectionAdjustment |
| 162 | return; |
| 163 | } |
| 164 | #endif |
| 165 | lastSelectionAdjustment = ::wxGetUTCTimeMillis(); |
| 166 | |
| 167 | gAudioIO->SeekStream(seekStep); |
| 168 | } |
| 169 | |
| 170 | // Handles moving a selection edge with the keyboard in snap-to-time mode; |
| 171 | // returns the moved value. |
no test coverage detected