summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-04 19:05:16 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-10-04 19:05:16 +0000
commit83c1543028b9b7748dcd49338abd3658717be94f (patch)
tree1df0c44c5bde8e1c8ad8206fda649b0064eb312a /libao2
parente40f077b8326a900bfd4bdd2ff84d7f3ecceb8e6 (diff)
downloadmpv-83c1543028b9b7748dcd49338abd3658717be94f.tar.bz2
mpv-83c1543028b9b7748dcd49338abd3658717be94f.tar.xz
introducing 24bit formats and make the values compliant to OSS
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13549 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/afmt.c8
-rw-r--r--libao2/afmt.h22
2 files changed, 24 insertions, 6 deletions
diff --git a/libao2/afmt.c b/libao2/afmt.c
index 9383079a86..78ddd9ddf2 100644
--- a/libao2/afmt.c
+++ b/libao2/afmt.c
@@ -34,6 +34,10 @@ char *audio_out_format_name(int format)
return("Signed 32-bit (Little-Endian)");
case AFMT_S32_BE:
return("Signed 32-bit (Big-Endian)");
+ case AFMT_S24_LE:
+ return("Signed 24-bit (Little-Endian)");
+ case AFMT_S24_BE:
+ return("Signed 24-bit (Big-Endian)");
case AFMT_FLOAT:
return("Floating Point");
}
@@ -54,6 +58,10 @@ int audio_out_format_bits(int format){
case AFMT_S32_BE:
case AFMT_FLOAT:
return 32;
+
+ case AFMT_S24_LE:
+ case AFMT_S24_BE:
+ return 24;
case AFMT_MU_LAW:
case AFMT_A_LAW:
diff --git a/libao2/afmt.h b/libao2/afmt.h
index fbef3af89b..4b681df486 100644
--- a/libao2/afmt.h
+++ b/libao2/afmt.h
@@ -32,29 +32,39 @@
# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
#endif
-/* 32 bit formats (MSB aligned) formats */
-#ifndef AFMT_S32_LE
-# define AFMT_S32_LE 0x00001000
-# define AFMT_S32_BE 0x00002000
+/* 24 bit formats from the linux kernel */
+#ifndef AFMT_S24_LE
+#define AFMT_S24_LE 0x00000800
+#define AFMT_S24_BE 0x00001000
+#define AFMT_U24_LE 0x00002000
+#define AFMT_U24_BE 0x00004000
#endif
+/* 32 bit formats from the linux kernel */
+#ifndef AFMT_S32_LE
+#define AFMT_S32_LE 0x00008000
+#define AFMT_S32_BE 0x00010000
+#define AFMT_U32_LE 0x00020000
+#define AFMT_U32_BE 0x00040000
+#endif
/* native endian formats */
#ifndef AFMT_S16_NE
# if WORDS_BIGENDIAN
# define AFMT_S16_NE AFMT_S16_BE
+# define AFMT_S24_NE AFMT_S24_BE
# define AFMT_S32_NE AFMT_S32_BE
# else
# define AFMT_S16_NE AFMT_S16_LE
+# define AFMT_S24_NE AFMT_S24_LE
# define AFMT_S32_NE AFMT_S32_LE
# endif
#endif
#ifndef AFMT_FLOAT
-# define AFMT_FLOAT 0x00004000
+# define AFMT_FLOAT 0x00100000
#endif
/* for formats that don't have a corresponding AFMT_* type,
* use the flags from libaf/af_format.h or'ed with this */
#define AFMT_AF_FLAGS 0x70000000
-