Hello everyone,
I have got a first version of my cocos2d game up and running on android and so far it works on the emulator and an HTC Desire but when I test it on a Samsung Galaxy S wifi (normally the same hardware as a Samsung Galaxy S without the phone capabilities) the game has issues with the SimpleAudioEngine.
Sometime some sounds do not play but the biggest problem is that it freezes on "SimpleAudioEngine::sharedEngine()>preloadEffect" or SimpleAudioEngine::sharedEngine>playBackgroundMusic .
Here is what happens when the game freezes on preloadEffect
I have a scene A where I preload 2 sounds in the init and start some music
I replace that scene by another one, scene B
In scene A onExit I unload the sounds
From scene B I go back to scene A and the game freezes on the “preloadEffect” in the init with scene B still visible and the music still running
if it can be of any use here is the log:
01-18 15:02:44.003: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:44.027: INFO/InputReader: dispatchTouch::touch event’s action is 0
01-18 15:02:44.027: INFO/InputDispatcher: Delivering touch to current input target: action: 0, channel ‘40839900 org.cocos2dx.dcdl/org.cocos2dx.dcdl.DCDL (server)’
01-18 15:02:44.027: INFO/PowerManagerService: Ulight 3~~>7|0
01-18 15:02:44.031: DEBUG/LightsService: BUTTON : 182
01-18 15:02:44.046: WARN/SoundPool: sample 1 not READY
01-18 15:02:44.085: INFO/InputReader: dispatchTouch::touch event’s action is 1
01-18 15:02:44.089: INFO/InputDispatcher: Delivering touch to current input target: action: 1, channel ‘40839900 org.cocos2dx.dcdl/org.cocos2dx.dcdl.DCDL (server)’
01-18 15:02:44.101: WARN/SoundPool: sample 2 not READY
01-18 15:02:44.250: DEBUG/cocos2d-x debug info: MainMenuScene::onExit
01-18 15:02:44.285: ERROR/SensorManager: unregisterListener:: all sensors, listener = org.cocos2dx.lib.Cocos2dxAccelerometer@40558f08
01-18 15:02:45.003: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:46.003: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:46.687: DEBUG/DataRouter: fd is 22 Content read is PDA USB
01-18 15:02:46.687: DEBUG/DataRouter: length is 8
01-18 15:02:47.003: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:47.089: WARN/PowerManagerService: Timer 0x7~~>0x3|0x0
01-18 15:02:47.089: INFO/PowerManagerService(118): Ulight 7~~>3|0
01-18 15:02:47.121: DEBUG/LightsService: BUTTON : 0
01-18 15:02:48.007: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:49.007: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:49.101: VERBOSE/AudioSink: stop
01-18 15:02:49.101: VERBOSE/AudioPolicyManager: stopOutput output 1, stream 3, session 25
01-18 15:02:49.101: VERBOSE/AudioPolicyManager: getNewDevice selected device 0
01-18 15:02:49.101: VERBOSE/AudioPolicyManager: setOutputDevice output 1 device 0 delayMs 0 force 0
01-18 15:02:49.101: VERBOSE/AudioPolicyManager: setOutputDevice setting same device 0 or null device for output 1
01-18 15:02:49.292: VERBOSE/PlayerDriver: HandleInformationalEvent: 23
01-18 15:02:49.296: VERBOSE/PlayerDriver: HandleInformationalEvent: 17
01-18 15:02:49.296: VERBOSE/PlayerDriver: CommandCompleted
01-18 15:02:49.347: VERBOSE/PlayerDriver: HandleInformationalEvent: 44
01-18 15:02:49.347: VERBOSE/PlayerDriver: HandleInformationalEvent: type=44 UNHANDLED
01-18 15:02:49.347: VERBOSE/ANDROID_DRM_TEST: notify
01-18 15:02:49.347: VERBOSE/PlayerDriver: CommandCompleted
01-18 15:02:49.347: VERBOSE/PlayerDriver: Completed command status=1
01-18 15:02:49.347: WARN/MediaPlayer: info/warning
01-18 15:02:49.347: INFO/MediaPlayer: Info
01-18 15:02:49.359: VERBOSE/AudioSink: flush
01-18 15:02:49.359: VERBOSE/AudioSink: start
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: startOutput output 1, stream 3, session 25
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: getDeviceForStrategy from cache strategy 0, device 2
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: getDeviceForStrategy from cache strategy 0, device 2
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: getNewDevice selected device 2
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: setOutputDevice output 1 device 2 delayMs 0 force 0
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: setOutputDevice setting same device 2 or null device for output 1
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: getDeviceForStrategy strategy 0, device 2
01-18 15:02:49.363: VERBOSE/AudioPolicyManager: getNewDevice selected device 2
01-18 15:02:49.363: DEBUG/AudioPolicyManager: return MUSIC_SPK index
01-18 15:02:49.363: DEBUG/VolumeCustomizer: getVolumetableIndex XEF��dԯ�gԯ#
01-18 15:02:49.363: DEBUG/VolumeCustomizer: getVolumetableIndex mSelectindex 2, count[6]
01-18 15:02:49.562: INFO/InputReader: dispatchTouch::touch event’s action is 0
01-18 15:02:49.566: INFO/InputDispatcher: Delivering touch to current input target: action: 0, channel ‘40839900 org.cocos2dx.dcdl/org.cocos2dx.dcdl.DCDL (server)’
01-18 15:02:49.566: INFO/PowerManagerService: Ulight 3~~>7|0
01-18 15:02:49.566: DEBUG/LightsService(118): BUTTON : 182
01-18 15:02:49.574: WARN/SoundPool(2194): sample 1 not READY
01-18 15:02:49.652: INFO/InputReader(118): dispatchTouch::touch event’s action is 1
01-18 15:02:49.652: INFO/InputDispatcher(118): Delivering touch to current input target: action: 1, channel ‘40839900 org.cocos2dx.dcdl/org.cocos2dx.dcdl.DCDL (server)’
01-18 15:02:49.664: WARN/SoundPool(2194): sample 2 not READY
01-18 15:02:49.667: DEBUG/cocos2d-x debug info(2194): MainMenuScene::init()
01-18 15:02:49.687: DEBUG/DataRouter(74): fd is 22 Content read is PDA USB
01-18 15:02:49.687: DEBUG/DataRouter(74): length is 8
01-18 15:02:49.769: DEBUG/cocos2d-x debug info(2194): preload Menu Effects
01-18 15:02:50.289: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:51.292: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:52.292: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:52.656: WARN/PowerManagerService(118): Timer 0x7~~>0x3|0x0
01-18 15:02:52.656: INFO/PowerManagerService: Ulight 7~~>3|0
01-18 15:02:52.691: DEBUG/DataRouter(74): fd is 22 Content read is PDA USB
01-18 15:02:52.691: DEBUG/DataRouter(74): length is 8
01-18 15:02:52.726: DEBUG/LightsService(118): BUTTON : 0
01-18 15:02:53.292: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:54.292: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:55.296: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:55.691: DEBUG/DataRouter(74): fd is 22 Content read is PDA USB
01-18 15:02:55.691: DEBUG/DataRouter(74): length is 8
01-18 15:02:56.300: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:57.300: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:58.304: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
01-18 15:02:58.695: DEBUG/DataRouter(74): fd is 22 Content read is PDA USB
01-18 15:02:58.695: DEBUG/DataRouter(74): length is 8
01-18 15:02:59.308: VERBOSE/PlayerDriver(76): HandleInformationalEvent: 23
Has anyone had similar issues on android devices or any ideas how to solve them?