The default is 1024 samples per second when using pspaudiolib. Is there any way to increase this value to be 8192 instead?
I've tried the function sceAudioSetChannelDataLen but it had no effect and the callback still asks for 1024 samples.
My guess is to use pspaudio instead, but I'm a bit clueless on how it works exactly.
any way to increase PSP_NUM_AUDIO_SAMPLES?
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
There's sample code using pspaudio in the SDL port (src/audio/psp/SDL_pspaudio.c). Basically, once you reserve your channel(s) (you set the sample size explicitly) you call either sceAudioOutputBlocking() or sceAudioOutputPannedBlocking() to output mono or stereo sound, respectively. You need to call these in a thread that's running at a lower priority than your main() thread. If you don't have any audio to output for that frame, then call sceAudioOutput* with buffers filled with silence.
-
- Posts: 41
- Joined: Sat Jul 02, 2005 10:12 am
By default the main() thread is started with a priority of 32. You can override that by using a statement such as:
All of the PSPSDK sample code creates callbacks with a priority of 17 (dunno why :). You want the callback threads to have the lowest priority, so set your audio thread somewhere above that.
Code: Select all
PSP_MAIN_THREAD_PRIORITY(100);