]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - ogg.c
Removed the little endian -> native endian conversion from the sound resampling funct...
[xonotic/darkplaces.git] / ogg.c
diff --git a/ogg.c b/ogg.c
index 293226d08da88cbd3ddb068443d0e444a9c2662a..c635e267d448f1beac50cea63c3c61ac4f9972da 100644 (file)
--- a/ogg.c
+++ b/ogg.c
@@ -372,7 +372,7 @@ sfxcache_t *OGG_LoadVorbisFile (const char *filename, sfx_t *s)
        ogg_int64_t len;
        char *buff;
        ogg_int64_t done;
-       int bs;
+       int bs, bigendian;
        long ret;
        sfxcache_t *sc;
 
@@ -411,7 +411,12 @@ sfxcache_t *OGG_LoadVorbisFile (const char *filename, sfx_t *s)
        buff = Mem_Alloc (tempmempool, (int)len);
        done = 0;
        bs = 0;
-       while ((ret = qov_read (&vf, &buff[done], (int)(len - done), 0, 2, 1, &bs)) > 0)
+#if BYTE_ORDER == LITTLE_ENDIAN
+       bigendian = 0;
+#else
+       bigendian = 1;
+#endif
+       while ((ret = qov_read (&vf, &buff[done], (int)(len - done), bigendian, 2, 1, &bs)) > 0)
                done += ret;
 
        // Calculate resampled length