]>
code.delx.au - pulseaudio/blob - src/pulsecore/play-memchunk.c
4 This file is part of PulseAudio.
6 Copyright 2004-2006 Lennart Poettering
8 PulseAudio is free software; you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as published
10 by the Free Software Foundation; either version 2 of the License,
11 or (at your option) any later version.
13 PulseAudio is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public License
19 along with PulseAudio; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
32 #include <pulse/xmalloc.h>
34 #include <pulsecore/sink-input.h>
35 #include <pulsecore/gccmacro.h>
36 #include <pulsecore/thread-mq.h>
37 #include <pulsecore/play-memblockq.h>
39 #include "play-memchunk.h"
43 const pa_sample_spec
*ss
,
44 const pa_channel_map
*map
,
45 const pa_memchunk
*chunk
,
48 uint32_t *sink_input_index
) {
57 q
= pa_memblockq_new(0, chunk
->length
, 0, pa_frame_size(ss
), 0, 0, 0, NULL
);
58 pa_assert_se(pa_memblockq_push(q
, chunk
) >= 0);
60 if ((r
= pa_play_memblockq(sink
, ss
, map
, q
, volume
, p
, sink_input_index
)) < 0) {