summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_snd.c
diff options
context:
space:
mode:
authorRobin KAY <komadori@users.sourceforge.net>2002-10-05 21:09:18 +0000
committerRobin KAY <komadori@users.sourceforge.net>2002-10-05 21:09:18 +0000
commitd74a5945bda0bcdba7797a7d84a2910710c489d5 (patch)
treed9c877de4e3121cc6698bf3dba3dcb060cb7acef /src/demuxers/demux_snd.c
parenteac25620909bff27249d602188d743497be1e954 (diff)
downloadxine-lib-d74a5945bda0bcdba7797a7d84a2910710c489d5.tar.gz
xine-lib-d74a5945bda0bcdba7797a7d84a2910710c489d5.tar.bz2
Backing out changes to endian translation macros
CVS patchset: 2788 CVS date: 2002/10/05 21:09:18
Diffstat (limited to 'src/demuxers/demux_snd.c')
-rw-r--r--src/demuxers/demux_snd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c
index 3eb6dd87b..4336cda8e 100644
--- a/src/demuxers/demux_snd.c
+++ b/src/demuxers/demux_snd.c
@@ -19,7 +19,7 @@
*
* SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net)
*
- * $Id: demux_snd.c,v 1.9 2002/10/05 14:39:24 komadori Exp $
+ * $Id: demux_snd.c,v 1.10 2002/10/05 21:09:18 komadori Exp $
*
*/
@@ -41,8 +41,8 @@
#include "buffer.h"
#include "bswap.h"
-#define BE_16(x) (be2me_16((uint16_t)(x)))
-#define BE_32(x) (be2me_32((uint32_t)(x)))
+#define BE_16(x) (be2me_16(*(unsigned short *)(x)))
+#define BE_32(x) (be2me_32(*(unsigned int *)(x)))
#define SND_HEADER_SIZE 24
#define PCM_BLOCK_ALIGN 1024
@@ -196,11 +196,11 @@ static int load_snd_and_send_headers(demux_snd_t *this) {
return DEMUX_CANNOT_HANDLE;
}
- this->data_start = BE_32(header[0x04]);
- this->data_size = BE_32(header[0x08]);
- encoding = BE_32(header[0x0C]);
- this->audio_sample_rate = BE_32(header[0x10]);
- this->audio_channels = BE_32(header[0x14]);
+ this->data_start = BE_32(&header[0x04]);
+ this->data_size = BE_32(&header[0x08]);
+ encoding = BE_32(&header[0x0C]);
+ this->audio_sample_rate = BE_32(&header[0x10]);
+ this->audio_channels = BE_32(&header[0x14]);
/* basic sanity checks on the loaded audio parameters */
if ((!this->audio_sample_rate) ||
@@ -285,7 +285,7 @@ static int demux_snd_open(demux_plugin_t *this_gen,
return DEMUX_CANNOT_HANDLE;
/* check the signature */
- if (BE_32(header[0]) == snd_TAG)
+ if (BE_32(&header[0]) == snd_TAG)
return load_snd_and_send_headers(this);
return DEMUX_CANNOT_HANDLE;