From 7347c09ac05fe064d2084bd5f31fabe39cdd3dc0 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 31 Dec 2010 23:53:36 +0000 Subject: [PATCH] Use Bind rather than Connect in AudioController Originally committed to SVN as r5085. --- aegisub/src/audio_controller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aegisub/src/audio_controller.cpp b/aegisub/src/audio_controller.cpp index 60269a120..fc5b8a9f1 100644 --- a/aegisub/src/audio_controller.cpp +++ b/aegisub/src/audio_controller.cpp @@ -142,11 +142,11 @@ AudioController::AudioController() , playback_mode(PM_NotPlaying) , playback_timer(this) { - Connect(playback_timer.GetId(), wxEVT_TIMER, (wxObjectEventFunction)&AudioController::OnPlaybackTimer); + Bind(wxEVT_TIMER, &AudioController::OnPlaybackTimer, this, playback_timer.GetId()); #ifdef wxHAS_POWER_EVENTS - Connect(wxEVT_POWER_SUSPENDED, (wxObjectEventFunction)&AudioController::OnComputerSuspending); - Connect(wxEVT_POWER_RESUME, (wxObjectEventFunction)&AudioController::OnComputerResuming); + Bind(wxEVT_POWER_SUSPENDED, &AudioController::OnComputerSuspending, this); + Bind(wxEVT_POWER_RESUME, &AudioController::OnComputerResuming, this); #endif } @@ -164,8 +164,8 @@ void AudioController::OnPlaybackTimer(wxTimerEvent &event) if (!player->IsPlaying() || (playback_mode != PM_ToEnd && pos >= player->GetEndPosition()+200)) { - // The +200 is to allow the player to end the sound output cleanly, otherwise a popping - // artifact can sometimes be heard. + // The +200 is to allow the player to end the sound output cleanly, + // otherwise a popping artifact can sometimes be heard. Stop(); } else