Hello everyone,
I've recently tried to add wifi support to one of my apps, which (in case of fw 1.50) involves starting up my app in kernel mode (the application was originally a user-mode application), then spawning off a user-mode thread to do the usual stuff (setting up callbacks, initting sound, etc...).
It seems like everything works fine, except my sound thread no longer works as usual. Sound is distorted and seems to skip, which I cannot explain.
The main user-mode thread is started as follows:
sceKernelCreateThread("User Mode Thread", user_main,
0x11, // default priority
256 * 1024, // stack size (256KB is regular default)
PSP_THREAD_ATTR_USER, NULL);
Here's how my app starts the sound thread:
sceKernelCreateThread(label, (void*)&AudioChannelThread, 0x12, 0x10000,
0, NULL);
My (older) user-mode init:
/* User mode */
PSP_MODULE_INFO(PSP_APP_NAME, 0, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
New kernel-mode init:
/* Kernel mode */
PSP_MODULE_INFO(PSP_APP_NAME, 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
Am I doing something wrong? My understanding is that the sound thread should still run exactly as before, seeing as how the stack size, priority and attributes are still the same.
Appreciate any help
Kernel mode vs. user mode
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm