1/*
2 * Copyright (c) 2003, Marcus Overhagen
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 *  * Redistributions of source code must retain the above copyright notice,
9 *    this list of conditions and the following disclaimer.
10 *  * Redistributions in binary form must reproduce the above copyright notice,
11 *    this list of conditions and the following disclaimer in the documentation
12 *    and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
23 * OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25#ifndef _AUDIO_CONVERSION_H
26#define _AUDIO_CONVERSION_H
27
28#include <SupportDefs.h>
29
30void uint8_to_uint8(void *dst, const void *src, int32 count);
31void uint8_to_int8(void *dst, const void *src, int32 count);
32void uint8_to_int16(void *dst, const void *src, int32 count);
33void uint8_to_int32(void *dst, const void *src, int32 count);
34void uint8_to_float32(void *dst, const void *src, int32 count);
35
36void int8_to_uint8(void *dst, const void *src, int32 count);
37void int8_to_int8(void *dst, const void *src, int32 count);
38void int8_to_int16(void *dst, const void *src, int32 count);
39void int8_to_int32(void *dst, const void *src, int32 count);
40void int8_to_float32(void *dst, const void *src, int32 count);
41
42void int16_to_uint8(void *dst, const void *src, int32 count);
43void int16_to_int8(void *dst, const void *src, int32 count);
44void int16_to_int16(void *dst, const void *src, int32 count);
45void int16_to_int32(void *dst, const void *src, int32 count);
46void int16_to_float32(void *dst, const void *src, int32 count);
47
48void int24_to_uint8(void *dst, const void *src, int32 count);
49void int24_to_int8(void *dst, const void *src, int32 count);
50void int24_to_int16(void *dst, const void *src, int32 count);
51void int24_to_int32(void *dst, const void *src, int32 count);
52void int24_to_float32(void *dst, const void *src, int32 count);
53
54void int32_to_uint8(void *dst, const void *src, int32 count);
55void int32_to_int8(void *dst, const void *src, int32 count);
56void int32_to_int16(void *dst, const void *src, int32 count);
57void int32_to_int32(void *dst, const void *src, int32 count);
58void int32_to_float32(void *dst, const void *src, int32 count);
59
60void float32_to_uint8(void *dst, const void *src, int32 count);
61void float32_to_int8(void *dst, const void *src, int32 count);
62void float32_to_int16(void *dst, const void *src, int32 count);
63void float32_to_int32(void *dst, const void *src, int32 count);
64void float32_to_float32(void *dst, const void *src, int32 count);
65
66void float64_to_uint8(void *dst, const void *src, int32 count);
67void float64_to_int8(void *dst, const void *src, int32 count);
68void float64_to_int16(void *dst, const void *src, int32 count);
69void float64_to_int32(void *dst, const void *src, int32 count);
70void float64_to_float32(void *dst, const void *src, int32 count);
71
72void swap_int16(void *data, int32 count);
73void swap_int24(void *data, int32 count);
74void swap_int32(void *data, int32 count);
75void swap_float32(void *data, int32 count);
76void swap_float64(void *data, int32 count);
77
78#endif // _AUDIO_CONVERSION_H
79