Some little things; Removed compiler warnings, added some optimization.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@585 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -82,14 +82,17 @@ static const ov_callbacks ogg_callbacks =
|
||||
ogg_tell,
|
||||
};
|
||||
|
||||
/* change endianness of 16bit words */
|
||||
/* change endianness of 16bit words
|
||||
* Only works optimal when 'data' is aligned on a 32 bits boundary.
|
||||
*/
|
||||
void
|
||||
SoundDecoder_SwapWords (uint16* data, uint32 size)
|
||||
{
|
||||
uint32 fsize = size & (~3U);
|
||||
|
||||
size -= fsize;
|
||||
for (data; fsize; fsize -= 4, data += 2)
|
||||
fsize >>= 2;
|
||||
for (; fsize; fsize--, data += 2)
|
||||
{
|
||||
uint32 v = *(uint32*)data;
|
||||
*(uint32*)data = ((v & 0x00ff00ff) << 8)
|
||||
|
||||
@@ -149,7 +149,8 @@ typedef struct _mixSDL_Buffer
|
||||
|
||||
} mixSDL_Buffer;
|
||||
|
||||
#define mixSDL_bufMagic 'MIXB'
|
||||
#define mixSDL_bufMagic 0x4D495842
|
||||
// 'MIXB'
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -167,7 +168,8 @@ typedef struct
|
||||
|
||||
} mixSDL_Source;
|
||||
|
||||
#define mixSDL_srcMagic 'MIXS'
|
||||
#define mixSDL_srcMagic 0x4D495853
|
||||
// 'MIXS'
|
||||
|
||||
/*************************************************
|
||||
* General interface
|
||||
|
||||
@@ -75,7 +75,7 @@ advance_track (int channel_finished)
|
||||
PlayDecodedClip (track_clip[tcur].sample,
|
||||
SPEECH_SOURCE, false);
|
||||
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||
do_subtitles (~0, 0);
|
||||
do_subtitles ((UNICODE *) ~0, 0);
|
||||
do_subtitles (0, 0);
|
||||
}
|
||||
else if (channel_finished == 0)
|
||||
|
||||
Reference in New Issue
Block a user