mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
remove all libmodplug code
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1435 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
e87a1b8d9d
commit
d1f391b383
13 changed files with 6 additions and 205 deletions
|
@ -263,10 +263,6 @@
|
|||
<Unit filename="../../Quake/snd_mix.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="../../Quake/snd_modplug.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="../../Quake/snd_modplug.h" />
|
||||
<Unit filename="../../Quake/snd_mp3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
@ -262,10 +262,6 @@
|
|||
<Unit filename="../../Quake/snd_mix.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="../../Quake/snd_modplug.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="../../Quake/snd_modplug.h" />
|
||||
<Unit filename="../../Quake/snd_mp3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# GNU Makefile for QuakeSpasm unix targets, Sep. 10, 2014
|
||||
# GNU Makefile for QuakeSpasm unix targets.
|
||||
# You need the SDL library fully installed.
|
||||
# "make DEBUG=1" to build a debug client.
|
||||
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
|
||||
|
@ -16,10 +16,9 @@ USE_CODEC_FLAC=0
|
|||
USE_CODEC_MP3=1
|
||||
USE_CODEC_VORBIS=1
|
||||
USE_CODEC_OPUS=0
|
||||
# either mikmod, or xmp (or modplug.)
|
||||
# either mikmod or xmp
|
||||
USE_CODEC_MIKMOD=0
|
||||
USE_CODEC_XMP=0
|
||||
USE_CODEC_MODPLUG=0
|
||||
USE_CODEC_UMX=0
|
||||
|
||||
# which library to use for mp3 decoding: mad or mpg123
|
||||
|
@ -173,10 +172,6 @@ ifeq ($(USE_CODEC_XMP),1)
|
|||
CFLAGS+= -DUSE_CODEC_XMP
|
||||
CODECLIBS+= -lxmp
|
||||
endif
|
||||
ifeq ($(USE_CODEC_MODPLUG),1)
|
||||
CFLAGS+= -DUSE_CODEC_MODPLUG
|
||||
CODECLIBS+= -lmodplug
|
||||
endif
|
||||
ifeq ($(USE_CODEC_UMX),1)
|
||||
CFLAGS+= -DUSE_CODEC_UMX
|
||||
endif
|
||||
|
@ -212,7 +207,6 @@ MUSIC_OBJS:= bgmusic.o \
|
|||
snd_opus.o \
|
||||
$(mp3_obj) \
|
||||
snd_mikmod.o \
|
||||
snd_modplug.o \
|
||||
snd_xmp.o \
|
||||
snd_umx.o
|
||||
COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o $(MUSIC_OBJS)
|
||||
|
|
|
@ -18,10 +18,9 @@ USE_CODEC_FLAC=1
|
|||
USE_CODEC_MP3=1
|
||||
USE_CODEC_VORBIS=1
|
||||
USE_CODEC_OPUS=1
|
||||
# either mikmod, or xmp (or modplug.)
|
||||
# either mikmod or xmp
|
||||
USE_CODEC_MIKMOD=1
|
||||
USE_CODEC_XMP=0
|
||||
USE_CODEC_MODPLUG=0
|
||||
USE_CODEC_UMX=1
|
||||
|
||||
# which library to use for mp3 decoding: mad or mpg123
|
||||
|
@ -194,12 +193,6 @@ CODEC_INC = -I../MacOSX/codecs/include
|
|||
CODEC_LINK= -L../MacOSX/codecs/lib
|
||||
CODECLIBS+= -lxmp
|
||||
endif
|
||||
ifeq ($(USE_CODEC_MODPLUG),1)
|
||||
CFLAGS+= -DUSE_CODEC_MODPLUG
|
||||
CODEC_INC = -I../MacOSX/codecs/include
|
||||
CODEC_LINK= -L../MacOSX/codecs/lib
|
||||
CODECLIBS+= -lmodplug
|
||||
endif
|
||||
ifeq ($(USE_CODEC_UMX),1)
|
||||
CFLAGS+= -DUSE_CODEC_UMX
|
||||
endif
|
||||
|
@ -240,7 +233,6 @@ MUSIC_OBJS:= bgmusic.o \
|
|||
snd_opus.o \
|
||||
$(mp3_obj) \
|
||||
snd_mikmod.o \
|
||||
snd_modplug.o \
|
||||
snd_xmp.o \
|
||||
snd_umx.o
|
||||
COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o $(MUSIC_OBJS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# To cross-compile on Linux hosts, see the build_cross_win32*.sh scripts.
|
||||
# "make DEBUG=1" to build a debug client.
|
||||
# "make SDL_CONFIG=/path/to/sdl-config" to override the locally included SDL versions.
|
||||
# "make WINSOCK2=1" to use WinSock2 api instead of old WinSock 1.1.
|
||||
# "make WINSOCK2=1" to use WinSock2 api instead of the old WinSock 1.1.
|
||||
|
||||
### Enable/disable SDL2
|
||||
USE_SDL2=0
|
||||
|
@ -14,10 +14,9 @@ USE_CODEC_FLAC=1
|
|||
USE_CODEC_MP3=1
|
||||
USE_CODEC_VORBIS=1
|
||||
USE_CODEC_OPUS=1
|
||||
# either mikmod, or xmp (or modplug.)
|
||||
# either mikmod or xmp
|
||||
USE_CODEC_MIKMOD=1
|
||||
USE_CODEC_XMP=0
|
||||
USE_CODEC_MODPLUG=0
|
||||
USE_CODEC_UMX=1
|
||||
|
||||
# which library to use for mp3 decoding: mad or mpg123
|
||||
|
@ -160,12 +159,6 @@ CODEC_INC = -I../Windows/codecs/include
|
|||
CODEC_LINK= -L../Windows/codecs/x86
|
||||
CODECLIBS+= -lxmp
|
||||
endif
|
||||
ifeq ($(USE_CODEC_MODPLUG),1)
|
||||
CFLAGS+= -DUSE_CODEC_MODPLUG
|
||||
CODEC_INC = -I../Windows/codecs/include
|
||||
CODEC_LINK= -L../Windows/codecs/x86
|
||||
CODECLIBS+= -lmodplug
|
||||
endif
|
||||
ifeq ($(USE_CODEC_UMX),1)
|
||||
CFLAGS+= -DUSE_CODEC_UMX
|
||||
endif
|
||||
|
@ -204,7 +197,6 @@ MUSIC_OBJS:= bgmusic.o \
|
|||
snd_opus.o \
|
||||
$(mp3_obj) \
|
||||
snd_mikmod.o \
|
||||
snd_modplug.o \
|
||||
snd_xmp.o \
|
||||
snd_umx.o
|
||||
COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o $(MUSIC_OBJS)
|
||||
|
|
|
@ -14,10 +14,9 @@ USE_CODEC_FLAC=1
|
|||
USE_CODEC_MP3=1
|
||||
USE_CODEC_VORBIS=1
|
||||
USE_CODEC_OPUS=1
|
||||
# either mikmod, or xmp (or modplug.)
|
||||
# either mikmod or xmp
|
||||
USE_CODEC_MIKMOD=1
|
||||
USE_CODEC_XMP=0
|
||||
USE_CODEC_MODPLUG=0
|
||||
USE_CODEC_UMX=1
|
||||
|
||||
# which library to use for mp3 decoding: mad or mpg123
|
||||
|
@ -158,12 +157,6 @@ CODEC_INC = -I../Windows/codecs/include
|
|||
CODEC_LINK= -L../Windows/codecs/x64
|
||||
CODECLIBS+= -lxmp
|
||||
endif
|
||||
ifeq ($(USE_CODEC_MODPLUG),1)
|
||||
CFLAGS+= -DUSE_CODEC_MODPLUG
|
||||
CODEC_INC = -I../Windows/codecs/include
|
||||
CODEC_LINK= -L../Windows/codecs/x64
|
||||
CODECLIBS+= -lmodplug
|
||||
endif
|
||||
ifeq ($(USE_CODEC_UMX),1)
|
||||
CFLAGS+= -DUSE_CODEC_UMX
|
||||
endif
|
||||
|
@ -202,7 +195,6 @@ MUSIC_OBJS:= bgmusic.o \
|
|||
snd_opus.o \
|
||||
$(mp3_obj) \
|
||||
snd_mikmod.o \
|
||||
snd_modplug.o \
|
||||
snd_xmp.o \
|
||||
snd_umx.o
|
||||
COMOBJ_SND := snd_dma.o snd_mix.o snd_mem.o $(MUSIC_OBJS)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
/* headers for individual codecs */
|
||||
#include "snd_mikmod.h"
|
||||
#include "snd_modplug.h"
|
||||
#include "snd_xmp.h"
|
||||
#include "snd_umx.h"
|
||||
#include "snd_wave.h"
|
||||
|
@ -67,9 +66,6 @@ void S_CodecInit (void)
|
|||
#ifdef USE_CODEC_UMX
|
||||
S_CodecRegister(&umx_codec);
|
||||
#endif
|
||||
#ifdef USE_CODEC_MODPLUG
|
||||
S_CodecRegister(&modplug_codec);
|
||||
#endif
|
||||
#ifdef USE_CODEC_MIKMOD
|
||||
S_CodecRegister(&mikmod_codec);
|
||||
#endif
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
/*
|
||||
* tracker music (module file) decoding support using libmodplug
|
||||
*
|
||||
* Copyright (C) 2013 O.Sezer <sezero@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#if defined(USE_CODEC_MODPLUG)
|
||||
#include "snd_codec.h"
|
||||
#include "snd_codeci.h"
|
||||
#include "snd_modplug.h"
|
||||
#include <libmodplug/modplug.h>
|
||||
|
||||
static void S_MODPLUG_SetSettings (snd_stream_t *stream)
|
||||
{
|
||||
ModPlug_Settings settings;
|
||||
|
||||
ModPlug_GetSettings(&settings);
|
||||
settings.mFlags = MODPLUG_ENABLE_OVERSAMPLING;
|
||||
settings.mChannels = shm->channels;
|
||||
settings.mBits = shm->samplebits;
|
||||
settings.mFrequency = shm->speed;
|
||||
settings.mResamplingMode = MODPLUG_RESAMPLE_SPLINE;/*MODPLUG_RESAMPLE_FIR*/
|
||||
settings.mLoopCount = 0;
|
||||
ModPlug_SetSettings(&settings);
|
||||
|
||||
if (stream) {
|
||||
stream->info.rate = shm->speed;
|
||||
stream->info.bits = shm->samplebits;
|
||||
stream->info.width = stream->info.bits / 8;
|
||||
stream->info.channels = shm->channels;
|
||||
}
|
||||
}
|
||||
|
||||
static qboolean S_MODPLUG_CodecInitialize (void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static void S_MODPLUG_CodecShutdown (void)
|
||||
{
|
||||
}
|
||||
|
||||
static qboolean S_MODPLUG_CodecOpenStream (snd_stream_t *stream)
|
||||
{
|
||||
/* need to load the whole file into memory and pass it to libmodplug */
|
||||
byte *moddata;
|
||||
long len;
|
||||
int mark;
|
||||
|
||||
len = FS_filelength (&stream->fh);
|
||||
mark = Hunk_LowMark();
|
||||
moddata = (byte *) Hunk_Alloc(len);
|
||||
FS_fread(moddata, 1, len, &stream->fh);
|
||||
|
||||
S_MODPLUG_SetSettings(stream);
|
||||
stream->priv = ModPlug_Load(moddata, len);
|
||||
Hunk_FreeToLowMark(mark); /* free original file data */
|
||||
if (!stream->priv)
|
||||
{
|
||||
Con_DPrintf("Could not load module %s\n", stream->name);
|
||||
return false;
|
||||
}
|
||||
|
||||
ModPlug_Seek((ModPlugFile*)stream->priv, 0);
|
||||
#if 0
|
||||
/* default volume (128) sounds rather low? */
|
||||
ModPlug_SetMasterVolume((ModPlugFile*)stream->priv, 384); /* 0-512 */
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
static int S_MODPLUG_CodecReadStream (snd_stream_t *stream, int bytes, void *buffer)
|
||||
{
|
||||
return ModPlug_Read((ModPlugFile*)stream->priv, buffer, bytes);
|
||||
}
|
||||
|
||||
static void S_MODPLUG_CodecCloseStream (snd_stream_t *stream)
|
||||
{
|
||||
ModPlug_Unload((ModPlugFile*)stream->priv);
|
||||
S_CodecUtilClose(&stream);
|
||||
}
|
||||
|
||||
static int S_MODPLUG_CodecRewindStream (snd_stream_t *stream)
|
||||
{
|
||||
ModPlug_Seek((ModPlugFile*)stream->priv, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
snd_codec_t modplug_codec =
|
||||
{
|
||||
CODECTYPE_MOD,
|
||||
true, /* always available. */
|
||||
"s3m",
|
||||
S_MODPLUG_CodecInitialize,
|
||||
S_MODPLUG_CodecShutdown,
|
||||
S_MODPLUG_CodecOpenStream,
|
||||
S_MODPLUG_CodecReadStream,
|
||||
S_MODPLUG_CodecRewindStream,
|
||||
S_MODPLUG_CodecCloseStream,
|
||||
NULL
|
||||
};
|
||||
|
||||
#endif /* USE_CODEC_MODPLUG */
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/* module tracker decoding support using libmodplug */
|
||||
#if !defined(_SND_MODPLUG_H_)
|
||||
#define _SND_MODPLUG_H_
|
||||
|
||||
#if defined(USE_CODEC_MODPLUG)
|
||||
|
||||
extern snd_codec_t modplug_codec;
|
||||
|
||||
#endif /* USE_CODEC_MODPLUG */
|
||||
|
||||
#endif /* ! _SND_MODPLUG_H_ */
|
||||
|
|
@ -281,10 +281,6 @@
|
|||
<Unit filename="..\..\Quake\snd_mix.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="..\..\Quake\snd_modplug.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="..\..\Quake\snd_modplug.h" />
|
||||
<Unit filename="..\..\Quake\snd_mp3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
@ -280,10 +280,6 @@
|
|||
<Unit filename="..\..\Quake\snd_mix.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="..\..\Quake\snd_modplug.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="..\..\Quake\snd_modplug.h" />
|
||||
<Unit filename="..\..\Quake\snd_mp3.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
|
@ -557,10 +557,6 @@
|
|||
RelativePath="..\..\Quake\snd_mix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_modplug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_mp3.c"
|
||||
>
|
||||
|
@ -835,10 +831,6 @@
|
|||
RelativePath="..\..\Quake\snd_mikmod.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_modplug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_mp3.h"
|
||||
>
|
||||
|
|
|
@ -557,10 +557,6 @@
|
|||
RelativePath="..\..\Quake\snd_mix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_modplug.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_mp3.c"
|
||||
>
|
||||
|
@ -839,10 +835,6 @@
|
|||
RelativePath="..\..\Quake\snd_mikmod.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_modplug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Quake\snd_mp3.h"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue