mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
drop silence generation from sink drivers
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1488 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
fff9081c4b
commit
f0616367b3
1 changed files with 4 additions and 8 deletions
|
|
@ -151,15 +151,11 @@ static void thread_func(void *userdata) {
|
||||||
pa_gettimeofday(&now);
|
pa_gettimeofday(&now);
|
||||||
|
|
||||||
if (pa_timeval_cmp(&u->timestamp, &now) <= 0) {
|
if (pa_timeval_cmp(&u->timestamp, &now) <= 0) {
|
||||||
size_t l;
|
|
||||||
|
|
||||||
if (pa_sink_render(u->sink, u->block_size, &chunk) >= 0) {
|
pa_sink_render(u->sink, u->block_size, &chunk);
|
||||||
l = chunk.length;
|
pa_memblock_unref(chunk.memblock);
|
||||||
pa_memblock_unref(chunk.memblock);
|
|
||||||
} else
|
|
||||||
l = u->block_size;
|
|
||||||
|
|
||||||
pa_timeval_add(&u->timestamp, pa_bytes_to_usec(l, &u->sink->sample_spec));
|
pa_timeval_add(&u->timestamp, pa_bytes_to_usec(chunk.length, &u->sink->sample_spec));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue