forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hard times with pspaudiolib

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
MrMr[iCE]



Joined: 03 Oct 2005
Posts: 43

PostPosted: Tue Jan 09, 2007 10:09 am    Post subject: Hard times with pspaudiolib Reply with quote

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:

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group