diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-03-09 21:42:08 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-03-09 21:42:08 +0000 |
commit | 8d95265cc8ba60ed8f51a07a6028f4a0dc56bf6d (patch) | |
tree | 580875e95163d22206be45c47516353f7091a7c4 /src | |
parent | 197c046b029e3c4a7055f67a4921e07cace4aa3b (diff) |
use BIGENDIAN for ov_read, instead of changing endianness unneccessarily
git-svn-id: https://svn.musicpd.org/mpd/trunk@232 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/ogg_decode.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ogg_decode.c b/src/ogg_decode.c index aa8259f09..0b75ce3b2 100644 --- a/src/ogg_decode.c +++ b/src/ogg_decode.c @@ -31,6 +31,12 @@ #include <string.h> #include <vorbis/vorbisfile.h> +#ifdef WORDS_BIGENDIAN +#define OGG_DECODE_USE_BIGENDIAN 1 +#else +#define OGG_DECODE_USE_BIGENDIAN 0 +#endif + int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) { OggVorbis_File vf; @@ -77,7 +83,8 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) } ret = ov_read(&vf,chunk+chunkpos, CHUNK_SIZE-chunkpos, - 0,2,1, + OGG_DECODE_USE_BIGENDIAN, + 2,1, ¤t_section); if(ret<=0) eof = 1; else chunkpos+=ret; @@ -89,10 +96,6 @@ int ogg_decode(Buffer * cb, AudioFormat * af, DecoderControl * dc) } if(dc->stop) break; else if(dc->seek) continue; -#ifdef WORDS_BIGENDIAN - pcm_changeBufferEndianness(chunk,CHUNK_SIZE, - af->bits); -#endif memcpy(cb->chunks+cb->end*CHUNK_SIZE, chunk,chunkpos); cb->chunkSize[cb->end] = chunkpos; |