1 | /*********************************************************** |
---|
2 | -*- mode: C; tab-width:8; c-basic-offset:8 -*- |
---|
3 | * vi:set ts=8: |
---|
4 | Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The |
---|
5 | Netherlands. |
---|
6 | |
---|
7 | All Rights Reserved |
---|
8 | |
---|
9 | Permission to use, copy, modify, and distribute this software and its |
---|
10 | documentation for any purpose and without fee is hereby granted, |
---|
11 | provided that the above copyright notice appear in all copies and that |
---|
12 | both that copyright notice and this permission notice appear in |
---|
13 | supporting documentation, and that the names of Stichting Mathematisch |
---|
14 | Centrum or CWI not be used in advertising or publicity pertaining to |
---|
15 | distribution of the software without specific, written prior permission. |
---|
16 | |
---|
17 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
---|
18 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
---|
19 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
---|
20 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
21 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
22 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
---|
23 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
24 | |
---|
25 | ******************************************************************/ |
---|
26 | |
---|
27 | /* |
---|
28 | * |
---|
29 | * ac_adpcm.h |
---|
30 | * |
---|
31 | * This file contains prototypes and definitions for the ADPCM |
---|
32 | * decoders in audioconvert. |
---|
33 | * |
---|
34 | * For more information, please see ac_adpcm.c |
---|
35 | */ |
---|
36 | #ifndef _AC_ADPCM_H_ |
---|
37 | #define _AC_ADPCM_H_ |
---|
38 | |
---|
39 | #include "al_siteconfig.h" |
---|
40 | |
---|
41 | #include <AL/al.h> |
---|
42 | #include <AL/alext.h> |
---|
43 | |
---|
44 | typedef struct adpcm_state_s { |
---|
45 | ALshort valprev; /* Previous output value */ |
---|
46 | ALbyte index; /* Index into stepsize table */ |
---|
47 | } adpcm_state_t; |
---|
48 | |
---|
49 | void ac_adpcm_coder (short [], char [], int, adpcm_state_t *); |
---|
50 | void ac_adpcm_decoder (char [], short [], int, adpcm_state_t *, int pos); |
---|
51 | |
---|
52 | int msadpcm_decode(ALubyte *encoded, ALubyte *decoded, ALuint audio_len, |
---|
53 | alMSADPCM_state_LOKI *dstate, int offset); |
---|
54 | |
---|
55 | ALint MS_ADPCM_nibble(alMSADPCM_decodestate_LOKI *state, |
---|
56 | ALubyte nybble, ALshort *coeff); |
---|
57 | |
---|
58 | int InitIMA_ADPCM(alIMAADPCM_state_LOKI *state, alWaveFMT_LOKI *format); |
---|
59 | int IMA_ADPCM_decode_FULL(alIMAADPCM_state_LOKI *state, |
---|
60 | ALubyte **audio_buf, ALuint *audio_len); |
---|
61 | int IMA_ADPCM_decode(ALubyte *indata, ALubyte *outdata, |
---|
62 | ALuint len, alIMAADPCM_state_LOKI *istate, int offset); |
---|
63 | |
---|
64 | #endif /* _AC_ADPCM_H_ */ |
---|