use ifdef to see if we are big-endian
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@693 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
af00e0305b
commit
8308616779
@ -110,7 +110,6 @@ BOOL
|
||||
wave_out_set_format(WAVEFORMATEX * pwfx)
|
||||
{
|
||||
audio_info_t info;
|
||||
int test = 1;
|
||||
|
||||
ioctl(g_dsp_fd, AUDIO_DRAIN, 0);
|
||||
g_swapaudio = False;
|
||||
@ -125,7 +124,11 @@ wave_out_set_format(WAVEFORMATEX * pwfx)
|
||||
{
|
||||
info.play.encoding = AUDIO_ENCODING_LINEAR;
|
||||
/* Do we need to swap the 16bit values? (Are we BigEndian) */
|
||||
g_swapaudio = !(*(uint8 *) (&test));
|
||||
#ifdef B_ENDIAN
|
||||
g_swapaudio = 1;
|
||||
#else
|
||||
g_swapaudio = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
g_samplewidth = pwfx->wBitsPerSample / 8;
|
||||
|
Loading…
Reference in New Issue
Block a user