diff --git a/pjmedia/src/pjmedia-audiodev/alsa_dev.c b/pjmedia/src/pjmedia-audiodev/alsa_dev.c
index 69e10d0..5bcdedf 100644
a
|
b
|
static pj_status_t open_playback (struct alsa_stream* stream, |
547 | 547 | int result; |
548 | 548 | unsigned int rate; |
549 | 549 | snd_pcm_uframes_t tmp_buf_size; |
| 550 | snd_pcm_uframes_t tmp_period_size; |
550 | 551 | |
551 | 552 | if (param->play_id < 0 || param->play_id >= stream->af->dev_cnt) |
552 | 553 | return PJMEDIA_EAUD_INVDEV; |
… |
… |
static pj_status_t open_playback (struct alsa_stream* stream, |
613 | 614 | param->channel_count; |
614 | 615 | TRACE_((THIS_FILE, "open_playback: set period size: %d", |
615 | 616 | stream->pb_frames)); |
| 617 | tmp_period_size = stream->pb_frames; |
616 | 618 | snd_pcm_hw_params_set_period_size_near (stream->pb_pcm, params, |
617 | | &stream->pb_frames, NULL); |
| 619 | &tmp_period_size, NULL); |
618 | 620 | TRACE_((THIS_FILE, "open_playback: period size set to: %d", |
619 | | stream->pb_frames)); |
| 621 | tmp_period_size)); |
620 | 622 | |
621 | 623 | /* Set the sound device buffer size and latency */ |
622 | 624 | if (param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY) |
… |
… |
static pj_status_t open_capture (struct alsa_stream* stream, |
663 | 665 | int result; |
664 | 666 | unsigned int rate; |
665 | 667 | snd_pcm_uframes_t tmp_buf_size; |
| 668 | snd_pcm_uframes_t tmp_period_size; |
666 | 669 | |
667 | 670 | if (param->rec_id < 0 || param->rec_id >= stream->af->dev_cnt) |
668 | 671 | return PJMEDIA_EAUD_INVDEV; |
… |
… |
static pj_status_t open_capture (struct alsa_stream* stream, |
729 | 732 | param->channel_count; |
730 | 733 | TRACE_((THIS_FILE, "open_capture: set period size: %d", |
731 | 734 | stream->ca_frames)); |
| 735 | tmp_period_size = stream->ca_frames; |
732 | 736 | snd_pcm_hw_params_set_period_size_near (stream->ca_pcm, params, |
733 | | &stream->ca_frames, NULL); |
| 737 | &tmp_period_size, NULL); |
734 | 738 | TRACE_((THIS_FILE, "open_capture: period size set to: %d", |
735 | | stream->ca_frames)); |
| 739 | tmp_period_size)); |
736 | 740 | |
737 | 741 | /* Set the sound device buffer size and latency */ |
738 | 742 | if (param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY) |