diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-06-08 20:25:28 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-06-08 20:25:28 +0000 |
commit | 7b0c242d34b54e550520e643552e5643cef88778 (patch) | |
tree | dfa186eb0e8c2ffdd0ef52df6b4fa6a20f903b3e /libmpcodecs/native/common1428.h | |
parent | 0e5c9a508fdee6f76bd5032dccfea46cb1054c94 (diff) | |
download | mpv-7b0c242d34b54e550520e643552e5643cef88778.tar.bz2 mpv-7b0c242d34b54e550520e643552e5643cef88778.tar.xz |
RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders.
Author unknown, code from a public domain player for Amiga
at http://www.honeypot.net/audio
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10261 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/native/common1428.h')
-rw-r--r-- | libmpcodecs/native/common1428.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libmpcodecs/native/common1428.h b/libmpcodecs/native/common1428.h new file mode 100644 index 0000000000..e49a7b68c5 --- /dev/null +++ b/libmpcodecs/native/common1428.h @@ -0,0 +1,34 @@ +#ifndef COMMON_H +#define COMMON_H + +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <math.h> + +#define DATABLOCK1 20 /* size of 14.4 input block in bytes */ +#define DATABLOCK2 38 /* size of 28.8 input block in bytes */ +#define DATACHUNK1 1440 /* size of 14.4 input chunk in bytes */ +#define DATACHUNK2 2736 /* size of 28.8 input chunk in bytes */ +#define AUDIOBLOCK 160 /* size of output block in 16-bit words (320 bytes) */ +//#define AUDIOBUFFER 11520 /* size of output buffer in 16-bit words (23040 bytes) */ +#define AUDIOBUFFER 12288 /* size of output buffer in 16-bit words (24576 bytes) */ + +typedef void Real_144; +typedef void Real_288; +typedef void Real_dnet; + +/* common prototypes */ +Real_144 *init_144 (void); +Real_288 *init_288 (void); +Real_dnet *init_dnet (void); +void free_144 (Real_144 *global); +void free_288 (Real_288 *global); +void free_dnet (Real_dnet *global); +void deinterleave (unsigned char *in, unsigned char *out, unsigned int size); +void swapbytes (unsigned char *in, unsigned char *out, unsigned int len); +void decode_144 (Real_144 *global, unsigned char *source, signed short *target); +void decode_288 (Real_288 *global, unsigned char *in, signed short *out); +int decode_dnet (Real_dnet *global, unsigned char *in, signed short *out, int *freq, int chans); + +#endif /* !COMMON_H */ |