mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- moved the CD Audio code to ZMusic, too.
This was the last player class. This code was also cleaned up for non-Windows systems where CD Audio is not implemented. Instead of providing an empty implementation, all related code is now explicitly deactivated. # Conflicts: # src/CMakeLists.txt
This commit is contained in:
parent
01de5a071b
commit
d7db010217
11 changed files with 33 additions and 182 deletions
|
@ -41,8 +41,11 @@ endif()
|
|||
include_directories( "../libraries/dumb/include" "${ADL_INCLUDE_DIR}" "${OPN_INCLUDE_DIR}" "${TIMIDITYPP_INCLUDE_DIR}" "${TIMIDITY_INCLUDE_DIR}" "${WILDMIDI_INCLUDE_DIR}" "${OPLSYNTH_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
|
||||
if (WIN32)
|
||||
set( PLAT_WIN32_SOURCES
|
||||
mididevices/music_win_mididevice.cpp)
|
||||
set( PLAT_SOURCES
|
||||
mididevices/music_win_mididevice.cpp
|
||||
musicformats/win32/i_cd.cpp
|
||||
musicformats/win32/helperthread.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
file( GLOB HEADER_FILES
|
||||
|
@ -79,11 +82,12 @@ add_library( zmusic STATIC
|
|||
streamsources/music_xa.cpp
|
||||
musicformats/music_stream.cpp
|
||||
musicformats/music_midi.cpp
|
||||
musicformats/music_cd.cpp
|
||||
decoder/sounddecoder.cpp
|
||||
decoder/sndfile_decoder.cpp
|
||||
decoder/mpg123_decoder.cpp
|
||||
zmusic/configuration.cpp
|
||||
${PLAT_WIN32_SOURCES}
|
||||
${PLAT_SOURCES}
|
||||
)
|
||||
target_link_libraries( zmusic )
|
||||
|
||||
|
@ -91,6 +95,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("Music Formats\\Win32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/musicformats/win32/.+")
|
||||
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/.+")
|
||||
|
|
|
@ -31,8 +31,11 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "zmusic/musinfo.h"
|
||||
#include "zmusic/zmusic.h"
|
||||
#include "zmusic/musinfo.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "zmusic/m_swap.h"
|
||||
#include "i_cd.h"
|
||||
|
||||
|
@ -189,4 +192,19 @@ MusInfo* CD_OpenSong(int track, int id)
|
|||
MusInfo* CDDA_OpenSong(MusicIO::FileInterface* reader)
|
||||
{
|
||||
return new CDDAFile(reader);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
MusInfo* CD_OpenSong(int track, int id)
|
||||
{
|
||||
throw std::runtime_error("CD Audio playback not supported");
|
||||
}
|
||||
|
||||
MusInfo* CDDA_OpenSong(MusicIO::FileInterface* reader)
|
||||
{
|
||||
throw std::runtime_error("CD Audio playback not supported");
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** Implements FHelperThread, the base class for helper threads. Includes
|
||||
** a message queue for passing messages from the main thread to the
|
||||
** helper thread.
|
||||
** helper thread. (Only used by the CD Audio player)
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 1998-2006 Randy Heit
|
|
@ -512,8 +512,6 @@ set( PLAT_WIN32_SOURCES
|
|||
win32/fb_d3d9_wipe.cpp
|
||||
win32/fb_ddraw.cpp
|
||||
win32/hardware.cpp
|
||||
win32/helperthread.cpp
|
||||
win32/i_cd.cpp
|
||||
win32/i_crash.cpp
|
||||
win32/i_input.cpp
|
||||
win32/i_keyboard.cpp
|
||||
|
@ -528,7 +526,6 @@ set( PLAT_WIN32_SOURCES
|
|||
win32/win32gliface.cpp
|
||||
win32/win32video.cpp )
|
||||
set( PLAT_POSIX_SOURCES
|
||||
posix/i_cd.cpp
|
||||
posix/i_steam.cpp )
|
||||
set( PLAT_SDL_SOURCES
|
||||
posix/sdl/crashcatcher.c
|
||||
|
@ -1157,7 +1154,6 @@ set (PCH_SOURCES
|
|||
sound/music/i_soundfont.cpp
|
||||
sound/backend/i_sound.cpp
|
||||
sound/music/music_config.cpp
|
||||
sound/musicformats/music_cd.cpp
|
||||
events.cpp
|
||||
atterm.cpp
|
||||
GuillotineBinPack.cpp
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
#include "i_cd.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Init
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_Init ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CD_Init (int device)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_InitID
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_InitID (unsigned int id, int guess)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Close
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Close ()
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Eject
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Eject ()
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_UnEject
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_UnEject ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Stop
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Stop ()
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Play
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_Play (int track, bool looping)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_PlayNoWait
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_PlayNoWait (int track, bool looping)
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_PlayCD
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_PlayCD (bool looping)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_PlayCDNoWait
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_PlayCDNoWait (bool looping)
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Pause
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Pause ()
|
||||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_Resume
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_Resume ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_GetMode
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
ECDModes CD_GetMode ()
|
||||
{
|
||||
return CDMode_Unknown;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// CD_CheckTrack
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_CheckTrack (int track)
|
||||
{
|
||||
return false;
|
||||
}
|
|
@ -57,12 +57,13 @@
|
|||
#include <stdlib.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include "musicformats/win32/i_cd.h"
|
||||
#endif
|
||||
|
||||
#include "i_system.h"
|
||||
#include "i_sound.h"
|
||||
#include "i_music.h"
|
||||
#include "i_cd.h"
|
||||
|
||||
#include "s_sound.h"
|
||||
#include "s_sndseq.h"
|
||||
#include "s_playlist.h"
|
||||
|
@ -827,6 +828,7 @@ CCMD (cd_play)
|
|||
S_ChangeMusic (musname, 0, true);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD cd_stop
|
||||
|
@ -881,7 +883,7 @@ CCMD (cd_resume)
|
|||
{
|
||||
CD_Resume ();
|
||||
}
|
||||
|
||||
#endif
|
||||
//==========================================================================
|
||||
//
|
||||
// CCMD playlist
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include "i_system.h"
|
||||
#include "i_sound.h"
|
||||
#include "i_music.h"
|
||||
#include "i_cd.h"
|
||||
#include "s_sound.h"
|
||||
#include "s_sndseq.h"
|
||||
#include "s_playlist.h"
|
||||
|
|
|
@ -42,38 +42,23 @@
|
|||
#include "gstrings.h"
|
||||
#include "doomstat.h"
|
||||
#include "d_player.h"
|
||||
#include "configfile.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "c_console.h"
|
||||
#include "d_gui.h"
|
||||
#include "d_dehacked.h"
|
||||
#include "d_net.h"
|
||||
#include "g_game.h"
|
||||
#include "m_png.h"
|
||||
#include "m_misc.h"
|
||||
#include "doomerrors.h"
|
||||
#include "w_wad.h"
|
||||
#include "hu_stuff.h"
|
||||
#include "p_local.h"
|
||||
#include "m_png.h"
|
||||
#include "p_setup.h"
|
||||
#include "s_sound.h"
|
||||
#include "wi_stuff.h"
|
||||
#include "sc_man.h"
|
||||
#include "cmdlib.h"
|
||||
#include "p_terrain.h"
|
||||
#include "decallib.h"
|
||||
#include "autosegs.h"
|
||||
#include "i_cd.h"
|
||||
#include "stats.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "v_text.h"
|
||||
#include "r_sky.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "m_crc32.h"
|
||||
#include "serializer.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "files.h"
|
||||
|
||||
CVAR(Int, savestatistics, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(String, statfile, "zdoomstat.txt", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
|
Loading…
Reference in a new issue