mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 22:11:54 +00:00
f103e33300
All Duke script code has been changed to use strings as sound names now, just like GZDoom these will be looked up at compile time. Original Duke sound indices still exist but are now being managed as resource IDs, not sound engine indices anymore.
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
#include "s_soundinternal.h"
|
|
#include "m_fixed.h"
|
|
#include "vectors.h"
|
|
#include "build.h"
|
|
|
|
inline FVector3 GetSoundPos(const DVector3& pos)
|
|
{
|
|
return { float(pos.X), float(-pos.Z), float(-pos.Y) };
|
|
}
|
|
|
|
enum
|
|
{
|
|
SOURCE_Actor = SOURCE_None+1, // Sound is coming from an actor.
|
|
SOURCE_Ambient, // Sound is coming from a blood ambient definition.
|
|
SOURCE_Player, // SW player sound (player in SW maintains its own position separately from the sprite so needs to be special.)
|
|
SOURCE_Swirly, // Special stuff for Exhumed. (local sound with custom panning)
|
|
SOURCE_EXBoss, // Another special case for Exhumed.
|
|
};
|
|
|
|
|
|
inline void FX_StopAllSounds(void)
|
|
{
|
|
soundEngine->StopAllChannels();
|
|
}
|
|
|
|
void FX_SetReverb(int strength);
|
|
|
|
inline void FX_SetReverbDelay(int delay)
|
|
{
|
|
}
|
|
|
|
int S_LookupSound(const char* fn);
|
|
class FSerializer;
|
|
void S_SerializeSounds(FSerializer& arc);
|
|
int S_ReserveSoundSlot(const char* logicalname, int slotnum, int limit = 6);
|
|
|
|
class RazeSoundEngine : public SoundEngine
|
|
{
|
|
public:
|
|
RazeSoundEngine()
|
|
{
|
|
// add the empty sound right now.
|
|
AddSoundLump("no_sound", fileSystem.CheckNumForFullName("engine/dsempty.lmp"), 0);
|
|
}
|
|
virtual bool SourceIsActor(FSoundChan* chan) { return chan->SourceType == SOURCE_Actor; }
|
|
virtual int SoundSourceIndex(FSoundChan* chan) { return 0; }
|
|
virtual void SetSource(FSoundChan* chan, int index) {}
|
|
};
|