summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/stream.h
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-06-26 22:59:40 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-07-10 22:13:51 +0200
commit5458632c405fd81e76e625ba9dfabe8831509d1b (patch)
treecef8096a4c431b19a5c740131910dcd7082aea2b /src/audio/oal/stream.h
parentMulti-threaded audio streams (diff)
downloadre3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar.gz
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar.bz2
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar.lz
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar.xz
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.tar.zst
re3-5458632c405fd81e76e625ba9dfabe8831509d1b.zip
Diffstat (limited to 'src/audio/oal/stream.h')
-rw-r--r--src/audio/oal/stream.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/audio/oal/stream.h b/src/audio/oal/stream.h
index bdbf19e0..10b595c1 100644
--- a/src/audio/oal/stream.h
+++ b/src/audio/oal/stream.h
@@ -127,9 +127,10 @@ public:
std::mutex m_mutex;
std::queue<std::pair<ALuint, ALuint>> m_fillBuffers; // left and right buffer
tsQueue<std::pair<ALuint, ALuint>> m_queueBuffers;
+ std::condition_variable m_closeCv;
bool m_bDoSeek;
uint32 m_SeekPos;
- uint8 m_nDeleteMe; // 1: add to delete list 2: already on delete list
+ bool m_bIExist;
#endif
void *m_pBuffer;
@@ -163,8 +164,10 @@ public:
static void Initialise();
static void Terminate();
- CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate = 32000);
+ CStream(ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]);
~CStream();
+ void Delete();
+ bool Open(const char *filename, uint32 overrideSampleRate = 32000);
void Close();
bool IsOpened();