mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-07 15:35:40 +02:00
Stop Audio.bgm_pos from segfaulting if the source never actually loaded
This commit is contained in:
parent
3626ac072f
commit
2177823ed5
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ ALStream::State ALStream::queryState()
|
||||||
|
|
||||||
float ALStream::queryOffset()
|
float ALStream::queryOffset()
|
||||||
{
|
{
|
||||||
if (state == Closed)
|
if (state == Closed || !source)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
float procOffset = static_cast<float>(procFrames) / source->sampleRate();
|
float procOffset = static_cast<float>(procFrames) / source->sampleRate();
|
||||||
|
|
Loading…
Add table
Reference in a new issue