From 8aac6060d36c5dca48c02988b654d4646b175e64 Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Mon, 4 May 2020 20:33:48 +0300 Subject: oal upd --- src/audio/oal/channel.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/audio/oal/channel.h (limited to 'src/audio/oal/channel.h') diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h new file mode 100644 index 00000000..d9ffea22 --- /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 +#include +#include + + +class CChannel +{ + ALuint alChannel; + ALuint alFilter; + ALuint Buffer; + 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 -- cgit v1.2.3 From 12a3499ca365756a77958d616423aca39a23234b Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Thu, 7 May 2020 09:26:16 +0300 Subject: oal wav/mp3 stream update --- src/audio/oal/channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/audio/oal/channel.h') diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h index d9ffea22..4dd09ca1 100644 --- a/src/audio/oal/channel.h +++ b/src/audio/oal/channel.h @@ -10,9 +10,9 @@ class CChannel { - ALuint alChannel; + ALuint alSource; ALuint alFilter; - ALuint Buffer; + ALuint alBuffer; float Pitch, Gain; float Mix; int32 Frequency; -- cgit v1.2.3