mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Revert r1404 and keep it on a development branch until it is fully tested.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
6ca819354c
commit
8dc6214276
36 changed files with 499 additions and 990 deletions
|
|
@ -149,7 +149,6 @@ static void do_read(struct userdata *u) {
|
|||
pa_memchunk post_memchunk;
|
||||
snd_pcm_sframes_t frames;
|
||||
size_t l;
|
||||
void *p;
|
||||
|
||||
if (!u->memchunk.memblock) {
|
||||
u->memchunk.memblock = pa_memblock_new(u->source->core->mempool, u->memchunk.length = u->fragment_size);
|
||||
|
|
@ -158,13 +157,11 @@ static void do_read(struct userdata *u) {
|
|||
|
||||
assert(u->memchunk.memblock);
|
||||
assert(u->memchunk.length);
|
||||
assert(u->memchunk.memblock->data);
|
||||
assert(u->memchunk.memblock->length);
|
||||
assert(u->memchunk.length % u->frame_size == 0);
|
||||
|
||||
p = pa_memblock_acquire(u->memchunk.memblock);
|
||||
|
||||
if ((frames = snd_pcm_readi(u->pcm_handle, (uint8_t*) p + u->memchunk.index, u->memchunk.length / u->frame_size)) < 0) {
|
||||
pa_memblock_release(u->memchunk.memblock);
|
||||
|
||||
if ((frames = snd_pcm_readi(u->pcm_handle, (uint8_t*) u->memchunk.memblock->data + u->memchunk.index, u->memchunk.length / u->frame_size)) < 0) {
|
||||
if (frames == -EAGAIN)
|
||||
return;
|
||||
|
||||
|
|
@ -181,7 +178,6 @@ static void do_read(struct userdata *u) {
|
|||
pa_module_unload_request(u->module);
|
||||
return;
|
||||
}
|
||||
pa_memblock_release(u->memchunk.memblock);
|
||||
|
||||
l = frames * u->frame_size;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue