pspaudiolib.c - some fixes

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

Moderators: cheriff, TyRaNiD

Post Reply
siberianstar
Posts: 70
Joined: Thu Jun 22, 2006 9:24 pm

pspaudiolib.c - some fixes

Post by siberianstar »

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
DeNitro
Posts: 4
Joined: Fri Sep 16, 2005 5:13 pm

Post by DeNitro »

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
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

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.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

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
Post Reply