7 This file is part of PulseAudio.
9 PulseAudio 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 PulseAudio 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 PulseAudio; 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 <pulse/sample.h>
30 #include <pulse/channelmap.h>
31 #include <pulse/volume.h>
32 #include <pulsecore/core-def.h>
33 #include <pulsecore/core.h>
34 #include <pulsecore/idxset.h>
35 #include <pulsecore/source.h>
36 #include <pulsecore/module.h>
38 #define PA_MAX_INPUTS_PER_SINK 32
40 typedef enum pa_sink_state
{
49 pa_sink_state_t state
;
51 char *name
, *description
, *driver
;
54 pa_sample_spec sample_spec
;
55 pa_channel_map channel_map
;
58 pa_source
*monitor_source
;
60 pa_cvolume hw_volume
, sw_volume
;
61 int hw_muted
, sw_muted
;
63 void (*notify
)(pa_sink
*sink
);
64 pa_usec_t (*get_latency
)(pa_sink
*s
);
65 int (*set_hw_volume
)(pa_sink
*s
);
66 int (*get_hw_volume
)(pa_sink
*s
);
67 int (*set_hw_mute
)(pa_sink
*s
);
68 int (*get_hw_mute
)(pa_sink
*s
);
78 const pa_sample_spec
*spec
,
79 const pa_channel_map
*map
);
81 void pa_sink_disconnect(pa_sink
* s
);
82 void pa_sink_unref(pa_sink
*s
);
83 pa_sink
* pa_sink_ref(pa_sink
*s
);
85 int pa_sink_render(pa_sink
*s
, size_t length
, pa_memchunk
*result
);
86 void pa_sink_render_full(pa_sink
*s
, size_t length
, pa_memchunk
*result
);
87 int pa_sink_render_into(pa_sink
*s
, pa_memchunk
*target
);
88 void pa_sink_render_into_full(pa_sink
*s
, pa_memchunk
*target
);
90 pa_usec_t
pa_sink_get_latency(pa_sink
*s
);
92 void pa_sink_notify(pa_sink
*s
);
94 void pa_sink_set_owner(pa_sink
*sink
, pa_module
*m
);
96 void pa_sink_set_volume(pa_sink
*sink
, pa_mixer_t m
, const pa_cvolume
*volume
);
97 const pa_cvolume
*pa_sink_get_volume(pa_sink
*sink
, pa_mixer_t m
);
98 void pa_sink_set_mute(pa_sink
*sink
, pa_mixer_t m
, int mute
);
99 int pa_sink_get_mute(pa_sink
*sink
, pa_mixer_t m
);