1 #ifndef foopulsecoresndfileutilhfoo 2 #define foopulsecoresndfileutilhfoo 3 4 /*** 5 This file is part of PulseAudio. 6 7 Copyright 2009 Lennart Poettering 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, see <http://www.gnu.org/licenses/>. 21 ***/ 22 23 #include <sndfile.h> 24 25 #include <pulse/sample.h> 26 #include <pulse/channelmap.h> 27 #include <pulse/proplist.h> 28 29 int pa_sndfile_read_sample_spec(SNDFILE *sf, pa_sample_spec *ss); 30 int pa_sndfile_read_channel_map(SNDFILE *sf, pa_channel_map *cm); 31 32 int pa_sndfile_write_sample_spec(SF_INFO *sfi, pa_sample_spec *ss); 33 int pa_sndfile_write_channel_map(SNDFILE *sf, pa_channel_map *cm); 34 35 void pa_sndfile_init_proplist(SNDFILE *sf, pa_proplist *p); 36 37 typedef sf_count_t (*pa_sndfile_readf_t)(SNDFILE *sndfile, void *ptr, sf_count_t frames); 38 typedef sf_count_t (*pa_sndfile_writef_t)(SNDFILE *sndfile, const void *ptr, sf_count_t frames); 39 40 /* Returns NULL if sf_read_raw() shall be used */ 41 pa_sndfile_readf_t pa_sndfile_readf_function(const pa_sample_spec *ss); 42 43 /* Returns NULL if sf_write_raw() shall be used */ 44 pa_sndfile_writef_t pa_sndfile_writef_function(const pa_sample_spec *ss); 45 46 int pa_sndfile_format_from_string(const char *extension); 47 48 void pa_sndfile_dump_formats(void); 49 50 #endif 51