mirror of
https://github.com/mpv-player/mpv
synced 2025-02-02 13:12:05 +00:00
trivial bigendian fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8740 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
90872c4792
commit
54eac2e3cf
@ -2,7 +2,7 @@
|
||||
* (linearly increases difference between L&R channels)
|
||||
*
|
||||
* Current limitations:
|
||||
* - only AFMT_S16_LE is supported currently
|
||||
* - only AFMT_S16_HE is supported currently
|
||||
*
|
||||
* License: GPLv2 (as a mix of pl_volume.c and
|
||||
* xmms:stereo_plugin/stereo.c)
|
||||
@ -20,6 +20,7 @@
|
||||
#include "audio_plugin.h"
|
||||
#include "audio_plugin_internal.h"
|
||||
#include "afmt.h"
|
||||
#include "../config.h"
|
||||
|
||||
static ao_info_t info = {
|
||||
"Extra stereo plugin",
|
||||
@ -57,7 +58,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_extrastereo] Audio format not yet suported \n");
|
||||
@ -87,7 +92,11 @@ static void reset(){
|
||||
static int play(){
|
||||
|
||||
switch(pl_extrastereo.format){
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
case(AFMT_S16_LE): {
|
||||
#else
|
||||
case(AFMT_S16_BE): {
|
||||
#endif
|
||||
|
||||
int16_t* data=(int16_t*)ao_plugin_data.data;
|
||||
int len=ao_plugin_data.len / 2; // 16 bits samples
|
||||
|
Loading…
Reference in New Issue
Block a user