DP_QC_GETTIME_CDTRACK: extension to query the playing time of the current cd track.
[xonotic/darkplaces.git] / cd_shared.c
index c57be33..8a47f7b 100644 (file)
@@ -281,6 +281,13 @@ void CDAudio_Play (int track, qboolean looping)
        CDAudio_Play_byName(buf, looping);
 }
 
+float CDAudio_GetPosition ()
+{
+       if(faketrack != -1)
+               return S_GetChannelPosition(faketrack);
+       return -1;
+}
+
 void CDAudio_Stop (void)
 {
        if (!enabled)