mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Fixed snd_pcm_rate_client_frames when frames == 0
This commit is contained in:
parent
78b4c42968
commit
5dc9be757c
1 changed files with 2 additions and 0 deletions
|
|
@ -455,6 +455,8 @@ snd_pcm_rate_read_areas(snd_pcm_t *pcm,
|
||||||
static snd_pcm_sframes_t snd_pcm_rate_client_frames(snd_pcm_t *pcm, snd_pcm_sframes_t frames)
|
static snd_pcm_sframes_t snd_pcm_rate_client_frames(snd_pcm_t *pcm, snd_pcm_sframes_t frames)
|
||||||
{
|
{
|
||||||
snd_pcm_rate_t *rate = pcm->private_data;
|
snd_pcm_rate_t *rate = pcm->private_data;
|
||||||
|
if (frames == 0)
|
||||||
|
return 0;
|
||||||
/* Round toward zero */
|
/* Round toward zero */
|
||||||
if (pcm->stream == SND_PCM_STREAM_PLAYBACK)
|
if (pcm->stream == SND_PCM_STREAM_PLAYBACK)
|
||||||
return muldiv_down(frames, DIV, rate->pitch);
|
return muldiv_down(frames, DIV, rate->pitch);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue