]> code.delx.au - pulseaudio/blob - src/pulsecore/stream-util.h
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / stream-util.h
1 #ifndef foostreamutilhfoo
2 #define foostreamutilhfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 Copyright 2013 Intel Corporation
8
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.1 of the License,
12 or (at your option) any later version.
13
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.
18
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
22 USA.
23 ***/
24
25 #include <pulse/format.h>
26 #include <pulse/volume.h>
27
28 /* This is a helper function that is called from pa_sink_input_new() and
29 * pa_source_output_new(). The job of this function is to figure out what
30 * channel map should be used for interpreting the volume that was set for the
31 * stream. The channel map that the client intended for the volume may be
32 * different than the final stream channel map, because the client may want the
33 * server to decide the stream channel map.
34 *
35 * volume is the volume for which the channel map should be figured out.
36 *
37 * original_map is the channel map that is set in the new data struct's
38 * channel_map field. If the channel map hasn't been set in the new data, then
39 * original_map should be NULL.
40 *
41 * format is the negotiated format for the stream. It's used as a fallback if
42 * original_map is not available.
43 *
44 * On success, the result is saved in volume_map. It's possible that this
45 * function fails to figure out the right channel map for the volume, in which
46 * case a negative error code is returned. */
47 int pa_stream_get_volume_channel_map(const pa_cvolume *volume, const pa_channel_map *original_map, const pa_format_info *format,
48 pa_channel_map *volume_map);
49
50 #endif