mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-08 21:35:43 +01:00
Fixed calc_count() routine - wav files with traling RIFF chunks sound ok now
This commit is contained in:
parent
911e5f7248
commit
8383eaf65c
1 changed files with 7 additions and 3 deletions
|
@ -1513,11 +1513,15 @@ static off64_t calc_count(void)
|
|||
{
|
||||
off64_t count;
|
||||
|
||||
if (!timelimit) {
|
||||
if (!timelimit && pbrec_count == (size_t)-1) {
|
||||
count = (off64_t)-1;
|
||||
} else {
|
||||
count = snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels);
|
||||
count *= (off64_t)timelimit;
|
||||
if (timelimit == 0) {
|
||||
count = pbrec_count;
|
||||
} else {
|
||||
count = snd_pcm_format_size(hwparams.format, hwparams.rate * hwparams.channels);
|
||||
count *= (off64_t)timelimit;
|
||||
}
|
||||
}
|
||||
return count < pbrec_count ? count : pbrec_count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue