From d7fd6a45e50475cddf0b8bad8baab01b33cf3c1f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 May 2008 22:00:19 +0000 Subject: move sources to src/ subdir git-svn-id: file:///home/lennart/svn/public/libcanberra/trunk@12 01b60673-d06a-42c0-afdd-89cb8e0f78ac --- src/read-sound-file.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/read-sound-file.h (limited to 'src/read-sound-file.h') diff --git a/src/read-sound-file.h b/src/read-sound-file.h new file mode 100644 index 0000000..5ab7e66 --- /dev/null +++ b/src/read-sound-file.h @@ -0,0 +1,48 @@ +#ifndef foocareadsoundfilehfoo +#define foocareadsoundfilehfoo + +/* $Id$ */ + +/*** + This file is part of libcanberra. + + Copyright 2008 Lennart Poettering + + libcanberra is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of the + License, or (at your option) any later version. + + libcanberra is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libcanberra. If not, If not, see + . +***/ + +typedef enum ca_sample_type { + CA_SAMPLE_S16NE, + CA_SAMPLE_S16RE, + CA_SAMPLE_U8 +} ca_sample_type_t; + +typedef struct ca_sound_file wa_sound_file; + +int ca_sound_file_open(ca_sound_file *f, const char *fn); +void ca_sound_file_close(ca_sound_file *f); + +unsigned ca_sound_file_get_nchannels(ca_sound_file *f); +unsigned ca_sound_file_get_rate(ca_sound_file *f); +ca_sample_type_t ca_sound_file_get_sample_type(ca_sound_file *f); + +size_t ca_sound_file_get_size(ca_sound_file *f); + +int ca_sound_file_read_int16(ca_sound_file *f, int16_t *d, unsigned *n); +int ca_sound_file_read_uint8(ca_sound_file *f, uint8_t *d, unsigned *n); + +int ca_sound_file_read_arbitrary(ca_sound_file *f, void *d, size_t *n); + +#endif -- cgit