ref: 5ab9d6ac27bbd336c48eec362e9720b6d08f42d9
parent: a5c1cc0792714826785832d1a75cff260b73670e
author: robs <robs>
date: Mon Mar 23 05:57:51 EDT 2009
quash 64-bit warnings
--- a/src/CoreAudio/CoreAudio.h
+++ b/src/CoreAudio/CoreAudio.h
@@ -127,7 +127,6 @@
kAudioFormatFlagIsAlignedHigh = (1L << 4),
kAudioFormatFlagIsNonInterleaved = (1L << 5),
kAudioFormatFlagIsNonMixable = (1L << 6),
- kAudioFormatFlagsAreAllClear = (1L << 31),
kLinearPCMFormatFlagIsFloat = kAudioFormatFlagIsFloat,
kLinearPCMFormatFlagIsBigEndian = kAudioFormatFlagIsBigEndian,
@@ -136,7 +135,6 @@
kLinearPCMFormatFlagIsAlignedHigh = kAudioFormatFlagIsAlignedHigh,
kLinearPCMFormatFlagIsNonInterleaved = kAudioFormatFlagIsNonInterleaved,
kLinearPCMFormatFlagIsNonMixable = kAudioFormatFlagIsNonMixable,
- kLinearPCMFormatFlagsAreAllClear = kAudioFormatFlagsAreAllClear,
kAppleLosslessFormatFlag_16BitSourceData = 1,
kAppleLosslessFormatFlag_20BitSourceData = 2,
--- a/src/sndio.c
+++ b/src/sndio.c
@@ -179,18 +179,18 @@
todo = len * p->par.bps;
cpb = SNDIO_BUFSZ - (SNDIO_BUFSZ % p->par.bps);
while (todo > 0) {
- memcpy(p->buf, partial, pc);
+ memcpy(p->buf, partial, (size_t)pc);
cc = cpb - pc;
if (cc > todo)
cc = todo;
- n = sio_read(p->hdl, p->buf + pc, cc);
+ n = sio_read(p->hdl, p->buf + pc, (size_t)cc);
if (n == 0 && sio_eof(p->hdl))
break;
n += pc;
pc = n % p->par.bps;
n -= pc;
- memcpy(partial, p->buf + n, pc);
- decode(&p->par, p->buf, buf, n / p->par.bps);
+ memcpy(partial, p->buf + n, (size_t)pc);
+ decode(&p->par, p->buf, buf, (unsigned)(n / p->par.bps));
buf += n / p->par.bps;
todo -= n;
}
@@ -210,7 +210,7 @@
if (sc > todo)
sc = todo;
encode(&p->par, buf, p->buf, sc);
- n = sio_write(p->hdl, p->buf, sc * p->par.bps);
+ n = sio_write(p->hdl, p->buf, (size_t)(sc * p->par.bps));
if (n == 0 && sio_eof(p->hdl))
break;
n /= p->par.bps;
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -167,6 +167,8 @@
/* Flush any data in the buffers - its probably in the wrong format */
#if defined(__NetBSD__) || defined(__OpenBSD__)
ioctl(fileno(ft->fp), AUDIO_FLUSH);
+#elif defined __GLIBC__
+ ioctl(fileno(ft->fp), (unsigned long int)I_FLUSH, FLUSHR);
#else
ioctl(fileno(ft->fp), I_FLUSH, FLUSHR);
#endif
--- a/src/sys/audioio.h
+++ b/src/sys/audioio.h
@@ -25,6 +25,11 @@
#define ushort_t unsigned short
#define uint_t unsigned int
#define uchar_t unsigned char
+struct timeval32
+{
+ unsigned tv_sec;
+ unsigned tv_usec;
+};
#endif
/*