diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/soundsystem/isoundsystem.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/soundsystem/isoundsystem.h')
| -rw-r--r-- | public/soundsystem/isoundsystem.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/public/soundsystem/isoundsystem.h b/public/soundsystem/isoundsystem.h new file mode 100644 index 0000000..8a37090 --- /dev/null +++ b/public/soundsystem/isoundsystem.h @@ -0,0 +1,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 |