summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-11-16 00:04:03 +0200
committerYaniv Kamay <ykamay@redhat.com>2010-01-03 17:36:17 +0200
commit6031cb8276ad56a41c31ba32df0fd5a6fa220c76 (patch)
treeb8c2bcff25dd1c419fd249f6a951b728f77b5db4 /client
parent0d93ce342c5b063c7cc36fcb7fb31fbecbbad608 (diff)
downloadspice-6031cb8276ad56a41c31ba32df0fd5a6fa220c76.tar.gz
spice-6031cb8276ad56a41c31ba32df0fd5a6fa220c76.tar.xz
spice-6031cb8276ad56a41c31ba32df0fd5a6fa220c76.zip
client: change jitter buffer size to 300ms
Diffstat (limited to 'client')
-rw-r--r--client/windows/playback.cpp4
-rw-r--r--client/x11/playback.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/client/windows/playback.cpp b/client/windows/playback.cpp
index 2e15ad93..b9e00252 100644
--- a/client/windows/playback.cpp
+++ b/client/windows/playback.cpp
@@ -21,8 +21,8 @@
#include "debug.h"
-#define RING_SIZE_MS 160
-#define START_MARK_MS 80
+#define RING_SIZE_MS 380
+#define START_MARK_MS 300
#define LOW_MARK_MS 40
diff --git a/client/x11/playback.cpp b/client/x11/playback.cpp
index d8f97669..5e796fdb 100644
--- a/client/x11/playback.cpp
+++ b/client/x11/playback.cpp
@@ -19,6 +19,8 @@
#include "utils.h"
#include "debug.h"
+#define REING_SIZE_MS 300
+
WavePlayer::WavePlayer(uint32_t sampels_per_sec, uint32_t bits_per_sample, uint32_t channels)
: _pcm (NULL)
, _hw_params (NULL)
@@ -117,7 +119,8 @@ bool WavePlayer::init(uint32_t sampels_per_sec,
return false;
}
- snd_pcm_uframes_t buffer_size = (sampels_per_sec * 80 / 1000) / frame_size * frame_size;
+ snd_pcm_uframes_t buffer_size;
+ buffer_size = (sampels_per_sec * REING_SIZE_MS / 1000) / frame_size * frame_size;
if ((err = snd_pcm_hw_params_set_buffer_size_near(_pcm, _hw_params, &buffer_size)) < 0) {
LOG_ERROR("cannot set buffer size %s", snd_strerror(err));