summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/channel.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-10-27 08:35:09 +0100
committerSergeanur <s.anureev@yandex.ua>2020-10-27 08:35:09 +0100
commit4cfb3b0984c1de2820691b4b5f1c63cd19c498fb (patch)
tree16399a8b15c03ac6b03bfb014fbdd2c1f9fbf99b /src/audio/oal/channel.h
parentRevert "(TEST) Try to fix OAL audio problems" (diff)
downloadre3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar.gz
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar.bz2
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar.lz
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar.xz
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.tar.zst
re3-4cfb3b0984c1de2820691b4b5f1c63cd19c498fb.zip
Diffstat (limited to 'src/audio/oal/channel.h')
-rw-r--r--src/audio/oal/channel.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h
index 0c86bdc6..81817a32 100644
--- a/src/audio/oal/channel.h
+++ b/src/audio/oal/channel.h
@@ -9,22 +9,24 @@
class CChannel
{
- ALuint alSource;
- ALuint alFilter;
- ALuint alBuffer;
+ 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];
- uint32 Sample;
public:
+ static void InitChannels();
+ static void DestroyChannels();
+
CChannel();
void SetDefault();
void Reset();
- void Init(bool Is2D = false);
+ void Init(uint32 _id, bool Is2D = false);
void Term();
void Start();
void Stop();
@@ -33,15 +35,13 @@ public:
void SetPitch(float pitch);
void SetGain(float gain);
void SetVolume(int32 vol);
- void SetSampleID(uint32 nSfx);
- void SetFreq(int32 freq);
+ void SetSampleData(void *_data, size_t _DataSize, 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 SetPan(int32 pan);
void ClearBuffer();
void SetReverbMix(ALuint slot, float mix);
void UpdateReverb(ALuint slot);