mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- moved the main music classes to ZMusic
What's left is the CD-Audio playback and some global functions.
This commit is contained in:
parent
6bfa1bf692
commit
352365189f
5 changed files with 15 additions and 16 deletions
|
@ -49,6 +49,7 @@ file( GLOB HEADER_FILES
|
|||
zmusic/*.h
|
||||
mididevices/*.h
|
||||
midisources/*.h
|
||||
musicformats/*.h
|
||||
decoder/*.h
|
||||
streamsources/*.h
|
||||
thirdparty/*.h
|
||||
|
@ -76,6 +77,8 @@ add_library( zmusic STATIC
|
|||
streamsources/music_libsndfile.cpp
|
||||
streamsources/music_opl.cpp
|
||||
streamsources/music_xa.cpp
|
||||
musicformats/music_stream.cpp
|
||||
musicformats/music_midi.cpp
|
||||
decoder/sounddecoder.cpp
|
||||
decoder/sndfile_decoder.cpp
|
||||
decoder/mpg123_decoder.cpp
|
||||
|
@ -87,6 +90,7 @@ target_link_libraries( zmusic )
|
|||
|
||||
source_group("MIDI Devices" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/mididevices/.+")
|
||||
source_group("MIDI Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/midisources/.+")
|
||||
source_group("Music Formats" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/musicformats/.+")
|
||||
source_group("Public Interface" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/zmusic/.+")
|
||||
source_group("Sound Decoding" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/decoder/.+")
|
||||
source_group("Stream Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/streamsources/.+")
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include "zmusic/midiconfig.h"
|
||||
#include "zmusic/mididefs.h"
|
||||
|
||||
#include "mididevices/mididevice.h"
|
||||
|
||||
void TimidityPP_Shutdown();
|
||||
typedef void(*MidiCallback)(void *);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
// HEADER FILES ------------------------------------------------------------
|
||||
|
||||
|
||||
#include <string>
|
||||
#include "zmusic/musinfo.h"
|
||||
#include "mididevices/mididevice.h"
|
||||
#include "midisources/midisource.h"
|
||||
|
@ -125,7 +125,7 @@ protected:
|
|||
EMidiDevice DeviceType;
|
||||
bool CallbackIsThreaded;
|
||||
int LoopLimit;
|
||||
FString Args;
|
||||
std::string Args;
|
||||
std::unique_ptr<MIDISource> source;
|
||||
};
|
||||
|
||||
|
@ -255,15 +255,15 @@ MIDIDevice *MIDIStreamer::CreateMIDIDevice(EMidiDevice devtype, int samplerate)
|
|||
switch (devtype)
|
||||
{
|
||||
case MDEV_GUS:
|
||||
dev = CreateTimidityMIDIDevice(Args, samplerate);
|
||||
dev = CreateTimidityMIDIDevice(Args.c_str(), samplerate);
|
||||
break;
|
||||
|
||||
case MDEV_ADL:
|
||||
dev = CreateADLMIDIDevice(Args);
|
||||
dev = CreateADLMIDIDevice(Args.c_str());
|
||||
break;
|
||||
|
||||
case MDEV_OPN:
|
||||
dev = CreateOPNMIDIDevice(Args);
|
||||
dev = CreateOPNMIDIDevice(Args.c_str());
|
||||
break;
|
||||
|
||||
case MDEV_MMAPI:
|
||||
|
@ -275,19 +275,19 @@ MIDIDevice *MIDIStreamer::CreateMIDIDevice(EMidiDevice devtype, int samplerate)
|
|||
// Intentional fall-through for non-Windows systems.
|
||||
|
||||
case MDEV_FLUIDSYNTH:
|
||||
dev = CreateFluidSynthMIDIDevice(samplerate, Args);
|
||||
dev = CreateFluidSynthMIDIDevice(samplerate, Args.c_str());
|
||||
break;
|
||||
|
||||
case MDEV_OPL:
|
||||
dev = CreateOplMIDIDevice(Args);
|
||||
dev = CreateOplMIDIDevice(Args.c_str());
|
||||
break;
|
||||
|
||||
case MDEV_TIMIDITY:
|
||||
dev = CreateTimidityPPMIDIDevice(Args, samplerate);
|
||||
dev = CreateTimidityPPMIDIDevice(Args.c_str(), samplerate);
|
||||
break;
|
||||
|
||||
case MDEV_WILDMIDI:
|
||||
dev = CreateWildMIDIDevice(Args, samplerate);
|
||||
dev = CreateWildMIDIDevice(Args.c_str(), samplerate);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -783,8 +783,7 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, uint32_t max_time)
|
|||
|
||||
int i;
|
||||
uint32_t *events = Events[buffer_num], *max_event_p;
|
||||
uint32_t tot_time = 0;
|
||||
uint32_t time = 0;
|
||||
|
||||
|
||||
// The final event is for a NOP to hold the delay from the last event.
|
||||
max_event_p = events + (max_events - 1) * 3;
|
|
@ -1161,8 +1161,6 @@ set (PCH_SOURCES
|
|||
sound/backend/i_sound.cpp
|
||||
sound/music/music_config.cpp
|
||||
sound/musicformats/music_cd.cpp
|
||||
sound/musicformats/music_midistream.cpp
|
||||
sound/musicformats/music_stream.cpp
|
||||
rendering/swrenderer/textures/r_swtexture.cpp
|
||||
rendering/swrenderer/textures/warptexture.cpp
|
||||
rendering/swrenderer/textures/swcanvastexture.cpp
|
||||
|
|
Loading…
Reference in a new issue