Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleAudioEngine::playEffect() no response when activity enter foreground on android #8318

Closed
minggo opened this issue Sep 30, 2014 · 0 comments

Comments

@minggo
Copy link
Contributor

minggo commented Sep 30, 2014

Note

This issue is migrated from here. It was created at 2014/01/17 08:22:44 +0000

Description

How to reproduce the bug:

  1. Prepare an ogg file in Resources directory
  2. Invoke method SimpleAudioEngine::playEffect(“xxx.ogg”) in AppDelegate::applicationWillEnterForeground()
  3. Build & Run the android project. Press “Home”, then start the app again.

The screen of the phone will be black.

  • zhangbin added comment:
    Some results of debug:

  • This bug only happened in version 2.x

  • The reason is :

    OnLoadCompletedListener.onLoadComplete()

is not invoked after the method

mSoundPool.load()

in Cocos2dxSound.java.

  • joker added comment:
    seem not only ogg, but also mp3 will reproduce this bug.
    it is likely related to enter background event.
@minggo minggo closed this as completed May 6, 2015
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

No branches or pull requests

1 participant