blob: 1e438a50646680a92b7b360943e6bb890fba9e8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
$NetBSD: patch-ab,v 1.6 2004/06/09 12:53:46 minskim Exp $
--- mpegsound/mpegsound.h.orig 1998-03-06 11:43:55.000000000 -0600
+++ mpegsound/mpegsound.h
@@ -11,6 +11,11 @@
/************************************/
#include <stdio.h>
#include <sys/types.h>
+#ifdef __linux__
+#include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
#ifdef PTHREADEDMPEG
#ifdef HAVE_PTHREAD_H
@@ -90,6 +95,8 @@
/*******************************************/
/* Define values for Microsoft WAVE format */
/*******************************************/
+#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN )
+
#define RIFF 0x46464952
#define WAVE 0x45564157
#define FMT 0x20746D66
@@ -101,6 +108,21 @@
#define MODE_MONO 0
#define MODE_STEREO 1
+#else
+
+#define RIFF 0x52494646
+#define WAVE 0x57415645
+#define FMT 0x666D7420
+#define DATA 0x64617461
+#define PCM_CODE (1 << 8)
+#define WAVE_MONO (1 << 8)
+#define WAVE_STEREO (2 << 8)
+
+#define MODE_MONO 0
+#define MODE_STEREO 1
+
+#endif
+
/********************/
/* Type definitions */
/********************/
|