Handle stereo panning in OAL manually for streams

This commit is contained in:
Sergeanur
2021-01-04 20:11:04 +02:00
parent 601f77b5c8
commit 7adac51152
3 changed files with 195 additions and 70 deletions

View File

@@ -57,7 +57,7 @@ public:
class CStream
{
char m_aFilename[128];
ALuint &m_alSource;
ALuint *m_pAlSources;
ALuint (&m_alBuffers)[NUM_STREAMBUFFERS];
bool m_bPaused;
@@ -73,20 +73,20 @@ class CStream
IDecoder *m_pSoundFile;
bool HasSource();
void SetPosition(float x, float y, float z);
void SetPosition(int i, float x, float y, float z);
void SetPitch(float pitch);
void SetGain(float gain);
void Pause();
void SetPlay(bool state);
bool FillBuffer(ALuint alBuffer);
bool FillBuffer(ALuint *alBuffer);
int32 FillBuffers();
void ClearBuffers();
public:
static void Initialise();
static void Terminate();
CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUFFERS]);
CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]);
~CStream();
void Delete();