forked from hitmen047/Source-PlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathisoundsystem.h
70 lines (52 loc) · 1.97 KB
/
isoundsystem.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//===========================================================================//
#ifndef ISOUNDSYSTEM_H
#define ISOUNDSYSTEM_H
#ifdef _WIN32
#pragma once
#endif
#include "appframework/iappsystem.h"
//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class IAudioDevice;
class CAudioSource;
class CAudioMixer;
//-----------------------------------------------------------------------------
// Sound handle
//-----------------------------------------------------------------------------
typedef unsigned short AudioSourceHandle_t;
enum
{
AUDIOSOURCEHANDLE_INVALID = (AudioSourceHandle_t)~0
};
//-----------------------------------------------------------------------------
// Flags for FindAudioSource
//-----------------------------------------------------------------------------
enum FindAudioSourceFlags_t
{
FINDAUDIOSOURCE_NODELAY = 0x1,
FINDAUDIOSOURCE_PREFETCH = 0x2,
FINDAUDIOSOURCE_PLAYONCE = 0x4,
};
//-----------------------------------------------------------------------------
// Purpose: DLL interface for low-level sound utilities
//-----------------------------------------------------------------------------
#define SOUNDSYSTEM_INTERFACE_VERSION "SoundSystem001"
abstract_class ISoundSystem : public IAppSystem
{
public:
virtual void Update( float time ) = 0;
virtual void Flush( void ) = 0;
virtual CAudioSource *FindOrAddSound( const char *filename ) = 0;
virtual CAudioSource *LoadSound( const char *wavfile ) = 0;
virtual void PlaySound( CAudioSource *source, float volume, CAudioMixer **ppMixer ) = 0;
virtual bool IsSoundPlaying( CAudioMixer *pMixer ) = 0;
virtual CAudioMixer *FindMixer( CAudioSource *source ) = 0;
virtual void StopAll( void ) = 0;
virtual void StopSound( CAudioMixer *mixer ) = 0;
};
#endif // ISOUNDSYSTEM_H