}
+float CDAudio_SysGetVolume (void)
+{
+ struct ioc_vol vol;
+
+ if (cdfile == -1)
+ return -1.0f;
+
+ if (ioctl (cdfile, CDIOCGETVOL, &vol) == -1)
+ {
+ Con_DPrint("ioctl CDIOCGETVOL failed\n");
+ return -1.0f;
+ }
+
+ return (vol.vol[0] + vol.vol[1]) / 2.0f / 255.0f;
+}
+
+
+void CDAudio_SysSetVolume (float volume)
+{
+ struct ioc_vol vol;
+
+ if (cdfile == -1)
+ return;
+
+ vol.vol[0] = vol.vol[1] = volume * 255;
+ vol.vol[2] = vol.vol[3] = 0;
+
+ if (ioctl (cdfile, CDIOCSETVOL, &vol) == -1)
+ Con_DPrintf ("ioctl CDIOCSETVOL failed\n");
+}
+
+
int CDAudio_SysPlay (qbyte track)
{
struct ioc_read_toc_entry rte;
{
int i;
+// COMMANDLINEOPTION: BSD Sound: -cddev <devicepath> chooses which CD drive to use
if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1)
strlcpy(cd_dev, com_argv[i + 1], sizeof(cd_dev));
}