mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +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.
This commit is contained in:
parent
352365189f
commit
d0cf21654e
10 changed files with 33 additions and 167 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}" )
|
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)
|
if (WIN32)
|
||||||
set( PLAT_WIN32_SOURCES
|
set( PLAT_SOURCES
|
||||||
mididevices/music_win_mididevice.cpp)
|
mididevices/music_win_mididevice.cpp
|
||||||
|
musicformats/win32/i_cd.cpp
|
||||||
|
musicformats/win32/helperthread.cpp
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file( GLOB HEADER_FILES
|
file( GLOB HEADER_FILES
|
||||||
|
@ -79,11 +82,12 @@ add_library( zmusic STATIC
|
||||||
streamsources/music_xa.cpp
|
streamsources/music_xa.cpp
|
||||||
musicformats/music_stream.cpp
|
musicformats/music_stream.cpp
|
||||||
musicformats/music_midi.cpp
|
musicformats/music_midi.cpp
|
||||||
|
musicformats/music_cd.cpp
|
||||||
decoder/sounddecoder.cpp
|
decoder/sounddecoder.cpp
|
||||||
decoder/sndfile_decoder.cpp
|
decoder/sndfile_decoder.cpp
|
||||||
decoder/mpg123_decoder.cpp
|
decoder/mpg123_decoder.cpp
|
||||||
zmusic/configuration.cpp
|
zmusic/configuration.cpp
|
||||||
${PLAT_WIN32_SOURCES}
|
${PLAT_SOURCES}
|
||||||
)
|
)
|
||||||
target_link_libraries( zmusic )
|
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 Devices" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/mididevices/.+")
|
||||||
source_group("MIDI Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/midisources/.+")
|
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" 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("Public Interface" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/zmusic/.+")
|
||||||
source_group("Sound Decoding" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/decoder/.+")
|
source_group("Sound Decoding" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/decoder/.+")
|
||||||
source_group("Stream Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/streamsources/.+")
|
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/zmusic.h"
|
||||||
|
#include "zmusic/musinfo.h"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include "zmusic/m_swap.h"
|
#include "zmusic/m_swap.h"
|
||||||
#include "i_cd.h"
|
#include "i_cd.h"
|
||||||
|
|
||||||
|
@ -190,3 +193,18 @@ MusInfo* CDDA_OpenSong(MusicIO::FileInterface* reader)
|
||||||
{
|
{
|
||||||
return new CDDAFile(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
|
** Implements FHelperThread, the base class for helper threads. Includes
|
||||||
** a message queue for passing messages from the main thread to the
|
** 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
|
** Copyright 1998-2006 Randy Heit
|
|
@ -489,8 +489,6 @@ endif()
|
||||||
# Start defining source files for ZDoom
|
# Start defining source files for ZDoom
|
||||||
set( PLAT_WIN32_SOURCES
|
set( PLAT_WIN32_SOURCES
|
||||||
win32/hardware.cpp
|
win32/hardware.cpp
|
||||||
win32/helperthread.cpp
|
|
||||||
win32/i_cd.cpp
|
|
||||||
win32/i_crash.cpp
|
win32/i_crash.cpp
|
||||||
win32/i_input.cpp
|
win32/i_input.cpp
|
||||||
win32/i_keyboard.cpp
|
win32/i_keyboard.cpp
|
||||||
|
@ -512,7 +510,6 @@ if (HAVE_VULKAN)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( PLAT_POSIX_SOURCES
|
set( PLAT_POSIX_SOURCES
|
||||||
posix/i_cd.cpp
|
|
||||||
posix/i_steam.cpp )
|
posix/i_steam.cpp )
|
||||||
set( PLAT_SDL_SOURCES
|
set( PLAT_SDL_SOURCES
|
||||||
posix/sdl/crashcatcher.c
|
posix/sdl/crashcatcher.c
|
||||||
|
@ -1160,7 +1157,6 @@ set (PCH_SOURCES
|
||||||
sound/music/i_soundfont.cpp
|
sound/music/i_soundfont.cpp
|
||||||
sound/backend/i_sound.cpp
|
sound/backend/i_sound.cpp
|
||||||
sound/music/music_config.cpp
|
sound/music/music_config.cpp
|
||||||
sound/musicformats/music_cd.cpp
|
|
||||||
rendering/swrenderer/textures/r_swtexture.cpp
|
rendering/swrenderer/textures/r_swtexture.cpp
|
||||||
rendering/swrenderer/textures/warptexture.cpp
|
rendering/swrenderer/textures/warptexture.cpp
|
||||||
rendering/swrenderer/textures/swcanvastexture.cpp
|
rendering/swrenderer/textures/swcanvastexture.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>
|
#include <stdlib.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include "musicformats/win32/i_cd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "i_sound.h"
|
#include "i_sound.h"
|
||||||
#include "i_music.h"
|
#include "i_music.h"
|
||||||
#include "i_cd.h"
|
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "s_sndseq.h"
|
#include "s_sndseq.h"
|
||||||
#include "s_playlist.h"
|
#include "s_playlist.h"
|
||||||
|
@ -827,6 +828,7 @@ CCMD (cd_play)
|
||||||
S_ChangeMusic (musname, 0, true);
|
S_ChangeMusic (musname, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// CCMD cd_stop
|
// CCMD cd_stop
|
||||||
|
@ -881,7 +883,7 @@ CCMD (cd_resume)
|
||||||
{
|
{
|
||||||
CD_Resume ();
|
CD_Resume ();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// CCMD playlist
|
// CCMD playlist
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "i_sound.h"
|
#include "i_sound.h"
|
||||||
#include "i_music.h"
|
#include "i_music.h"
|
||||||
#include "i_cd.h"
|
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "s_sndseq.h"
|
#include "s_sndseq.h"
|
||||||
#include "s_playlist.h"
|
#include "s_playlist.h"
|
||||||
|
|
Loading…
Reference in a new issue