mirror of
https://github.com/mpv-player/mpv
synced 2024-10-18 10:25:02 +02:00
audio_out_format_name moved from audio_out.c to afmt.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2813 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c00ac3a4ec
commit
17f7dae687
@ -4,7 +4,7 @@ include config.mak
|
||||
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)
|
||||
|
47
libao2/afmt.c
Normal file
47
libao2/afmt.c
Normal file
@ -0,0 +1,47 @@
|
||||
#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");
|
||||
}
|
@ -77,45 +77,3 @@ ao_functions_t* audio_out_drivers[] =
|
||||
// &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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user