mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- removed CD audio support.
Mainly because this is an ancient deprecated feature on the system side that serves no good purpose anymore.
This commit is contained in:
parent
78bae1f166
commit
5391382807
5 changed files with 13 additions and 165 deletions
|
@ -2226,7 +2226,6 @@ int IsPointInMap(FLevelLocals *Level, double x, double y, double z)
|
|||
|
||||
void FLevelLocals::SetMusic()
|
||||
{
|
||||
if (cdtrack == 0 || !S_ChangeCDMusic(cdtrack, cdid))
|
||||
S_ChangeMusic(Music, musicorder);
|
||||
S_ChangeMusic(Music, musicorder);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,17 +129,14 @@ void DrawFullscreenSubtitle(const char *text)
|
|||
|
||||
void DIntermissionScreen::Init(FIntermissionAction *desc, bool first)
|
||||
{
|
||||
if (desc->mCdTrack == 0 || !S_ChangeCDMusic (desc->mCdTrack, desc->mCdId))
|
||||
if (desc->mMusic.IsEmpty())
|
||||
{
|
||||
if (desc->mMusic.IsEmpty())
|
||||
{
|
||||
// only start the default music if this is the first action in an intermission
|
||||
if (first) S_ChangeMusic (gameinfo.finaleMusic, gameinfo.finaleOrder, desc->mMusicLooping);
|
||||
}
|
||||
else
|
||||
{
|
||||
S_ChangeMusic (desc->mMusic, desc->mMusicOrder, desc->mMusicLooping);
|
||||
}
|
||||
// only start the default music if this is the first action in an intermission
|
||||
if (first) S_ChangeMusic (gameinfo.finaleMusic, gameinfo.finaleOrder, desc->mMusicLooping);
|
||||
}
|
||||
else
|
||||
{
|
||||
S_ChangeMusic (desc->mMusic, desc->mMusicOrder, desc->mMusicLooping);
|
||||
}
|
||||
mDuration = desc->mDuration;
|
||||
|
||||
|
|
|
@ -66,42 +66,6 @@ static bool ungzip(uint8_t *data, int size, std::vector<uint8_t> &newdata);
|
|||
|
||||
int nomusic = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CVAR: cd_drive
|
||||
//
|
||||
// Which drive (letter) to use for CD audio. If not a valid drive letter,
|
||||
// let the operating system decide for us.
|
||||
//
|
||||
//==========================================================================
|
||||
EXTERN_CVAR(Bool, cd_enabled);
|
||||
|
||||
CUSTOM_CVAR(String, cd_drive, "", CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (cd_enabled && !Args->CheckParm("-nocdaudio")) CD_Enable(self);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CVAR: cd_enabled
|
||||
//
|
||||
// Use the CD device? Can be overridden with -nocdaudio on the command line
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CUSTOM_CVAR(Bool, cd_enabled, true, CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self && !Args->CheckParm("-nocdaudio"))
|
||||
CD_Enable(cd_drive);
|
||||
else
|
||||
CD_Enable(nullptr);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CVAR snd_musicvolume
|
||||
|
|
|
@ -308,28 +308,6 @@ void S_ActivatePlayList (bool goBack)
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// S_ChangeCDMusic
|
||||
//
|
||||
// Starts a CD track as music.
|
||||
//==========================================================================
|
||||
|
||||
bool S_ChangeCDMusic (int track, unsigned int id, bool looping)
|
||||
{
|
||||
char temp[32];
|
||||
|
||||
if (id != 0)
|
||||
{
|
||||
mysnprintf (temp, countof(temp), ",CD,%d,%x", track, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
mysnprintf (temp, countof(temp), ",CD,%d", track);
|
||||
}
|
||||
return S_ChangeMusic (temp, 0, looping);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// S_StartMusic
|
||||
|
@ -434,20 +412,11 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
|
|||
|
||||
if (strnicmp (musicname, ",CD,", 4) == 0)
|
||||
{
|
||||
int track = strtoul (musicname+4, nullptr, 0);
|
||||
const char *more = strchr (musicname+4, ',');
|
||||
unsigned int id = 0;
|
||||
|
||||
if (more != nullptr)
|
||||
{
|
||||
id = strtoul (more+1, nullptr, 16);
|
||||
}
|
||||
S_StopMusic (true);
|
||||
mus_playing.handle = ZMusic_OpenCDSong (track, id);
|
||||
if (mus_playing.handle == nullptr)
|
||||
{
|
||||
Printf("Unable to start CD Audio for track #%d, ID %d\n", track, id);
|
||||
}
|
||||
static bool warned = false;
|
||||
if (!warned)
|
||||
Printf(TEXTCOLOR_RED "CD Audio no longer supported\n");
|
||||
warned = true;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -745,84 +714,6 @@ CCMD (stopmus)
|
|||
mus_playing.LastSong = ""; // forget the last played song so that it won't get restarted if some volume changes occur
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_play
|
||||
//
|
||||
// Plays a specified track, or the entire CD if no track is specified.
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_play)
|
||||
{
|
||||
char musname[16];
|
||||
|
||||
if (argv.argc() == 1)
|
||||
{
|
||||
strcpy (musname, ",CD,");
|
||||
}
|
||||
else
|
||||
{
|
||||
mysnprintf (musname, countof(musname), ",CD,%d", atoi(argv[1]));
|
||||
}
|
||||
S_ChangeMusic (musname, 0, true);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_stop
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_stop)
|
||||
{
|
||||
CD_Stop ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_eject
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_eject)
|
||||
{
|
||||
CD_Eject ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_close
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_close)
|
||||
{
|
||||
CD_UnEject ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_pause
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_pause)
|
||||
{
|
||||
CD_Pause ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_resume
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD (cd_resume)
|
||||
{
|
||||
CD_Resume ();
|
||||
}
|
||||
#endif
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD playlist
|
||||
|
|
|
@ -47,9 +47,6 @@ bool S_StartMusic (const char *music_name);
|
|||
// Start music using <music_name>, and set whether looping
|
||||
bool S_ChangeMusic (const char *music_name, int order=0, bool looping=true, bool force=false);
|
||||
|
||||
// Start playing a cd track as music
|
||||
bool S_ChangeCDMusic (int track, unsigned int id=0, bool looping=true);
|
||||
|
||||
void S_RestartMusic ();
|
||||
void S_MIDIDeviceChanged(int newdev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue