changeset 8222:c8677169cc2c

added float
author alex
date Sun, 17 Nov 2002 17:35:31 +0000
parents 8ea6ba1e6c0b
children a88e53ef3029
files libao2/afmt.c libao2/afmt.h
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/afmt.c	Sun Nov 17 13:01:06 2002 +0000
+++ b/libao2/afmt.c	Sun Nov 17 17:35:31 2002 +0000
@@ -42,6 +42,8 @@
 	case AFMT_S32_BE:
 	    return("Signed 32-bit (Big-Endian)");
 #endif
+	case AFMT_FLOAT:
+	    return("Floating Point");
     }
     return("Unknown");
 }
@@ -50,6 +52,12 @@
 int audio_out_format_bits(int format){
     switch (format)
     {
+	case AFMT_S16_LE:
+	case AFMT_S16_BE:
+	case AFMT_U16_LE:
+	case AFMT_U16_BE: 
+	return 16;//16 bits
+
 /*
   the following two formats are not available with old linux kernel
   headers (e.g. in 2.2.16)
@@ -62,12 +70,8 @@
 	case AFMT_S32_BE:
 	return 32;
 #endif
-
-	case AFMT_U16_LE:
-	case AFMT_U16_BE: 
-	case AFMT_S16_LE:
-	case AFMT_S16_BE:
-	return 16;//16 bits
+	case AFMT_FLOAT:
+	return 32;
 	
 	case AFMT_MU_LAW:
 	case AFMT_A_LAW:
--- a/libao2/afmt.h	Sun Nov 17 13:01:06 2002 +0000
+++ b/libao2/afmt.h	Sun Nov 17 17:35:31 2002 +0000
@@ -47,3 +47,7 @@
 #  define AFMT_S32_NE	AFMT_S32_LE
 # endif
 #endif
+
+#ifndef AFMT_FLOAT
+# define AFMT_FLOAT               0x00004000
+#endif