1 diff -Nur wavplay-1.4.orig/wavfile.c wavplay-1.4/wavfile.c
2 --- wavplay-1.4.orig/wavfile.c Sat Dec 4 01:06:42 1999
3 +++ wavplay-1.4/wavfile.c Fri Aug 16 12:31:44 2002
6 static const char rcsid[] = "@(#)wavfile.c $Revision$";
11 #include <sys/types.h>
17 - u_short wFormatTag ;
19 - u_long dwSamplesPerSec ;
20 - u_long dwAvgBytesPerSec ;
21 - u_short wBlockAlign ;
22 - u_short wBitsPerSample ;
24 + uint16_t wFormatTag ;
25 + uint16_t wChannels ;
26 + uint32_t dwSamplesPerSec ;
27 + uint32_t dwAvgBytesPerSec ;
28 + uint16_t wBlockAlign ;
29 + uint16_t wBitsPerSample ;
39 - u_short wFormatTag ;
41 - u_long nSamplesPerSec ;
42 - u_long nAvgBytesPerSec ;
43 - u_short nBlockAlign ;
44 - u_short wBitsPerSample ;
46 + uint16_t wFormatTag ;
47 + uint16_t nChannels ;
48 + uint32_t nSamplesPerSec ;
49 + uint32_t nAvgBytesPerSec ;
50 + uint16_t nBlockAlign ;
51 + uint16_t wBitsPerSample ;
54 + uint32_t nDataBytes ;
57 /*=================================================================================================*/
59 ptr += 4 ; /* Move past "fmt ".*/
60 memcpy (&waveformat, ptr, sizeof (WAVEFORMAT)) ;
62 - if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (u_long))) {
63 + if (waveformat.dwSize < (sizeof (WAVEFORMAT) - sizeof (uint32_t))) {
64 err("Bad format: Bad fmt size"); /* wwg: report error */
65 return WR_BADFORMATSIZE ;
67 diff -Nur wavplay-1.4.orig/wavplay.h wavplay-1.4/wavplay.h
68 --- wavplay-1.4.orig/wavplay.h Sat Dec 4 01:06:42 1999
69 +++ wavplay-1.4/wavplay.h Fri Aug 16 11:49:54 2002
71 #define WAVPLAY_VERSION "1.4"
75 #include <sys/types.h>
79 * Types internal to wavplay, in an attempt to isolate ourselves from
80 * a dependance on a particular platform.
82 -typedef unsigned char Byte;
85 -typedef unsigned long UInt32;
86 -typedef unsigned short UInt16;
87 +typedef uint8_t Byte;
88 +typedef int16_t Int16;
89 +typedef int32_t Int32;
90 +typedef uint32_t UInt32;
91 +typedef uint16_t UInt16;
94 * This value sets buffer sizes for temporary buffers that sprintf()