aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/soundsystem/isoundsystem.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/soundsystem/isoundsystem.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/soundsystem/isoundsystem.h')
-rw-r--r--sp/src/public/soundsystem/isoundsystem.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/sp/src/public/soundsystem/isoundsystem.h b/sp/src/public/soundsystem/isoundsystem.h
new file mode 100644
index 00000000..f4d1ce94
--- /dev/null
+++ b/sp/src/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