| 60 | } |
| 61 | |
| 62 | void AudioController::OnPlaybackTimer(wxTimerEvent &) |
| 63 | { |
| 64 | if (!player) return; |
| 65 | |
| 66 | int64_t pos = player->GetCurrentPosition(); |
| 67 | if (!player->IsPlaying() || |
| 68 | (playback_mode != PM_ToEnd && pos >= player->GetEndPosition()+200)) |
| 69 | { |
| 70 | // The +200 is to allow the player to end the sound output cleanly, |
| 71 | // otherwise a popping artifact can sometimes be heard. |
| 72 | Stop(); |
| 73 | } |
| 74 | else |
| 75 | { |
| 76 | AnnouncePlaybackPosition(MillisecondsFromSamples(pos)); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | #ifdef wxHAS_POWER_EVENTS |
| 81 | void AudioController::OnComputerSuspending(wxPowerEvent &) |
nothing calls this directly
no test coverage detected