mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
Remove unused URLSong functionality
This isn't supported with the OpenAL backend, and instead of trying to make a workaround for it, a better approach would probably be to make a FileReader implementation that handles URLs.
This commit is contained in:
parent
e78d88094d
commit
78231d5ba1
7 changed files with 2 additions and 47 deletions
|
@ -2596,21 +2596,8 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
|
|||
{
|
||||
if ((lumpnum = Wads.CheckNumForFullName (musicname, true, ns_music)) == -1)
|
||||
{
|
||||
if (strstr(musicname, "://") > musicname)
|
||||
{
|
||||
// Looks like a URL; try it as such.
|
||||
handle = I_RegisterURLSong(musicname);
|
||||
if (handle == NULL)
|
||||
{
|
||||
Printf ("Could not open \"%s\"\n", musicname);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("Music \"%s\" not found\n", musicname);
|
||||
return false;
|
||||
}
|
||||
Printf ("Music \"%s\" not found\n", musicname);
|
||||
return false;
|
||||
}
|
||||
if (handle == NULL)
|
||||
{
|
||||
|
|
|
@ -558,25 +558,6 @@ MusInfo *I_RegisterCDSong (int track, int id)
|
|||
return info;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
MusInfo *I_RegisterURLSong (const char *url)
|
||||
{
|
||||
StreamSong *song;
|
||||
|
||||
song = new StreamSong(url);
|
||||
if (song->IsValid())
|
||||
{
|
||||
return song;
|
||||
}
|
||||
delete song;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// ungzip
|
||||
|
|
|
@ -57,7 +57,6 @@ class MusInfo;
|
|||
struct MidiDeviceSetting;
|
||||
MusInfo *I_RegisterSong (FileReader *reader, MidiDeviceSetting *device);
|
||||
MusInfo *I_RegisterCDSong (int track, int cdid = 0);
|
||||
MusInfo *I_RegisterURLSong (const char *url);
|
||||
|
||||
// The base music class. Everything is derived from this --------------------
|
||||
|
||||
|
|
|
@ -594,7 +594,6 @@ class StreamSong : public MusInfo
|
|||
{
|
||||
public:
|
||||
StreamSong (FileReader *reader);
|
||||
StreamSong (const char *url);
|
||||
~StreamSong ();
|
||||
void Play (bool looping, int subsong);
|
||||
void Pause ();
|
||||
|
|
|
@ -576,11 +576,6 @@ std::pair<SoundHandle,bool> SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int le
|
|||
return retval;
|
||||
}
|
||||
|
||||
SoundStream *SoundRenderer::OpenStream(const char *url, int flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
SoundDecoder *SoundRenderer::CreateDecoder(FileReader *reader)
|
||||
{
|
||||
SoundDecoder *decoder = NULL;
|
||||
|
|
|
@ -108,7 +108,6 @@ public:
|
|||
// Streaming sounds.
|
||||
virtual SoundStream *CreateStream (SoundStreamCallback callback, int buffbytes, int flags, int samplerate, void *userdata) = 0;
|
||||
virtual SoundStream *OpenStream (FileReader *reader, int flags) = 0;
|
||||
virtual SoundStream *OpenStream (const char *url, int flags);
|
||||
|
||||
// Starts a sound.
|
||||
virtual FISoundChannel *StartSound (SoundHandle sfx, float vol, int pitch, int chanflags, FISoundChannel *reuse_chan) = 0;
|
||||
|
|
|
@ -90,11 +90,6 @@ StreamSong::StreamSong (FileReader *reader)
|
|||
m_Stream = GSnd->OpenStream (reader, SoundStream::Loop);
|
||||
}
|
||||
|
||||
StreamSong::StreamSong (const char *url)
|
||||
{
|
||||
m_Stream = GSnd->OpenStream (url, SoundStream::Loop);
|
||||
}
|
||||
|
||||
bool StreamSong::IsPlaying ()
|
||||
{
|
||||
if (m_Status != STATE_Stopped)
|
||||
|
|
Loading…
Reference in a new issue