7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 typedef struct pa_sink pa_sink
;
29 #include <polyp/sample.h>
30 #include <polyp/channelmap.h>
31 #include <polyp/volume.h>
32 #include <polypcore/core.h>
33 #include <polypcore/idxset.h>
34 #include <polypcore/source.h>
35 #include <polypcore/module.h>
37 #define PA_MAX_INPUTS_PER_SINK 6
39 typedef enum pa_sink_state
{
44 typedef enum pa_mixer
{
53 pa_sink_state_t state
;
55 char *name
, *description
, *driver
;
58 pa_sample_spec sample_spec
;
59 pa_channel_map channel_map
;
62 pa_source
*monitor_source
;
64 pa_cvolume hw_volume
, sw_volume
;
66 void (*notify
)(pa_sink
*sink
);
67 pa_usec_t (*get_latency
)(pa_sink
*s
);
68 int (*set_hw_volume
)(pa_sink
*s
);
69 int (*get_hw_volume
)(pa_sink
*s
);
79 const pa_sample_spec
*spec
,
80 const pa_channel_map
*map
);
82 void pa_sink_disconnect(pa_sink
* s
);
83 void pa_sink_unref(pa_sink
*s
);
84 pa_sink
* pa_sink_ref(pa_sink
*s
);
86 int pa_sink_render(pa_sink
*s
, size_t length
, pa_memchunk
*result
);
87 void pa_sink_render_full(pa_sink
*s
, size_t length
, pa_memchunk
*result
);
88 int pa_sink_render_into(pa_sink
*s
, pa_memchunk
*target
);
89 void pa_sink_render_into_full(pa_sink
*s
, pa_memchunk
*target
);
91 pa_usec_t
pa_sink_get_latency(pa_sink
*s
);
93 void pa_sink_notify(pa_sink
*s
);
95 void pa_sink_set_owner(pa_sink
*sink
, pa_module
*m
);
97 void pa_sink_set_volume(pa_sink
*sink
, pa_mixer_t m
, const pa_cvolume
*volume
);
98 const pa_cvolume
*pa_sink_get_volume(pa_sink
*sink
, pa_mixer_t m
);