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 30 void uint8_to_uint8(void *dst, const void *src, int32 count); 31 void uint8_to_int8(void *dst, const void *src, int32 count); 32 void uint8_to_int16(void *dst, const void *src, int32 count); 33 void uint8_to_int32(void *dst, const void *src, int32 count); 34 void uint8_to_float32(void *dst, const void *src, int32 count); 35 36 void int8_to_uint8(void *dst, const void *src, int32 count); 37 void int8_to_int8(void *dst, const void *src, int32 count); 38 void int8_to_int16(void *dst, const void *src, int32 count); 39 void int8_to_int32(void *dst, const void *src, int32 count); 40 void int8_to_float32(void *dst, const void *src, int32 count); 41 42 void int16_to_uint8(void *dst, const void *src, int32 count); 43 void int16_to_int8(void *dst, const void *src, int32 count); 44 void int16_to_int16(void *dst, const void *src, int32 count); 45 void int16_to_int32(void *dst, const void *src, int32 count); 46 void int16_to_float32(void *dst, const void *src, int32 count); 47 48 void int24_to_uint8(void *dst, const void *src, int32 count); 49 void int24_to_int8(void *dst, const void *src, int32 count); 50 void int24_to_int16(void *dst, const void *src, int32 count); 51 void int24_to_int32(void *dst, const void *src, int32 count); 52 void int24_to_float32(void *dst, const void *src, int32 count); 53 54 void int32_to_uint8(void *dst, const void *src, int32 count); 55 void int32_to_int8(void *dst, const void *src, int32 count); 56 void int32_to_int16(void *dst, const void *src, int32 count); 57 void int32_to_int32(void *dst, const void *src, int32 count); 58 void int32_to_float32(void *dst, const void *src, int32 count); 59 60 void float32_to_uint8(void *dst, const void *src, int32 count); 61 void float32_to_int8(void *dst, const void *src, int32 count); 62 void float32_to_int16(void *dst, const void *src, int32 count); 63 void float32_to_int32(void *dst, const void *src, int32 count); 64 void float32_to_float32(void *dst, const void *src, int32 count); 65 66 void float64_to_uint8(void *dst, const void *src, int32 count); 67 void float64_to_int8(void *dst, const void *src, int32 count); 68 void float64_to_int16(void *dst, const void *src, int32 count); 69 void float64_to_int32(void *dst, const void *src, int32 count); 70 void float64_to_float32(void *dst, const void *src, int32 count); 71 72 void swap_int16(void *data, int32 count); 73 void swap_int24(void *data, int32 count); 74 void swap_int32(void *data, int32 count); 75 void swap_float32(void *data, int32 count); 76 void swap_float64(void *data, int32 count); 77 78 #endif // _AUDIO_CONVERSION_H 79