summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/channel.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-11 22:21:26 +0200
committeraap <aap@papnet.eu>2020-05-11 22:21:26 +0200
commit0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2 (patch)
tree16bf11e0e8a0353448a643322e9511e8ba659fca /src/audio/oal/channel.h
parentCVisibilityPlugins (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.gz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.bz2
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.lz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.xz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.zst
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.zip
Diffstat (limited to 'src/audio/oal/channel.h')
-rw-r--r--src/audio/oal/channel.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h
new file mode 100644
index 00000000..4dd09ca1
--- /dev/null
+++ b/src/audio/oal/channel.h
@@ -0,0 +1,51 @@
+#pragma once
+#include "common.h"
+
+#ifdef AUDIO_OAL
+#include "oal/oal_utils.h"
+#include <AL/al.h>
+#include <AL/alext.h>
+#include <AL/efx.h>
+
+
+class CChannel
+{
+ ALuint alSource;
+ ALuint alFilter;
+ ALuint alBuffer;
+ float Pitch, Gain;
+ float Mix;
+ int32 Frequency;
+ float Position[3];
+ float Distances[2];
+ int32 LoopCount;
+ ALint LoopPoints[2];
+ uint32 Sample;
+public:
+ CChannel();
+ void SetDefault();
+ void Reset();
+ void Init(bool Is2D = false);
+ void Term();
+ void Start();
+ void Stop();
+ bool HasSource();
+ bool IsUsed();
+ void SetPitch(float pitch);
+ void SetGain(float gain);
+ void SetVolume(int32 vol);
+ void SetSampleID(uint32 nSfx);
+ void SetFreq(int32 freq);
+ void SetCurrentFreq(uint32 freq);
+ void SetLoopCount(int32 loopCount); // fake
+ void SetLoopPoints(ALint start, ALint end);
+ void SetPosition(float x, float y, float z);
+ void SetDistances(float max, float min);
+ void SetPan(uint32 pan);
+ void SetBuffer(ALuint buffer);
+ void ClearBuffer();
+ void SetReverbMix(ALuint slot, float mix);
+ void UpdateReverb(ALuint slot);
+};
+
+#endif \ No newline at end of file