diff --git a/libao2/afmt.c b/libao2/afmt.c index 8463d6c5d9..3eb81e84be 100644 --- a/libao2/afmt.c +++ b/libao2/afmt.c @@ -42,6 +42,8 @@ char *audio_out_format_name(int format) case AFMT_S32_BE: return("Signed 32-bit (Big-Endian)"); #endif + case AFMT_FLOAT: + return("Floating Point"); } return("Unknown"); } @@ -50,6 +52,12 @@ char *audio_out_format_name(int format) 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 @@ int audio_out_format_bits(int format){ 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: diff --git a/libao2/afmt.h b/libao2/afmt.h index ed2d01027f..2b5b904a92 100644 --- a/libao2/afmt.h +++ b/libao2/afmt.h @@ -47,3 +47,7 @@ # define AFMT_S32_NE AFMT_S32_LE # endif #endif + +#ifndef AFMT_FLOAT +# define AFMT_FLOAT 0x00004000 +#endif