summaryrefslogtreecommitdiff
path: root/engine/audio/private/snd_sfx.h
blob: a0de0d30f9af57986c99e6041dd74248c43344c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//

#ifndef SND_SFX_H
#define SND_SFX_H

#if defined( _WIN32 )
#pragma once
#endif

class CAudioSource;

class CSfxTable
{
public:
	CSfxTable();

	// gets sound name, possible decoracted with prefixes
	virtual const char	*getname();
	// gets the filename, the part after the optional prefixes
	const char			*GetFileName();
	FileNameHandle_t	GetFileNameHandle();

	void				SetNamePoolIndex( int index );
	bool				IsPrecachedSound();
	void				OnNameChanged( const char *pName );

	int					m_namePoolIndex;
	CAudioSource		*pSource;

	bool				m_bUseErrorFilename : 1;
	bool				m_bIsUISound : 1;
	bool				m_bIsLateLoad : 1;
	bool				m_bMixGroupsCached : 1;
	byte				m_mixGroupCount;
	// UNDONE: Use a fixed bit vec here?
	byte				m_mixGroupList[8];

private:
	// Only set in debug mode so you can see the name.
	const char *m_pDebugName;
};

#endif // SND_SFX_H