From 998c42c4a1420ef91eb92019d015acf18e7326d5 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Fri, 15 Jan 2010 23:01:36 +0000 Subject: [PATCH] Backport ALSA fix, r3990. Originally committed to SVN as r3991. --- aegisub/src/audio_player_alsa.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aegisub/src/audio_player_alsa.cpp b/aegisub/src/audio_player_alsa.cpp index d985ea057..904f11cf7 100644 --- a/aegisub/src/audio_player_alsa.cpp +++ b/aegisub/src/audio_player_alsa.cpp @@ -223,6 +223,9 @@ void AlsaPlayer::SetUpAsync() // And free struct again snd_pcm_sw_params_free(sw_params); + // Prepare for playback + snd_pcm_prepare(pcm_handle); + // Attach async handler if (snd_async_add_pcm_handler(&pcm_callback, pcm_handle, async_write_handler, this) < 0) { throw _T("ALSA player: Failed attaching async handler");