mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 17:45:32 +00:00
Fix for cell change OpenAL music streaming issue
This commit is contained in:
parent
f3c9694bf2
commit
14b2851e72
1 changed files with 6 additions and 3 deletions
|
@ -30,8 +30,11 @@ static char tmp_buffer[BSIZE];
|
||||||
// Number of buffers used (per sound) for streaming sounds. Each
|
// Number of buffers used (per sound) for streaming sounds. Each
|
||||||
// buffer is of size BSIZE. Increasing this will make streaming sounds
|
// buffer is of size BSIZE. Increasing this will make streaming sounds
|
||||||
// more fault tolerant against temporary lapses in call to update(),
|
// more fault tolerant against temporary lapses in call to update(),
|
||||||
// but will also increase memory usage. 4 should be ok.
|
// but will also increase memory usage.
|
||||||
const int STREAM_BUF_NUM = 4;
|
// This was changed from 4 to 150 for an estimated 30 seconds tolerance.
|
||||||
|
// At some point we should replace it with a more multithreading-ish
|
||||||
|
// solution.
|
||||||
|
const int STREAM_BUF_NUM = 150;
|
||||||
|
|
||||||
static void fail(const std::string &msg)
|
static void fail(const std::string &msg)
|
||||||
{ throw std::runtime_error("OpenAL exception: " + msg); }
|
{ throw std::runtime_error("OpenAL exception: " + msg); }
|
||||||
|
@ -101,7 +104,7 @@ class Mangle::Sound::OpenAL_Sound : public Sound
|
||||||
ALuint inst;
|
ALuint inst;
|
||||||
|
|
||||||
// Buffers. Only the first is used for non-streaming sounds.
|
// Buffers. Only the first is used for non-streaming sounds.
|
||||||
ALuint bufferID[4];
|
ALuint bufferID[STREAM_BUF_NUM];
|
||||||
|
|
||||||
// Number of buffers used
|
// Number of buffers used
|
||||||
int bufNum;
|
int bufNum;
|
||||||
|
|
Loading…
Reference in a new issue