]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Make CDAudio_Play_byName static.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Oct 2018 07:02:35 +0000 (07:02 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 19 Oct 2018 07:02:35 +0000 (07:02 +0000)
It isn't called by any other compilation units, but only internally by
other cd_shared.c functions; more importantly, it does not check for
music_playlist being active like CDAudio_Play does, which would at the
very least be confusing if someone were to add a string version of
qw_svc_cdtrack (WHY WOULD ONE).

Thus: no functional change here.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12467 d7cf8633-e32d-0410-b094-e92efae38249

cd_shared.c
cdaudio.h

index eb78eaf1b9b9462a7041439d3102d511affe8de8..e86340654830d4340b26b226cf2901c098cfcb4a 100644 (file)
@@ -116,7 +116,10 @@ static int CDAudio_GetAudioDiskInfo (void)
        return -1;
 }
 
-void CDAudio_Play_byName (const char *trackname, qboolean looping, qboolean tryreal, float startposition)
+// Helper for CDAudio_Play, the "cd" command, and the music_playlist system.
+// Does _not_ act as NOP when a playlist is active, simply because this is used
+// _by_ playlist code. So beware when calling this.
+static void CDAudio_Play_byName (const char *trackname, qboolean looping, qboolean tryreal, float startposition)
 {
        unsigned int track;
        sfx_t* sfx;
index 3fed67fa5132167238aa84ebb5ba05f5ced6a691..1e533834087344443f867ff5c99a21daa25710ee 100644 (file)
--- a/cdaudio.h
+++ b/cdaudio.h
@@ -40,7 +40,6 @@ int CDAudio_Init(void);
 void CDAudio_Open(void);
 void CDAudio_Close(void);
 void CDAudio_Play(int track, qboolean looping);
-void CDAudio_Play_byName (const char *trackname, qboolean looping, qboolean tryreal, float startposition);
 void CDAudio_Stop(void);
 void CDAudio_Pause(void);
 void CDAudio_Resume(void);