Projects > cpp > Issues > Bug #3756

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

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

Bug #3756 [Closed]
zhangbin@cocos2d-x.org 2014-01-17 08:22 . Updated about 2 years ago

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@cocos2d-x.org 2014-01-20 10:21
  • Description updated (diff)

Some results of debug:
1. This bug only happened in version 2.x
2. The reason is :

OnLoadCompletedListener.onLoadComplete()

is not invoked after the method

mSoundPool.load()

in Cocos2dxSound.java.

joker 2014-03-06 06:09

seem not only ogg, but also mp3 will reproduce this bug.
it is likely related to enter background event.

zhangxm 2014-03-14 03:01
  • Description updated (diff)
  • Target version changed from 2.2.3 to 2.2.4
walzer@cocos2d-x.org 2014-10-08 02:48

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8318

Atom PDF

Status:Closed
Start date:2014-01-17
Priority:Normal
Due date:
Assignee:zhangbin@cocos2d-x.org
% Done:

0%

Category:android
Target version:2.2.4

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.