Hard times with pspaudiolib

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
MrMr[iCE]
Posts: 43
Joined: Mon Oct 03, 2005 4:55 pm

Hard times with pspaudiolib

Post by MrMr[iCE] »

Several people have requested I implement suspend support into my game, snakeSP. So I hooked the power callback and managed to get the game to restart on resume, with one hitch: I never get audio back.

When app enters suspend, I set a flag in the main app thread so it will shutdown audio and gu operations, and enter a vblank wait loop until its done. In my audio manager I do this:

Code: Select all

void stopSoundManager() {
	pspAudioEndPre();
	sceDisplayWaitVblankStart();
	sceDisplayWaitVblankStart();
	sceDisplayWaitVblankStart();
	pspAudioEnd();
}
For some reason, without the pspAudioEndPre and the vblank waits, the 4 audio threads audiot0, t1, t2, t3 would not go away on resume, and I would see 2 copies of them in thlist in psplink. Now I see only the 4 threads, but I still hear nothing.

On load and resume, my sound manager loads up samples and a music loop into ram, and should immediately start playing the music loop. I see the loads off the MS, but no sound, yet everything else works. When I load the audio, I check if data was already there, free it, initialize everything to a blank state, and start over as if the app was just loaded.

Am I missing something? volume settings? those audiotN threads not behaving on me? I dont know much about the audio system, any help would be appreciated.
Post Reply