Whitespace. *grmbl*

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-05-20 20:52:27 +00:00
parent 337430a113
commit a140bd1d13
6 changed files with 40 additions and 18 deletions

View file

@ -1,7 +1,7 @@
/*
cd_audio.c
cd_dos.c
(description)
support for cd music in dos.
Copyright (C) 1996-1997 Id Software, Inc.

View file

@ -42,7 +42,6 @@
# include <sys/ioctl.h>
#endif
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
@ -70,6 +69,7 @@ static byte maxTrack;
static int cdfile = -1;
cvar_t *mus_cddevice;
static void
CDAudio_Eject (void)
{
@ -91,6 +91,7 @@ CDAudio_CloseDoor (void)
Con_DPrintf ("CDAudio: ioctl cdromclosetray failed\n");
}
static int
CDAudio_GetAudioDiskInfo (void)
{
@ -183,8 +184,8 @@ CDAudio_Play (byte track, qboolean looping)
strerror (errno));
return;
}
// if ( ioctl(cdfile, CDROMRESUME) == -1 )
// Con_DPrintf("CDAudio: ioctl cdromresume failed\n");
// if ( ioctl(cdfile, CDROMRESUME) == -1 )
// Con_DPrintf("CDAudio: ioctl cdromresume failed\n");
playLooping = looping;
playTrack = track;
@ -211,6 +212,7 @@ CDAudio_Stop (void)
playing = false;
}
void
CDAudio_Pause (void)
{
@ -245,6 +247,7 @@ CDAudio_Resume (void)
playing = true;
}
static void
CD_f (void)
{
@ -351,6 +354,7 @@ CD_f (void)
}
}
void
CDAudio_Update (void)
{
@ -389,6 +393,7 @@ CDAudio_Update (void)
}
}
void
Mus_CDChange (cvar_t *mus_cdaudio)
{
@ -420,6 +425,7 @@ Mus_CDChange (cvar_t *mus_cdaudio)
mus_enabled = true;
}
int
CDAudio_Init (void)
{
@ -462,4 +468,3 @@ CDAudio_Shutdown (void)
}
mus_enabled = false;
}

View file

@ -1,7 +1,7 @@
/*
cd_null.c
(description)
support for no cd audio
Copyright (C) 1996-1997 Id Software, Inc.
@ -32,6 +32,7 @@
#include "QF/cdaudio.h"
void
CDAudio_Play (byte track, qboolean looping)
{

View file

@ -25,6 +25,7 @@
$Id$
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@ -52,11 +53,12 @@ static qboolean initialized = false;
static qboolean enabled = true;
static qboolean playLooping = false;
static SDL_CD *cd_id;
static SDL_CD *cd_id;
static float cdvolume = 1.0;
static void CD_f (void);
static void
CDAudio_Eject (void)
{
@ -103,10 +105,11 @@ CDAudio_Play (byte track, qboolean looping)
playLooping = looping;
}
void
CDAudio_Stop (void)
{
int cdstate;
int cdstate;
if (!cd_id || !enabled)
return;
@ -118,6 +121,7 @@ CDAudio_Stop (void)
Con_DPrintf ("CDAudio_Stop: Failed to stop track.\n");
}
void
CDAudio_Pause (void)
{
@ -164,6 +168,7 @@ CDAudio_Update (void)
CDAudio_Play (cd_id->cur_track + 1, true);
}
int
CDAudio_Init (void)
{
@ -230,11 +235,12 @@ CDAudio_Shutdown (void)
#define CD_f_DEFINED
static void
CD_f (void)
{
char *command;
int cdstate;
int cdstate;
if (Cmd_Argc () < 2)
return;

View file

@ -51,6 +51,7 @@ static char cd_dev[64] = "/dev/cdrom";
static CDPLAYER *cdp = NULL;
static void
CDAudio_Eject (void)
{
@ -61,10 +62,11 @@ CDAudio_Eject (void)
Con_DPrintf ("CDAudio_Eject: CDeject failed\n");
}
static int
CDAudio_GetState (void)
{
CDSTATUS cds;
CDSTATUS cds;
if (cdp == NULL || !enabled)
return -1; // no cd init'd
@ -77,10 +79,11 @@ CDAudio_GetState (void)
return cds.state;
}
static int
CDAudio_MaxTrack (void)
{
CDSTATUS cds;
CDSTATUS cds;
if (cdp == NULL || !enabled)
return -1; // no cd init'd
@ -93,10 +96,11 @@ CDAudio_MaxTrack (void)
return cds.last;
}
void
CDAudio_Play (byte track, qboolean looping)
{
int maxtrack = CDAudio_MaxTrack ();
int maxtrack = CDAudio_MaxTrack ();
if (!initialized || !enabled)
return;
@ -119,7 +123,7 @@ CDAudio_Play (byte track, qboolean looping)
return;
}
// don't try to play a non-audio track
/* mw: how to do this on irix? entry0.cdte_track = track;
/* mw: how to do this on irix? entry0.cdte_track = track;
entry0.cdte_format = CDROM_MSF; if ( ioctl(cdfile, CDROMREADTOCENTRY,
&entry0) == -1 ) { Con_DPrintf("CDAudio: ioctl cdromreadtocentry
failed\n"); return; }
@ -131,7 +135,8 @@ CDAudio_Play (byte track, qboolean looping)
Con_DPrintf("CDAudio: ioctl cdromreadtocentry failed\n"); return; }
if (entry0.cdte_ctrl == CDROM_DATA_TRACK) { Con_Printf("track %i is
not audio\n", track); return; } */
not audio\n", track); return; }
*/
if (CDAudio_GetState () == CD_PLAYING) {
if (playTrack == track)
@ -149,6 +154,7 @@ CDAudio_Play (byte track, qboolean looping)
playTrack = track;
}
void
CDAudio_Stop (void)
{
@ -159,6 +165,7 @@ CDAudio_Stop (void)
Con_DPrintf ("CDAudio_Stop: CDStop failed (%d)\n", errno);
}
void
CDAudio_Pause (void)
{
@ -169,6 +176,7 @@ CDAudio_Pause (void)
Con_DPrintf ("CDAudio_PAUSE: CDtogglepause failed (%d)\n", errno);
}
void
CDAudio_Resume (void)
{
@ -179,6 +187,7 @@ CDAudio_Resume (void)
Con_DPrintf ("CDAudio_Resume: CDtogglepause failed (%d)\n", errno);
}
static void
CD_f (void)
{
@ -273,6 +282,7 @@ CD_f (void)
}
}
void
CDAudio_Update (void)
{
@ -296,6 +306,7 @@ CDAudio_Update (void)
CDAudio_Play (playTrack, true);
}
int
CDAudio_Init (void)
{
@ -342,6 +353,7 @@ CDAudio_Init (void)
return 0;
}
void
CDAudio_Shutdown (void)
{
@ -353,5 +365,3 @@ CDAudio_Shutdown (void)
cdp = NULL;
initialized = false;
}
/* end of file */

View file

@ -1,7 +1,7 @@
/*
cd_win.c
(description)
support for cd in windows
Copyright (C) 1996-1997 Id Software, Inc.