// rights reserved.
// suggested by Zero_Dogg to fix a compile problem on Mandriva Linux
-#define __KERNEL_STRICT_NAMES
+#include "quakedef.h"
#include <linux/cdrom.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
-#include "quakedef.h"
#include "cdaudio.h"
if (cdfile == -1)
return;
- vol.channel0 = vol.channel1 = volume * 255;
+ vol.channel0 = vol.channel1 = (__u8)(volume * 255);
vol.channel2 = vol.channel3 = 0;
if (ioctl (cdfile, CDROMVOLCTRL, &vol) == -1)
}
-int CDAudio_SysPlay (unsigned char track)
+int CDAudio_SysPlay (int track)
{
struct cdrom_tocentry entry;
struct cdrom_ti ti;
struct cdrom_subchnl subchnl;
static time_t lastchk = 0;
- if (cdPlaying && lastchk < time(NULL))
+ if (cdPlaying && lastchk < time(NULL) && cdfile != -1)
{
lastchk = time(NULL) + 2; //two seconds between chks
subchnl.cdsc_format = CDROM_MSF;