mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'audio-cleanup' into 'next'
Audio cleanup See merge request STJr/SRB2!1101
This commit is contained in:
commit
8bef076b83
2 changed files with 0 additions and 78 deletions
|
|
@ -11,16 +11,6 @@
|
||||||
/// \file s_sound.c
|
/// \file s_sound.c
|
||||||
/// \brief System-independent sound and music routines
|
/// \brief System-independent sound and music routines
|
||||||
|
|
||||||
#ifdef MUSSERV
|
|
||||||
#include <sys/msg.h>
|
|
||||||
struct musmsg
|
|
||||||
{
|
|
||||||
long msg_type;
|
|
||||||
char msg_text[12];
|
|
||||||
};
|
|
||||||
extern INT32 msg_id;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
|
|
@ -70,16 +60,6 @@ static lumpnum_t S_GetMusicLumpNum(const char *mname);
|
||||||
|
|
||||||
static boolean S_CheckQueue(void);
|
static boolean S_CheckQueue(void);
|
||||||
|
|
||||||
// commands for music and sound servers
|
|
||||||
#ifdef MUSSERV
|
|
||||||
consvar_t musserver_cmd = {"musserver_cmd", "musserver", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t musserver_arg = {"musserver_arg", "-t 20 -f -u 0 -i music.dta", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
#endif
|
|
||||||
#ifdef SNDSERV
|
|
||||||
consvar_t sndserver_cmd = {"sndserver_cmd", "llsndserv", CV_SAVE, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t sndserver_arg = {"sndserver_arg", "-quiet", CV_SAVE, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (_WINDOWS) && !defined (SURROUND) //&& defined (_X86_)
|
#if defined (_WINDOWS) && !defined (SURROUND) //&& defined (_X86_)
|
||||||
#define SURROUND
|
#define SURROUND
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -292,14 +272,6 @@ void S_RegisterSoundStuff(void)
|
||||||
CV_RegisterVar(&stereoreverse);
|
CV_RegisterVar(&stereoreverse);
|
||||||
CV_RegisterVar(&precachesound);
|
CV_RegisterVar(&precachesound);
|
||||||
|
|
||||||
#ifdef SNDSERV
|
|
||||||
CV_RegisterVar(&sndserver_cmd);
|
|
||||||
CV_RegisterVar(&sndserver_arg);
|
|
||||||
#endif
|
|
||||||
#ifdef MUSSERV
|
|
||||||
CV_RegisterVar(&musserver_cmd);
|
|
||||||
CV_RegisterVar(&musserver_arg);
|
|
||||||
#endif
|
|
||||||
CV_RegisterVar(&surround);
|
CV_RegisterVar(&surround);
|
||||||
CV_RegisterVar(&cv_samplerate);
|
CV_RegisterVar(&cv_samplerate);
|
||||||
CV_RegisterVar(&cv_resetmusic);
|
CV_RegisterVar(&cv_resetmusic);
|
||||||
|
|
@ -322,27 +294,6 @@ void S_RegisterSoundStuff(void)
|
||||||
|
|
||||||
COM_AddCommand("tunes", Command_Tunes_f);
|
COM_AddCommand("tunes", Command_Tunes_f);
|
||||||
COM_AddCommand("restartaudio", Command_RestartAudio_f);
|
COM_AddCommand("restartaudio", Command_RestartAudio_f);
|
||||||
|
|
||||||
#if defined (macintosh) && !defined (HAVE_SDL) // mp3 playlist stuff
|
|
||||||
{
|
|
||||||
INT32 i;
|
|
||||||
for (i = 0; i < PLAYLIST_LENGTH; i++)
|
|
||||||
{
|
|
||||||
user_songs[i].name = malloc(7);
|
|
||||||
if (!user_songs[i].name)
|
|
||||||
I_Error("No more free memory for mp3 playlist");
|
|
||||||
sprintf(user_songs[i].name, "song%d%d",i/10,i%10);
|
|
||||||
user_songs[i].defaultvalue = malloc(sizeof (char));
|
|
||||||
if (user_songs[i].defaultvalue)
|
|
||||||
I_Error("No more free memory for blank mp3 playerlist");
|
|
||||||
*user_songs[i].defaultvalue = 0;
|
|
||||||
user_songs[i].flags = CV_SAVE;
|
|
||||||
user_songs[i].PossibleValue = NULL;
|
|
||||||
CV_RegisterVar(&user_songs[i]);
|
|
||||||
}
|
|
||||||
CV_RegisterVar(&play_mode);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetChannelsNum(void)
|
static void SetChannelsNum(void)
|
||||||
|
|
@ -2230,17 +2181,6 @@ static boolean S_LoadMusic(const char *mname)
|
||||||
// load & register it
|
// load & register it
|
||||||
mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC);
|
mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC);
|
||||||
|
|
||||||
#ifdef MUSSERV
|
|
||||||
if (msg_id != -1)
|
|
||||||
{
|
|
||||||
struct musmsg msg_buffer;
|
|
||||||
|
|
||||||
msg_buffer.msg_type = 6;
|
|
||||||
memset(msg_buffer.msg_text, 0, sizeof (msg_buffer.msg_text));
|
|
||||||
sprintf(msg_buffer.msg_text, "d_%s", mname);
|
|
||||||
msgsnd(msg_id, (struct msgbuf*)&msg_buffer, sizeof (msg_buffer.msg_text), IPC_NOWAIT);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (I_LoadSong(mdata, W_LumpLength(mlumpnum)))
|
if (I_LoadSong(mdata, W_LumpLength(mlumpnum)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -61,26 +61,8 @@ extern consvar_t cv_midisoundfontpath;
|
||||||
extern consvar_t cv_miditimiditypath;
|
extern consvar_t cv_miditimiditypath;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SNDSERV
|
|
||||||
extern consvar_t sndserver_cmd, sndserver_arg;
|
|
||||||
#endif
|
|
||||||
#ifdef MUSSERV
|
|
||||||
extern consvar_t musserver_cmd, musserver_arg;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern CV_PossibleValue_t soundvolume_cons_t[];
|
extern CV_PossibleValue_t soundvolume_cons_t[];
|
||||||
|
|
||||||
#if defined (macintosh) && !defined (HAVE_SDL)
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
music_normal,
|
|
||||||
playlist_random,
|
|
||||||
playlist_normal
|
|
||||||
} playmode_t;
|
|
||||||
|
|
||||||
extern consvar_t play_mode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SF_TOTALLYSINGLE = 1, // Only play one of these sounds at a time...GLOBALLY
|
SF_TOTALLYSINGLE = 1, // Only play one of these sounds at a time...GLOBALLY
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue