Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/openal-0.0.8/src/audioconvert/ac_adpcm.h @ 17

Last change on this file since 17 was 17, checked in by landauf, 16 years ago

added openal

File size: 2.3 KB
Line 
1/***********************************************************
2 -*- mode: C; tab-width:8; c-basic-offset:8 -*-
3 * vi:set ts=8:
4Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The
5Netherlands.
6
7                        All Rights Reserved
8
9Permission to use, copy, modify, and distribute this software and its
10documentation for any purpose and without fee is hereby granted,
11provided that the above copyright notice appear in all copies and that
12both that copyright notice and this permission notice appear in
13supporting documentation, and that the names of Stichting Mathematisch
14Centrum or CWI not be used in advertising or publicity pertaining to
15distribution of the software without specific, written prior permission.
16
17STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
18THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
20FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
23OF 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
44typedef struct adpcm_state_s {
45    ALshort     valprev;        /* Previous output value */
46    ALbyte      index;          /* Index into stepsize table */
47} adpcm_state_t;
48
49void ac_adpcm_coder   (short [], char [], int, adpcm_state_t *);
50void ac_adpcm_decoder (char [], short [], int, adpcm_state_t *, int pos);
51
52int msadpcm_decode(ALubyte *encoded, ALubyte *decoded, ALuint audio_len,
53                           alMSADPCM_state_LOKI *dstate, int offset);
54
55ALint MS_ADPCM_nibble(alMSADPCM_decodestate_LOKI *state,
56                                        ALubyte nybble, ALshort *coeff);
57
58int InitIMA_ADPCM(alIMAADPCM_state_LOKI *state, alWaveFMT_LOKI *format);
59int IMA_ADPCM_decode_FULL(alIMAADPCM_state_LOKI *state,
60                        ALubyte **audio_buf, ALuint *audio_len);
61int IMA_ADPCM_decode(ALubyte *indata, ALubyte *outdata,
62                ALuint len, alIMAADPCM_state_LOKI *istate, int offset);
63
64#endif /* _AC_ADPCM_H_ */
Note: See TracBrowser for help on using the repository browser.