mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
SW: Update the rest of the AudioLib API.
git-svn-id: https://svn.eduke32.com/eduke32@5213 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
895e829411
commit
792397feaa
3 changed files with 18 additions and 13 deletions
|
@ -325,7 +325,7 @@ ifeq ($(PLATFORM),WINDOWS)
|
|||
DUKE3D_EDITOR_OBJS+= buildres
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
LIBS+= -ldsound
|
||||
DUKE3D_OBJS+= music midi mpu401
|
||||
MIDI_OBJS=music midi mpu401
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -343,7 +343,7 @@ ifeq ($(RENDERTYPE),SDL)
|
|||
DUKE3D_EDITOR_OBJS+= eduke32_icon
|
||||
endif
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
DUKE3D_OBJS+= sdlmusic
|
||||
MIDI_OBJS=sdlmusic
|
||||
endif
|
||||
|
||||
## Construct file names of object files
|
||||
|
@ -351,6 +351,8 @@ endif
|
|||
COMMON_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_OBJS)))
|
||||
COMMON_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_EDITOR_OBJS)))
|
||||
|
||||
MIDI_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(MIDI_OBJS)))
|
||||
|
||||
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
|
||||
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
|
||||
|
||||
|
@ -480,7 +482,7 @@ ifneq ($(STRIP),)
|
|||
$(STRIP) $@
|
||||
endif
|
||||
|
||||
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
|
||||
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(MIDI_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
|
||||
$(LINK_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||
ifeq ($(PLATFORM),WII)
|
||||
|
@ -514,7 +516,7 @@ ifeq ($(PLATFORM),DARWIN)
|
|||
cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
|
||||
endif
|
||||
|
||||
$(SW)$(EXESUFFIX): $(SW_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
|
||||
$(SW)$(EXESUFFIX): $(SW_OBJS_EXP) $(COMMON_OBJS_EXP) $(MIDI_OBJS_EXP) $(ENGINE_OBJS_EXP) $(MACT_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
|
||||
$(LINK_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||
ifeq ($(PLATFORM),WII)
|
||||
|
|
|
@ -37,7 +37,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "midi.h"
|
||||
#include "mpu401.h"
|
||||
#include "compat.h"
|
||||
#include "duke3d.h"
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE ( 1 == 1 )
|
||||
|
|
|
@ -48,6 +48,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "rts.h"
|
||||
#include "menus.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "winlayer.h"
|
||||
#endif
|
||||
|
||||
extern USERp User[MAXSPRITES];
|
||||
void DumpSounds(void);
|
||||
|
||||
|
@ -497,7 +501,7 @@ PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart)
|
|||
|
||||
if (!memcmp(SongPtr, "MThd", 4))
|
||||
{
|
||||
MUSIC_PlaySong(SongPtr, SongLength, MUSIC_LoopSong);
|
||||
MUSIC_PlaySong(SongPtr, /*SongLength,*/ MUSIC_LoopSong);
|
||||
SongType = SongTypeMIDI;
|
||||
SongName = strdup(song_file_name);
|
||||
return TRUE;
|
||||
|
@ -561,7 +565,7 @@ PauseSong(SWBOOL pauseon)
|
|||
|
||||
if (SongType == SongTypeWave && SongVoice >= 0)
|
||||
{
|
||||
FX_PauseSound(SongVoice, pauseon);
|
||||
FX_PauseVoice(SongVoice, pauseon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1041,7 +1045,7 @@ PlaySound(int num, int *x, int *y, int *z, Voc3D_Flags flags)
|
|||
{
|
||||
if (sound_dist < 255)
|
||||
{
|
||||
voice = FX_PlayAuto3D((char *)vp->data, vp->datalen, pitch, angle, sound_dist, priority, num);
|
||||
voice = FX_PlayAuto3D((char *)vp->data, vp->datalen, FX_ONESHOT, pitch, angle, sound_dist, priority, num);
|
||||
}
|
||||
else
|
||||
voice = -1;
|
||||
|
@ -1080,7 +1084,7 @@ void PlaySoundRTS(int rts_num)
|
|||
|
||||
ASSERT(rtsptr);
|
||||
|
||||
voice = FX_PlayAuto3D(rtsptr, RTS_SoundLength(rts_num - 1), 0, 0, 0, 255, -rts_num);
|
||||
voice = FX_PlayAuto3D(rtsptr, RTS_SoundLength(rts_num - 1), FX_ONESHOT, 0, 0, 0, 255, -rts_num);
|
||||
|
||||
if (voice <= FX_Ok)
|
||||
{
|
||||
|
@ -1186,13 +1190,13 @@ SoundStartup(void)
|
|||
fxdevicetype = FXDevice - 1;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef MIXERTYPEWIN
|
||||
initdata = (void *) win_gethwnd();
|
||||
#endif
|
||||
|
||||
//gs.FxOn = TRUE;
|
||||
|
||||
status = FX_Init(fxdevicetype, NumVoices, &NumChannels, &NumBits, &MixRate, initdata);
|
||||
status = FX_Init(fxdevicetype, NumVoices, NumChannels, NumBits, MixRate, initdata);
|
||||
if (status == FX_Ok)
|
||||
{
|
||||
FxInitialized = TRUE;
|
||||
|
@ -1255,14 +1259,14 @@ SoundShutdown(void)
|
|||
|
||||
void loadtmb(void)
|
||||
{
|
||||
unsigned char tmb[8000];
|
||||
char tmb[8000];
|
||||
int fil, l;
|
||||
|
||||
fil = kopen4load("swtimbr.tmb",0);
|
||||
if (fil == -1)
|
||||
return;
|
||||
|
||||
l = kfilelength(fil);
|
||||
l = min(kfilelength(fil), sizeof(tmb));
|
||||
kread(fil,tmb,l);
|
||||
MUSIC_RegisterTimbreBank(tmb);
|
||||
kclose(fil);
|
||||
|
|
Loading…
Reference in a new issue