mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
add support for SCHED_FIFO
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@163 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
9618aea5df
commit
34fe8bd893
24 changed files with 181 additions and 49 deletions
15
polyp/sink.c
15
polyp/sink.c
|
|
@ -220,7 +220,7 @@ int pa_sink_render_into(struct pa_sink*s, struct pa_memchunk *target) {
|
|||
if (l > info[0].chunk.length)
|
||||
l = info[0].chunk.length;
|
||||
|
||||
memcpy(target->memblock->data+target->index, info[0].chunk.memblock->data + info[0].chunk.index, l);
|
||||
memcpy((uint8_t*) target->memblock->data+target->index, (uint8_t*) info[0].chunk.memblock->data + info[0].chunk.index, l);
|
||||
target->length = l;
|
||||
|
||||
if (s->volume != PA_VOLUME_NORM || info[0].volume != PA_VOLUME_NORM)
|
||||
|
|
@ -229,7 +229,7 @@ int pa_sink_render_into(struct pa_sink*s, struct pa_memchunk *target) {
|
|||
if (volume != PA_VOLUME_NORM)
|
||||
pa_volume_memchunk(target, &s->sample_spec, volume);
|
||||
} else
|
||||
target->length = l = pa_mix(info, n, target->memblock->data+target->index, target->length, &s->sample_spec, s->volume);
|
||||
target->length = l = pa_mix(info, n, (uint8_t*) target->memblock->data+target->index, target->length, &s->sample_spec, s->volume);
|
||||
|
||||
assert(l);
|
||||
inputs_drop(s, info, n, l);
|
||||
|
|
@ -267,6 +267,17 @@ void pa_sink_render_into_full(struct pa_sink *s, struct pa_memchunk *target) {
|
|||
}
|
||||
}
|
||||
|
||||
void pa_sink_render_full(struct pa_sink *s, size_t length, struct pa_memchunk *result) {
|
||||
assert(s && length && result);
|
||||
|
||||
/*** This needs optimization ***/
|
||||
|
||||
result->memblock = pa_memblock_new(result->length = length, s->core->memblock_stat);
|
||||
result->index = 0;
|
||||
|
||||
pa_sink_render_into_full(s, result);
|
||||
}
|
||||
|
||||
pa_usec_t pa_sink_get_latency(struct pa_sink *s) {
|
||||
assert(s);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue