]> code.delx.au - pulseaudio/blob - src/pulsecore/core-format.h
core-format: Add pa_format_info_get_sample_format()
[pulseaudio] / src / pulsecore / core-format.h
1 #ifndef foocoreformathfoo
2 #define foocoreformathfoo
3
4 /***
5 This file is part of PulseAudio.
6
7 PulseAudio is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation; either version 2.1 of the License,
10 or (at your option) any later version.
11
12 PulseAudio is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with PulseAudio; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA.
21 ***/
22
23 #include <pulse/format.h>
24
25 /* Gets the sample format stored in the format info. Returns a negative error
26 * code on failure. If the sample format property is not set at all, returns
27 * -PA_ERR_NOENTITY. */
28 int pa_format_info_get_sample_format(pa_format_info *f, pa_sample_format_t *sf);
29
30 /* For compressed formats. Converts the format info into a sample spec and a
31 * channel map that an ALSA device can use as its configuration parameters when
32 * playing back the compressed data. That is, the returned sample spec doesn't
33 * describe the audio content, but the device parameters. */
34 int pa_format_info_to_sample_spec_fake(pa_format_info *f, pa_sample_spec *ss, pa_channel_map *map);
35
36 #endif