mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-08 22:10:34 +00:00
oal upd
This commit is contained in:
parent
1180cc2947
commit
8aac6060d3
22 changed files with 2850 additions and 2125 deletions
57
src/audio/oal/stream.h
Normal file
57
src/audio/oal/stream.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
#pragma once
|
||||
#include "common.h"
|
||||
|
||||
#ifdef AUDIO_OAL
|
||||
#include <AL/al.h>
|
||||
|
||||
#define NUM_STREAMBUFFERS 5
|
||||
#define STREAMBUFFER_SIZE 0x4000
|
||||
|
||||
class CStream
|
||||
{
|
||||
char m_aFilename[128];
|
||||
ALuint &m_alSource;
|
||||
ALuint (&m_alBuffers)[NUM_STREAMBUFFERS];
|
||||
|
||||
bool m_bIsOpened;
|
||||
bool m_bPaused;
|
||||
|
||||
uint32 m_nLength;
|
||||
uint32 m_nLengthMS;
|
||||
uint32 m_nBitRate;
|
||||
|
||||
unsigned long m_nFormat;
|
||||
unsigned long m_nFreq;
|
||||
|
||||
uint32 m_nBufferSize;
|
||||
void *m_pBuffer;
|
||||
|
||||
ALint iTotalBuffersProcessed;
|
||||
|
||||
bool FillBuffer(ALuint alBuffer);
|
||||
int32 FillBuffers();
|
||||
public:
|
||||
static void Initialise();
|
||||
static void Terminate();
|
||||
|
||||
CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUFFERS]);
|
||||
~CStream();
|
||||
|
||||
void Delete();
|
||||
|
||||
bool IsOpened();
|
||||
bool IsPlaying();
|
||||
void SetPause (bool bPause);
|
||||
void SetVolume(uint32 nVol);
|
||||
void SetPan (uint8 nPan);
|
||||
void SetPos (uint32 nPos);
|
||||
|
||||
uint32 GetPos();
|
||||
uint32 GetLength();
|
||||
|
||||
bool Setup();
|
||||
void Start();
|
||||
void Update(void);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue