From 4a24afe93bf075bae13db24685497c477ef3d0d2 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 17 Nov 2002 12:03:01 +0000 Subject: [PATCH] volnorm for bigendian git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8219 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/pl_volnorm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libao2/pl_volnorm.c b/libao2/pl_volnorm.c index 4de14ad925..4ca29dbdd2 100644 --- a/libao2/pl_volnorm.c +++ b/libao2/pl_volnorm.c @@ -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 @@ static int control(int cmd,int arg){ // 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 @@ static void reset(){ 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 void reset(){ 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;