X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=cd_bsd.c;h=a514fc0bf23983a028b1fba6337b1e74307f96cd;hp=4ee469c5c044d545f397958c11aa82c6d437b27a;hb=71de4dd795b4049a7b77a20186820a86a776319d;hpb=8e579bbf57c9235bc3c11838e5a68bc52be3e9df diff --git a/cd_bsd.c b/cd_bsd.c index 4ee469c5..a514fc0b 100644 --- a/cd_bsd.c +++ b/cd_bsd.c @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #include "quakedef.h" +#include "cdaudio.h" #ifndef __FreeBSD__ @@ -51,7 +52,7 @@ void CDAudio_SysEject (void) ioctl(cdfile, CDIOCALLOW); if (ioctl(cdfile, CDIOCEJECT) == -1) - Con_DPrint("ioctl CDIOCEJECT failed\n"); + Con_Print("ioctl CDIOCEJECT failed\n"); } @@ -62,7 +63,7 @@ void CDAudio_SysCloseDoor (void) ioctl(cdfile, CDIOCALLOW); if (ioctl(cdfile, CDIOCCLOSE) == -1) - Con_DPrint("ioctl CDIOCCLOSE failed\n"); + Con_Print("ioctl CDIOCCLOSE failed\n"); } int CDAudio_SysGetAudioDiskInfo (void) @@ -74,13 +75,13 @@ int CDAudio_SysGetAudioDiskInfo (void) if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1) { - Con_DPrint("ioctl CDIOREADTOCHEADER failed\n"); + Con_Print("ioctl CDIOREADTOCHEADER failed\n"); return -1; } if (tochdr.starting_track < 1) { - Con_DPrint("CDAudio: no music tracks\n"); + Con_Print("CDAudio: no music tracks\n"); return -1; } @@ -97,7 +98,7 @@ float CDAudio_SysGetVolume (void) if (ioctl (cdfile, CDIOCGETVOL, &vol) == -1) { - Con_DPrint("ioctl CDIOCGETVOL failed\n"); + Con_Print("ioctl CDIOCGETVOL failed\n"); return -1.0f; } @@ -116,11 +117,11 @@ void CDAudio_SysSetVolume (float volume) vol.vol[2] = vol.vol[3] = 0; if (ioctl (cdfile, CDIOCSETVOL, &vol) == -1) - Con_DPrintf ("ioctl CDIOCSETVOL failed\n"); + Con_Printf ("ioctl CDIOCSETVOL failed\n"); } -int CDAudio_SysPlay (qbyte track) +int CDAudio_SysPlay (unsigned char track) { struct ioc_read_toc_entry rte; struct cd_toc_entry entry; @@ -136,7 +137,7 @@ int CDAudio_SysPlay (qbyte track) rte.data = &entry; if (ioctl(cdfile, CDIOREADTOCENTRYS, &rte) == -1) { - Con_DPrint("ioctl CDIOREADTOCENTRYS failed\n"); + Con_Print("ioctl CDIOREADTOCENTRYS failed\n"); return -1; } if (entry.control & 4) // if it's a data track @@ -155,13 +156,13 @@ int CDAudio_SysPlay (qbyte track) if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1) { - Con_DPrint("ioctl CDIOCPLAYTRACKS failed\n"); + Con_Print("ioctl CDIOCPLAYTRACKS failed\n"); return -1; } if (ioctl(cdfile, CDIOCRESUME) == -1) { - Con_DPrint("ioctl CDIOCRESUME failed\n"); + Con_Print("ioctl CDIOCRESUME failed\n"); return -1; } @@ -176,7 +177,7 @@ int CDAudio_SysStop (void) if (ioctl(cdfile, CDIOCSTOP) == -1) { - Con_DPrintf("ioctl CDIOCSTOP failed (%d)\n", errno); + Con_Printf("ioctl CDIOCSTOP failed (%d)\n", errno); return -1; } ioctl(cdfile, CDIOCALLOW); @@ -191,7 +192,7 @@ int CDAudio_SysPause (void) if (ioctl(cdfile, CDIOCPAUSE) == -1) { - Con_DPrint("ioctl CDIOCPAUSE failed\n"); + Con_Print("ioctl CDIOCPAUSE failed\n"); return -1; } @@ -205,7 +206,7 @@ int CDAudio_SysResume (void) return -1; if (ioctl(cdfile, CDIOCRESUME) == -1) - Con_DPrint("ioctl CDIOCRESUME failed\n"); + Con_Print("ioctl CDIOCRESUME failed\n"); return 0; } @@ -228,7 +229,7 @@ int CDAudio_SysUpdate (void) if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1) { - Con_DPrint("ioctl CDIOCREADSUBCHANNEL failed\n"); + Con_Print("ioctl CDIOCREADSUBCHANNEL failed\n"); cdPlaying = false; return -1; } @@ -265,7 +266,7 @@ int CDAudio_SysStartup (void) if ((cdfile = open(cd_dev, O_RDONLY)) < 0) #endif { - Con_DPrintf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n", + Con_Printf("CDAudio_SysStartup: open of \"%s\" failed (%i)\n", cd_dev, errno); cdfile = -1; return -1;