summaryrefslogtreecommitdiff
path: root/plugins/alsa
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-31 20:29:09 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-31 20:29:09 +0100
commit09cb6bfdd7d9e5cf571116ead1bb4209a8c9e58b (patch)
tree831770f578fc50feb3147a60dd0678997800e4e1 /plugins/alsa
parent893655b27084db6399b82069a5dcb56d6e98fbfa (diff)
fixed alsa restart on every popup of configuration dialog
Diffstat (limited to 'plugins/alsa')
-rw-r--r--plugins/alsa/alsa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c
index ef1a4782..9e6370e4 100644
--- a/plugins/alsa/alsa.c
+++ b/plugins/alsa/alsa.c
@@ -180,14 +180,14 @@ palsa_set_hw_params (int samplerate) {
req_buffer_size = deadbeef->conf_get_int ("alsa.buffer", 1024);
req_period_size = deadbeef->conf_get_int ("alsa.period", 512);
- trace ("trying buffer size: %d frames\n", req_buffer_size);
- trace ("trying period size: %d frames\n", req_period_size);
- snd_pcm_hw_params_set_buffer_size_near (audio, hw_params, &req_buffer_size);
- snd_pcm_hw_params_set_period_size_near (audio, hw_params, &req_period_size, NULL);
- trace ("alsa buffer size: %d frames\n", req_buffer_size);
- trace ("alsa period size: %d frames\n", req_period_size);
buffer_size = req_buffer_size;
period_size = req_period_size;
+ trace ("trying buffer size: %d frames\n", buffer_size);
+ trace ("trying period size: %d frames\n", period_size);
+ snd_pcm_hw_params_set_buffer_size_near (audio, hw_params, &buffer_size);
+ snd_pcm_hw_params_set_period_size_near (audio, hw_params, &period_size, NULL);
+ trace ("alsa buffer size: %d frames\n", buffer_size);
+ trace ("alsa period size: %d frames\n", period_size);
if ((err = snd_pcm_hw_params (audio, hw_params)) < 0) {
trace ("cannot set parameters (%s)\n",