summaryrefslogtreecommitdiff
path: root/src/audio/oal/channel.h
diff options
context:
space:
mode:
authorclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
committerclaude-bot <[email protected]>2026-07-13 12:27:07 +0000
commit9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686 (patch)
treea84756b82513739a2672db3a1f0ec579db6d18ff /src/audio/oal/channel.h
downloadre3-9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686.tar.gz
re3-9f61c9e6ac6b1ac5692cf6352d2ebbd47a31a686.zip
Import Cai1Hsu/re3 @ miami (reVC / GTA:VC decompilation)HEADmiami
Snapshot import (no upstream history) into git.ancap.in.ua/claude, per @lzcnt. Source: https://github.com/Cai1Hsu/re3 branch miami.
Diffstat (limited to 'src/audio/oal/channel.h')
-rw-r--r--src/audio/oal/channel.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h
new file mode 100644
index 0000000..b081be2
--- /dev/null
+++ b/src/audio/oal/channel.h
@@ -0,0 +1,54 @@
+#pragma once
+
+#ifdef AUDIO_OAL
+#include "oal/oal_utils.h"
+#include <AL/al.h>
+#include <AL/alext.h>
+#include <AL/efx.h>
+
+
+class CChannel
+{
+ uint32 id;
+ float Pitch, Gain;
+ float Mix;
+ void *Data;
+ size_t DataSize;
+ int32 Frequency;
+ float Position[3];
+ float Distances[2];
+ int32 LoopCount;
+ ALint LoopPoints[2];
+ ALint LastProcessedOffset;
+public:
+ static int32 channelsThatNeedService;
+
+ static void InitChannels();
+ static void DestroyChannels();
+
+ CChannel();
+ void SetDefault();
+ void Reset();
+ void Init(uint32 _id, 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 SetSampleData(void *_data, size_t _DataSize, int32 freq);
+ void SetCurrentFreq(uint32 freq);
+ void SetLoopCount(int32 count);
+ void SetLoopPoints(ALint start, ALint end);
+ void SetPosition(float x, float y, float z);
+ void SetDistances(float max, float min);
+ void SetPan(int32 pan);
+ void ClearBuffer();
+ void SetReverbMix(ALuint slot, float mix);
+ void UpdateReverb(ALuint slot);
+ bool Update();
+};
+
+#endif \ No newline at end of file