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 

pspaudiolib.c - some fixes

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



Joined: 22 Jun 2006
Posts: 70

PostPosted: Sat Aug 05, 2006 4:32 am    Post subject: pspaudiolib.c - some fixes Reply with quote

Well, you all know the pspaudiolib from the PSP SDK.

It creates 8 running Threads that kill your CPU if you are doing something other. Well i did a little change,

now the threads without a callback set are sleeped, and when you set a new call back the program wake up the thread.

Give a look @ http://85.25.18.122/pspaudiolib.c
Back to top
View user's profile Send private message
DeNitro



Joined: 16 Sep 2005
Posts: 4

PostPosted: Wed Aug 09, 2006 2:21 am    Post subject: Reply with quote

I just tried this out and it works great. Got a small FPS increase and it still works as well as the original (My app is using 1-2 audio channels).

Nice change Siberianstar =)

--DeNitro
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Aug 22, 2006 9:25 am    Post subject: Reply with quote

There are some problems here; for example it looks like you're now ignoring the "pdata" argument in pspAudioSetChannelCallback. Can you check that, and double check that things still work correctly with other applications that use pspaudiolib? Also, please send this as a patch, it's easier to see your changes & apply it that way.
Back to top
View user's profile Send private message
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Thu Aug 31, 2006 6:43 am    Post subject: Reply with quote

I can suggest another patch I have added, create the threads in user mode explicitely else, in case your main app is running in kernel mode, the audio threads will be in kernel mode too, that means :
- harder to kill
- no sound output in psplink
_________________
- TiTAN Art Division -
http://www.titandemo.org
Back to top
View user's profile Send private message Visit poster's website
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