Mercurial > audlegacy
diff src/audacious/volumecontrol.c @ 3981:ab4962c133c7
Handle native endianness.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 22 Nov 2007 05:01:37 -0600 |
parents | a140fadd741d |
children | 32bb5ea701ed |
line wrap: on
line diff
--- a/src/audacious/volumecontrol.c Sun Nov 18 18:34:44 2007 -0600 +++ b/src/audacious/volumecontrol.c Thu Nov 22 05:01:37 2007 -0600 @@ -123,6 +123,18 @@ switch (fmt) { + case FMT_S16_NE: + fmt = G_BYTE_ORDER == G_LITTLE_ENDIAN ? FMT_S16_LE : FMT_S16_LE; + break; + case FMT_U16_NE: + fmt = G_BYTE_ORDER == G_LITTLE_ENDIAN ? FMT_U16_LE : FMT_U16_BE; + break; + default: + break; + } + + switch (fmt) + { case FMT_S16_LE: VOLUME_ADJUST(gint16, GINT16, LE); break;