qzdoom/src/sound/s_sound.h

87 lines
3 KiB
C
Raw Normal View History

2016-03-01 15:47:10 +00:00
//-----------------------------------------------------------------------------
//
// Copyright 1993-1996 id Software
// Copyright 1999-2016 Randy Heit
// Copyright 2002-2016 Christoph Oelckers
2016-03-01 15:47:10 +00:00
//
// 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 3 of the License, or
// (at your option) any later version.
2016-03-01 15:47:10 +00:00
//
// This program is distributed in the hope that it will be useful,
2016-03-01 15:47:10 +00:00
// 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, see http://www.gnu.org/licenses/
//
//-----------------------------------------------------------------------------
2016-03-01 15:47:10 +00:00
//
// DESCRIPTION:
// The not so system specific sound interface.
//
//-----------------------------------------------------------------------------
#ifndef __S_SOUND__
#define __S_SOUND__
#include "i_soundinternal.h"
class AActor;
class FScanner;
class FSerializer;
struct FLevelLocals;
2016-03-01 15:47:10 +00:00
#include "s_soundinternal.h"
#include "s_doomsound.h"
2020-04-11 16:25:23 +00:00
#include "name.h"
#include "tarray.h"
2016-03-01 15:47:10 +00:00
enum SndUserFlags
{
SND_PlayerReserve = 1,
SND_PlayerCompat = 2,
SND_PlayerSilent = 4
};
enum // This cannot be remain as this, but for now it has to suffice.
{
SOURCE_Actor = SOURCE_None+1, // Sound is coming from an actor.
SOURCE_Sector, // Sound is coming from a sector.
SOURCE_Polyobj, // Sound is coming from a polyobject.
};
2016-03-01 15:47:10 +00:00
// Per level startup code.
// Kills playing sounds at start of level and starts new music.
//
2020-04-11 16:25:23 +00:00
typedef TMap<FName, FName> MusicAliasMap;
extern MusicAliasMap MusicAliases;
2016-03-01 15:47:10 +00:00
// Called after a level is loaded. Ensures that most sounds are loaded.
2016-03-01 15:47:10 +00:00
// [RH] S_sfx "maintenance" routines
void S_ClearSoundData();
2016-03-01 15:47:10 +00:00
void S_ParseSndInfo (bool redefine);
2022-11-24 13:06:32 +00:00
bool S_AreSoundsEquivalent (AActor *actor, FSoundID id1, FSoundID id2);
FSoundID S_LookupPlayerSound (const char *playerclass, int gender, FSoundID refid);
const char *S_GetSoundClass(AActor *pp);
2022-11-24 13:06:32 +00:00
FSoundID S_FindSkinnedSound (AActor *actor, FSoundID refid);
FSoundID S_FindSkinnedSoundEx (AActor *actor, const char *logicalname, const char *extendedname);
2022-11-24 13:06:32 +00:00
FSoundID S_AddSound (const char *logicalname, const char *lumpname, FScanner *sc=NULL); // Add sound by lumpname
FSoundID S_AddPlayerSound (const char *playerclass, const int gender, FSoundID refid, const char *lumpname);
FSoundID S_AddPlayerSound (const char *playerclass, const int gender, FSoundID refid, int lumpnum, bool fromskin=false);
FSoundID S_AddPlayerSoundExisting (const char *playerclass, const int gender, FSoundID refid, FSoundID aliasto, bool fromskin=false);
void S_MarkPlayerSounds (AActor *player);
2016-03-01 15:47:10 +00:00
void S_ShrinkPlayerSoundLists ();
unsigned int S_GetMSLength(FSoundID sound);
// [RH] Prints sound debug info to the screen.
// Modelled after Hexen's noise cheat.
2016-03-01 15:47:10 +00:00
#endif