[Mplayer-cvslog] CVS: main/libao2 pl_volnorm.c,1.4,1.5

Colin Leroy CVS colin at mplayerhq.hu
Sun Nov 17 13:03:28 CET 2002


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

Modified Files:
	pl_volnorm.c 
Log Message:
volnorm for bigendian


Index: pl_volnorm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/pl_volnorm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- pl_volnorm.c	10 Mar 2002 13:53:38 -0000	1.4
+++ pl_volnorm.c	17 Nov 2002 12:03:01 -0000	1.5
@@ -31,6 +31,7 @@
 #include "audio_plugin.h"
 #include "audio_plugin_internal.h"
 #include "afmt.h"
+#include "../config.h"
 
 static ao_info_t info = {
         "Volume normalizer",
@@ -116,7 +117,11 @@
 // return: 1=success 0=fail
 static int init(){
   switch(ao_plugin_data.format){
+#ifndef WORDS_BIGENDIAN
     case(AFMT_S16_LE):
+#else
+    case(AFMT_S16_BE):
+#endif
       break;
     default:
       fprintf(stderr,"[pl_volnorm] Audio format not yet supported.\n");
@@ -142,7 +147,11 @@
   int i;
   mul = MUL_INIT;
   switch(ao_plugin_data.format) {
+#ifndef WORDS_BIGENDIAN
     case(AFMT_S16_LE):
+#else
+    case(AFMT_S16_BE):
+#endif
 #if AVG==1
       lastavg = MID_S16;
 #elif AVG==2
@@ -165,8 +174,11 @@
 static int play(){
 
   switch(pl_volnorm.format){
+#ifndef WORDS_BIGENDIAN
   case(AFMT_S16_LE): {
-
+#else
+  case(AFMT_S16_BE): {
+#endif
 #define CLAMP(x,m,M) do { if ((x)<(m)) (x) = (m); else if ((x)>(M)) (x) = (M); } while(0)
 
     int16_t* data=(int16_t*)ao_plugin_data.data;




More information about the MPlayer-cvslog mailing list