diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2012-05-17 08:35:51 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2012-05-17 08:35:51 +0000 |
commit | 0949cd759f5e4848f692a21d3b04f75f84ba6e24 (patch) | |
tree | c495d485dccbe3f9c3def130532b24b2343bf802 /pjmedia | |
parent | 13a34ab336d0c21b8c054db2a0ed0626182c5837 (diff) |
Re #1509: backported r4122-r4129.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4130 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/include/pjmedia/config.h | 2 | ||||
-rw-r--r-- | pjmedia/src/pjmedia-audiodev/alsa_dev.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h index d0c2cd39..3f92a6b9 100644 --- a/pjmedia/include/pjmedia/config.h +++ b/pjmedia/include/pjmedia/config.h @@ -1139,7 +1139,7 @@ /** * Duration for progressive discard algotithm in jitter buffer to discard - * an excessive frame when burst is equal to or lower than + * an excessive frame when burst is equal to or greater than * PJMEDIA_JBUF_PRO_DISC_MAX_BURST, in milliseconds. * * Default: 10000 ms diff --git a/pjmedia/src/pjmedia-audiodev/alsa_dev.c b/pjmedia/src/pjmedia-audiodev/alsa_dev.c index 69e10d01..5bcdedf0 100644 --- a/pjmedia/src/pjmedia-audiodev/alsa_dev.c +++ b/pjmedia/src/pjmedia-audiodev/alsa_dev.c @@ -547,6 +547,7 @@ static pj_status_t open_playback (struct alsa_stream* stream, int result; unsigned int rate; snd_pcm_uframes_t tmp_buf_size; + snd_pcm_uframes_t tmp_period_size; if (param->play_id < 0 || param->play_id >= stream->af->dev_cnt) return PJMEDIA_EAUD_INVDEV; @@ -613,10 +614,11 @@ static pj_status_t open_playback (struct alsa_stream* stream, param->channel_count; TRACE_((THIS_FILE, "open_playback: set period size: %d", stream->pb_frames)); + tmp_period_size = stream->pb_frames; snd_pcm_hw_params_set_period_size_near (stream->pb_pcm, params, - &stream->pb_frames, NULL); + &tmp_period_size, NULL); TRACE_((THIS_FILE, "open_playback: period size set to: %d", - stream->pb_frames)); + tmp_period_size)); /* Set the sound device buffer size and latency */ if (param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY) @@ -663,6 +665,7 @@ static pj_status_t open_capture (struct alsa_stream* stream, int result; unsigned int rate; snd_pcm_uframes_t tmp_buf_size; + snd_pcm_uframes_t tmp_period_size; if (param->rec_id < 0 || param->rec_id >= stream->af->dev_cnt) return PJMEDIA_EAUD_INVDEV; @@ -729,10 +732,11 @@ static pj_status_t open_capture (struct alsa_stream* stream, param->channel_count; TRACE_((THIS_FILE, "open_capture: set period size: %d", stream->ca_frames)); + tmp_period_size = stream->ca_frames; snd_pcm_hw_params_set_period_size_near (stream->ca_pcm, params, - &stream->ca_frames, NULL); + &tmp_period_size, NULL); TRACE_((THIS_FILE, "open_capture: period size set to: %d", - stream->ca_frames)); + tmp_period_size)); /* Set the sound device buffer size and latency */ if (param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY) |