mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:35:42 +01:00
Fixed oversized silence filling
This commit is contained in:
parent
5cc8a510e9
commit
217417698c
1 changed files with 2 additions and 2 deletions
|
@ -737,8 +737,8 @@ static ssize_t pcm_write(u_char *data, size_t count)
|
|||
ssize_t result = 0;
|
||||
|
||||
if (mode == SND_PCM_MODE_FRAGMENT &&
|
||||
count != buffer_size) {
|
||||
snd_pcm_format_set_silence(format.format, data + count * bits_per_frame / 8, buffer_size * format.channels);
|
||||
count < buffer_size) {
|
||||
snd_pcm_format_set_silence(format.format, data + count * bits_per_frame / 8, (buffer_size - count) * format.channels);
|
||||
count = buffer_size;
|
||||
}
|
||||
while (count > 0) {
|
||||
|
|
Loading…
Reference in a new issue