mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 16:41:22 +00:00
Fixed problem with looping of particular music tracks
Part of https://forum.zdoom.org/viewtopic.php?t=56333
This commit is contained in:
parent
26325edddc
commit
bdac1c3ad1
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ bool SndFileSong::Read(SoundStream *stream, void *vbuff, int ilen, void *userdat
|
||||||
if (currentpos + framestoread > song->Loop_End)
|
if (currentpos + framestoread > song->Loop_End)
|
||||||
{
|
{
|
||||||
size_t endblock = (song->Loop_End - currentpos) * song->Channels * 2;
|
size_t endblock = (song->Loop_End - currentpos) * song->Channels * 2;
|
||||||
size_t endlen = song->Decoder->read(buff, endblock);
|
size_t endlen = song->Decoder->read(buff, 0 == endblock ? len : endblock);
|
||||||
if (endlen != 0)
|
if (endlen != 0)
|
||||||
{
|
{
|
||||||
buff = buff + endlen;
|
buff = buff + endlen;
|
||||||
|
|
Loading…
Reference in a new issue