Korrigiere Endianism im Vorbis-Code

This commit is contained in:
Yamagi Burmeister 2010-12-03 09:45:49 +00:00
parent 4b6c561acc
commit f5f5c0d2ca

View file

@ -644,9 +644,9 @@ S_RawSamplesVol ( int samples, int rate, int width, int channels, byte *data, fl
dst = s_rawend & ( MAX_RAW_SAMPLES - 1 ); dst = s_rawend & ( MAX_RAW_SAMPLES - 1 );
s_rawend++; s_rawend++;
s_rawsamples [ dst ].left = s_rawsamples [ dst ].left =
(int) ( volume * LittleShort( ( (short *) data ) [ src * 2 ] ) ) << 8; (int) ( volume * ( (short *) data ) [ src * 2 ] ) << 8;
s_rawsamples [ dst ].right = s_rawsamples [ dst ].right =
(int) ( volume * LittleShort( ( (short *) data ) [ src * 2 + 1 ] ) ) << 8; (int) ( volume * ( (short *) data ) [ src * 2 + 1 ] ) << 8;
} }
} }
else if ( ( channels == 1 ) && ( width == 2 ) ) else if ( ( channels == 1 ) && ( width == 2 ) )
@ -663,9 +663,9 @@ S_RawSamplesVol ( int samples, int rate, int width, int channels, byte *data, fl
dst = s_rawend & ( MAX_RAW_SAMPLES - 1 ); dst = s_rawend & ( MAX_RAW_SAMPLES - 1 );
s_rawend++; s_rawend++;
s_rawsamples [ dst ].left = s_rawsamples [ dst ].left =
(int) ( volume * LittleShort( ( (short *) data ) [ src ] ) ) << 8; (int) ( volume * ( (short *) data ) [ src ] ) << 8;
s_rawsamples [ dst ].right = s_rawsamples [ dst ].right =
(int) ( volume * LittleShort( ( (short *) data ) [ src ] ) ) << 8; (int) ( volume * ( (short *) data ) [ src ] ) << 8;
} }
} }
else if ( ( channels == 2 ) && ( width == 1 ) ) else if ( ( channels == 2 ) && ( width == 1 ) )