From 286847f9be5bdefeea5c8a7c9a6651ef5eb36622 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.net> Date: Wed, 21 Oct 2009 14:30:34 -0400 Subject: [PATCH] [#2333] Add ALSA recovery functions for underrun (begin) --- sflphone-common/src/audio/alsa/alsalayer.cpp | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sflphone-common/src/audio/alsa/alsalayer.cpp b/sflphone-common/src/audio/alsa/alsalayer.cpp index fcd22045b2..0aa39b9b0a 100644 --- a/sflphone-common/src/audio/alsa/alsalayer.cpp +++ b/sflphone-common/src/audio/alsa/alsalayer.cpp @@ -376,6 +376,35 @@ void AlsaLayer::preparePlaybackStream (void) } } +/* +void AlsaLayer::recoverPlaybackStream(int error) +{ + + int err; + + if (is_playback_open() && is_playback_running()) { + _debug("AlsaLayer:: recover playback stream\n"); + if((err = snd_pcm_recover(_PlaybackHandle, error, 0)) < 0 ) + _debug("Error recovering the device: %s\n", snd_strerror(err)); + } +} +*/ + +/* +void AlsaLayer::recoverPlaybackStream(int error) +{ + + int err; + + if (is_capture_open() && is_capture_running()) { + _debug("AlsaLayer:: recover capture stream\n"); + if((err = snd_pcm_recover(_PlaybackHandle, error, 0)) < 0 ) + _debug("Error recovering the device: %s\n", snd_strerror(err)); + } +} +*/ + + bool AlsaLayer::alsa_set_params (snd_pcm_t *pcm_handle, int type, int rate) { -- GitLab