X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cd_linux.c;h=eb8ef45f0abf11570930783c31625b0f78feaf12;hb=49103816aa305086338c024347d7b461c4d3de06;hp=bdfea6068879c8c2956f0ca3297ed26c8c15cbde;hpb=b47b74389ee3f609d12f738f6038842fbd0d409a;p=xonotic%2Fdarkplaces.git diff --git a/cd_linux.c b/cd_linux.c index bdfea606..eb8ef45f 100644 --- a/cd_linux.c +++ b/cd_linux.c @@ -38,15 +38,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // used by menu to ghost CD audio slider qboolean cdaudioinitialized = false; static qboolean cdValid = false; -static qboolean playing = false; -static qboolean wasPlaying = false; -static qboolean initialized = false; -static qboolean enabled = true; +static qboolean playing = false; +static qboolean wasPlaying = false; +static qboolean initialized = false; +static qboolean enabled = true; static qboolean playLooping = false; -static float cdvolume; -static byte remap[100]; -static byte playTrack; -static byte maxTrack; +static float cdvolume; +static qbyte remap[100]; +static qbyte playTrack; +static qbyte maxTrack; static int cdfile = -1; static char cd_dev[64] = "/dev/cdrom"; @@ -95,7 +95,7 @@ static int CDAudio_GetAudioDiskInfo(void) } -void CDAudio_Play(byte track, qboolean looping) +void CDAudio_Play(qbyte track, qboolean looping) { struct cdrom_tocentry entry; struct cdrom_ti ti; @@ -211,9 +211,9 @@ void CDAudio_Resume(void) static void CD_f (void) { - char *command; - int ret; - int n; + const char *command; + int ret; + int n; if (Cmd_Argc() < 2) return; @@ -278,13 +278,13 @@ static void CD_f (void) if (Q_strcasecmp(command, "play") == 0) { - CDAudio_Play((byte)atoi(Cmd_Argv (2)), false); + CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), false); return; } if (Q_strcasecmp(command, "loop") == 0) { - CDAudio_Play((byte)atoi(Cmd_Argv (2)), true); + CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), true); return; } @@ -375,7 +375,7 @@ int CDAudio_Init(void) if (cls.state == ca_dedicated) return -1; - if (COM_CheckParm("-nocdaudio")) + if (COM_CheckParm("-nocdaudio") || COM_CheckParm("-safe")) return -1; if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) { @@ -417,3 +417,11 @@ void CDAudio_Shutdown(void) close(cdfile); cdfile = -1; } + +void CDAudio_Open(void) +{ +} + +void CDAudio_Close(void) +{ +}