[MPlayer-dev-eng] [PATCH 4/12] ao_alsa: support more sample formats

Clemens Ladisch cl at cl.domainfactory-kunde.de
Mon Feb 6 09:28:45 CET 2006


This adds support for more sample formats (U32, float BE, mu/A-law).

Index: MPlayer-1.0pre7try2/libao2/ao_alsa.c
===================================================================
--- MPlayer-1.0pre7try2.orig/libao2/ao_alsa.c	2006-02-05 22:52:11.000000000 +0100
+++ MPlayer-1.0pre7try2/libao2/ao_alsa.c	2006-02-05 22:52:12.000000000 +0100
@@ -317,6 +317,12 @@ static int init(int rate_hz, int channel
       case AF_FORMAT_S16_BE:
 	alsa_format = SND_PCM_FORMAT_S16_BE;
 	break;
+      case AF_FORMAT_U32_LE:
+	alsa_format = SND_PCM_FORMAT_U32_LE;
+	break;
+      case AF_FORMAT_U32_BE:
+	alsa_format = SND_PCM_FORMAT_U32_BE;
+	break;
       case AF_FORMAT_S32_LE:
 	alsa_format = SND_PCM_FORMAT_S32_LE;
 	break;
@@ -326,6 +332,15 @@ static int init(int rate_hz, int channel
       case AF_FORMAT_FLOAT_LE:
 	alsa_format = SND_PCM_FORMAT_FLOAT_LE;
 	break;
+      case AF_FORMAT_FLOAT_BE:
+	alsa_format = SND_PCM_FORMAT_FLOAT_BE;
+	break;
+      case AF_FORMAT_MU_LAW:
+	alsa_format = SND_PCM_FORMAT_MU_LAW;
+	break;
+      case AF_FORMAT_A_LAW:
+	alsa_format = SND_PCM_FORMAT_A_LAW;
+	break;
 
       default:
 	alsa_format = SND_PCM_FORMAT_MPEG; //? default should be -1




More information about the MPlayer-dev-eng mailing list