summaryrefslogtreecommitdiffstats
path: root/adpcm.h
diff options
context:
space:
mode:
authormelanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-28 06:47:15 +0000
committermelanson <melanson@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-28 06:47:15 +0000
commit296399a5bbc82bad4b57c9b9b761a4b1ed85c6df (patch)
tree7ca8fc7105f5264f369b67c2bd621f04fbcaf2a8 /adpcm.h
parent57a9da01e28126457f2c4c82f4e6f75c9615393b (diff)
downloadmpv-296399a5bbc82bad4b57c9b9b761a4b1ed85c6df.tar.bz2
mpv-296399a5bbc82bad4b57c9b9b761a4b1ed85c6df.tar.xz
added initial, not-yet-functional, support for fox62 audio
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3827 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'adpcm.h')
-rw-r--r--adpcm.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/adpcm.h b/adpcm.h
index 48c0116ae8..92ac77c73d 100644
--- a/adpcm.h
+++ b/adpcm.h
@@ -1,15 +1,27 @@
#ifndef ADPCM_H
#define ADPCM_H
+#define IMA_ADPCM_PREAMBLE_SIZE 2
#define IMA_ADPCM_BLOCK_SIZE 0x22
-#define IMA_ADPCM_SAMPLES_PER_BLOCK 0x40
+#define IMA_ADPCM_SAMPLES_PER_BLOCK \
+ ((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)
+#define MS_ADPCM_PREAMBLE_SIZE 7
#define MS_ADPCM_BLOCK_SIZE 256
-#define MS_ADPCM_SAMPLES_PER_BLOCK ((256 - 7) * 2)
+#define MS_ADPCM_SAMPLES_PER_BLOCK \
+ ((MS_ADPCM_BLOCK_SIZE - MS_ADPCM_PREAMBLE_SIZE) * 2)
+
+// pretend there's such a thing as mono for this format
+#define FOX62_ADPCM_PREAMBLE_SIZE 8
+#define FOX62_ADPCM_BLOCK_SIZE 0x400
+#define FOX62_ADPCM_SAMPLES_PER_BLOCK \
+ ((FOX62_ADPCM_BLOCK_SIZE - FOX62_ADPCM_PREAMBLE_SIZE) * 2)
int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
int channels);
int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
int channels);
+int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input,
+ int channels);
#endif