[Mplayer-cvslog] CVS: main/libao2 afmt.c,NONE,1.1 Makefile,1.8,1.9 audio_out.c,1.16,1.17

Alex Beregszaszi alex at mplayer.dev.hu
Sun Nov 11 02:49:29 CET 2001


Update of /cvsroot/mplayer/main/libao2
In directory mplayer:/var/tmp.root/cvs-serv790

Modified Files:
	Makefile audio_out.c 
Added Files:
	afmt.c 
Log Message:
audio_out_format_name moved from audio_out.c to afmt.c

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "../config.h"
#include "afmt.h"

char *audio_out_format_name(int format)
{
    switch (format)
    {
	case AFMT_MU_LAW:
	    return("Mu-Law");
	case AFMT_A_LAW:
	    return("A-Law");
	case AFMT_IMA_ADPCM:
	    return("Ima-ADPCM");
	case AFMT_S8:
	    return("Signed 8-bit");
	case AFMT_U8:
	    return("Unsigned 8-bit");
	case AFMT_U16_LE:
	    return("Unsigned 16-bit (Little-Endian)");
	case AFMT_U16_BE: 
	    return("Unsigned 16-bit (Big-Endian)");
	case AFMT_S16_LE:
	    return("Signed 16-bit (Little-Endian)");
	case AFMT_S16_BE:
	    return("Signed 16-bit (Big-Endian)");
	case AFMT_MPEG:
	    return("MPEG (2) audio");
	case AFMT_AC3:
	    return("AC3");
/*
  the following two formats are not available with old linux kernel
  headers (e.g. in 2.2.16)
*/
#ifdef AFMT_S32_LE
	case AFMT_S32_LE:
	    return("Signed 32-bit (Little-Endian)");
#endif
#ifdef AFMT_S32_BE
	case AFMT_S32_BE:
	    return("Signed 32-bit (Big-Endian)");
#endif
    }
    return("Unknown");
}

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/Makefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Makefile	5 Nov 2001 03:01:11 -0000	1.8
+++ Makefile	11 Nov 2001 01:49:26 -0000	1.9
@@ -4,7 +4,7 @@
 LIBNAME = libao2.a
 
 # TODO: moveout ao_sdl.c so it's only used when SDL is detected
-SRCS=audio_out.c ao_mpegpes.c ao_null.c ao_pcm.c $(OPTIONAL_SRCS)
+SRCS=afmt.c audio_out.c ao_mpegpes.c ao_null.c ao_pcm.c $(OPTIONAL_SRCS)
 OBJS=$(SRCS:.c=.o)
 
 CFLAGS  = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(EXTRA_INC)

Index: audio_out.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/audio_out.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- audio_out.c	5 Nov 2001 03:01:11 -0000	1.16
+++ audio_out.c	11 Nov 2001 01:49:26 -0000	1.17
@@ -77,45 +77,3 @@
 //	&audio_out_pss,
 	NULL
 };
-
-char *audio_out_format_name(int format)
-{
-    switch (format)
-    {
-	case AFMT_MU_LAW:
-	    return("Mu-Law");
-	case AFMT_A_LAW:
-	    return("A-Law");
-	case AFMT_IMA_ADPCM:
-	    return("Ima-ADPCM");
-	case AFMT_S8:
-	    return("Signed 8-bit");
-	case AFMT_U8:
-	    return("Unsigned 8-bit");
-	case AFMT_U16_LE:
-	    return("Unsigned 16-bit (Little-Endian)");
-	case AFMT_U16_BE: 
-	    return("Unsigned 16-bit (Big-Endian)");
-	case AFMT_S16_LE:
-	    return("Signed 16-bit (Little-Endian)");
-	case AFMT_S16_BE:
-	    return("Signed 16-bit (Big-Endian)");
-	case AFMT_MPEG:
-	    return("MPEG (2) audio");
-	case AFMT_AC3:
-	    return("AC3");
-/*
-  the following two formats are not available with old linux kernel
-  headers (e.g. in 2.2.16)
-*/
-#ifdef AFMT_S32_LE
-	case AFMT_S32_LE:
-	    return("Signed 32-bit (Little-Endian)");
-#endif
-#ifdef AFMT_S32_BE
-	case AFMT_S32_BE:
-	    return("Signed 32-bit (Big-Endian)");
-#endif
-    }
-    return("Unknown");
-}




More information about the MPlayer-cvslog mailing list