Skip to content

Conversation

@timlyeee
Copy link
Contributor

@timlyeee timlyeee commented Feb 10, 2022

* IOS system has an uncertain state between foreground and background, and our condition sometimes miss the point to load buffers.
* Queue for 3 buffers might be too short to live, use 4 or even more instead.
@minggo minggo requested a review from dumganhar February 10, 2022 10:12
@dumganhar
Copy link
Contributor

Ref:cocos/cocos-engine#10094

@minggo minggo merged commit 9049cef into cocos:v3.4.2 Feb 14, 2022
@frozax
Copy link

frozax commented Feb 25, 2022

It didn't fix the issue in my case (looping audio stops randomly, not necessarily at the loop section).

@timlyeee
Copy link
Contributor Author

It didn't fix the issue in my case (looping audio stops randomly, not necessarily at the loop section).

@frozax Any issue related? Or could you describe it with details?

@frozax
Copy link

frozax commented Feb 26, 2022

It didn't fix the issue in my case (looping audio stops randomly, not necessarily at the loop section).

@frozax Any issue related? Or could you describe it with details?

You're right it's missing some information, I'm sorry. On my 9 games, only one has music. It's a loop of 49 seconds. On iOS, it's a wav file of 4.19 Mb. I'm using cocos2dx 3.17.2, experimental::AudioEngine. On Android, I don't have any issue (using a 356k ogg of 49 seconds).
I've seen it happen regularly on a iPad Mini running iOS 11 (I think, I'll have to check with the owner), it happens usually between 1-10 minutes of gameplay. Once the music stopped, the AudioEngine::getState return that it's NOT AudioState::PLAYING (I can't tell more) and I can restart it again.
Hope this helps

@timlyeee
Copy link
Contributor Author

timlyeee commented Mar 1, 2022

Thank you for your information, we will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants