client: change jitter buffer size to 300ms

This commit is contained in:
Yaniv Kamay 2009-11-16 00:04:03 +02:00
parent a461f0655f
commit c7346dd0cb
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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));