mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Avoid another loop for decoding audio
This commit is contained in:
parent
3829bbfeca
commit
6bc526b74d
@ -401,7 +401,7 @@ public:
|
|||||||
|
|
||||||
while(total < len)
|
while(total < len)
|
||||||
{
|
{
|
||||||
while(mFramePos >= mFrameSize)
|
if(mFramePos >= mFrameSize)
|
||||||
{
|
{
|
||||||
/* We have already sent all our data; get more */
|
/* We have already sent all our data; get more */
|
||||||
mFrameSize = audio_decode_frame(mFrame);
|
mFrameSize = audio_decode_frame(mFrame);
|
||||||
@ -413,6 +413,7 @@ public:
|
|||||||
|
|
||||||
mFramePos = std::min<ssize_t>(mFrameSize, sample_skip);
|
mFramePos = std::min<ssize_t>(mFrameSize, sample_skip);
|
||||||
sample_skip -= mFramePos;
|
sample_skip -= mFramePos;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t len1 = len - total;
|
size_t len1 = len - total;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user