add support for 24bit packed samples
[profile/ivi/pulseaudio-panda.git] / src / pulsecore / sconv-s16be.c
1 /***
2   This file is part of PulseAudio.
3
4   Copyright 2004-2006 Lennart Poettering
5
6   PulseAudio is free software; you can redistribute it and/or modify
7   it under the terms of the GNU Lesser General Public License as published
8   by the Free Software Foundation; either version 2 of the License,
9   or (at your option) any later version.
10
11   PulseAudio is distributed in the hope that it will be useful, but
12   WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14   General Public License for more details.
15
16   You should have received a copy of the GNU Lesser General Public License
17   along with PulseAudio; if not, write to the Free Software
18   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19   USA.
20 ***/
21
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include "endianmacros.h"
27
28 #define INT16_FROM PA_INT16_FROM_BE
29 #define INT16_TO PA_INT16_TO_BE
30
31 #define INT32_FROM PA_INT32_FROM_BE
32 #define INT32_TO PA_INT32_TO_BE
33
34 #define READ24 PA_READ24BE
35 #define WRITE24 PA_WRITE24BE
36
37 #define pa_sconv_s16le_to_float32ne pa_sconv_s16be_to_float32ne
38 #define pa_sconv_s16le_from_float32ne pa_sconv_s16be_from_float32ne
39 #define pa_sconv_s16le_to_float32re pa_sconv_s16be_to_float32re
40 #define pa_sconv_s16le_from_float32re pa_sconv_s16be_from_float32re
41
42 #define pa_sconv_s32le_to_float32ne pa_sconv_s32be_to_float32ne
43 #define pa_sconv_s32le_from_float32ne pa_sconv_s32be_from_float32ne
44 #define pa_sconv_s32le_to_float32re pa_sconv_s32be_to_float32re
45 #define pa_sconv_s32le_from_float32re pa_sconv_s32be_from_float32re
46
47 #define pa_sconv_s24le_to_float32ne pa_sconv_s24be_to_float32ne
48 #define pa_sconv_s24le_from_float32ne pa_sconv_s24be_from_float32ne
49 #define pa_sconv_s24le_to_float32re pa_sconv_s24be_to_float32re
50 #define pa_sconv_s24le_from_float32re pa_sconv_s24be_from_float32re
51
52 #define pa_sconv_s32le_to_s16ne pa_sconv_s32be_to_s16ne
53 #define pa_sconv_s32le_from_s16ne pa_sconv_s32be_from_s16ne
54 #define pa_sconv_s32le_to_s16re pa_sconv_s32be_to_s16re
55 #define pa_sconv_s32le_from_s16re pa_sconv_s32be_from_s16re
56
57 #define pa_sconv_s24le_to_s16ne pa_sconv_s24be_to_s16ne
58 #define pa_sconv_s24le_from_s16ne pa_sconv_s24be_from_s16ne
59 #define pa_sconv_s24le_to_s16re pa_sconv_s24be_to_s16re
60 #define pa_sconv_s24le_from_s16re pa_sconv_s24be_from_s16re
61
62 #ifdef WORDS_BIGENDIAN
63 #define SWAP_WORDS 0
64 #else
65 #define SWAP_WORDS 1
66 #endif
67
68 #include "sconv-s16le.h"
69 #include "sconv-s16le.c"