Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81553
b: refs/heads/master
c: be3e011
h: refs/heads/master
i:
  81551: 548ad45
v: v3
  • Loading branch information
Marcin Ślusarz authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 894a360 commit 26f81a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 757d5a7561842dd89c79d079a3c0935cd49afb9b
refs/heads/master: be3e0115e3732d77d357724a394ee465e5d0b872
16 changes: 10 additions & 6 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,14 +1497,18 @@ void snd_pcm_tick_prepare(struct snd_pcm_substream *substream)
avail = snd_pcm_capture_avail(runtime);
}
if (avail < runtime->control->avail_min) {
snd_pcm_sframes_t n = runtime->control->avail_min - avail;
if (n > 0 && frames > (snd_pcm_uframes_t)n)
frames = n;
snd_pcm_sframes_t to_avail_min =
runtime->control->avail_min - avail;
if (to_avail_min > 0 &&
frames > (snd_pcm_uframes_t)to_avail_min)
frames = to_avail_min;
}
if (avail < runtime->buffer_size) {
snd_pcm_sframes_t n = runtime->buffer_size - avail;
if (n > 0 && frames > (snd_pcm_uframes_t)n)
frames = n;
snd_pcm_sframes_t to_buffer_size =
runtime->buffer_size - avail;
if (to_buffer_size > 0 &&
frames > (snd_pcm_uframes_t)to_buffer_size)
frames = to_buffer_size;
}
if (frames == ULONG_MAX) {
snd_pcm_tick_set(substream, 0);
Expand Down

0 comments on commit 26f81a1

Please sign in to comment.