[API function]
For advanced users only.
Only used if users are getting conflicts with FMOD's command handler when writing IOP modules of their own or using other middleware that uses SIFCMD.
This function tells FMOD about the user's SIFCMD buffer that has been set with sceSifSetCmdBuffer, and the indicies into that sceSifCmdData array that FMOD can use.
The user may have specified a SIF command handler of their own before calling FSOUND_Init and loading FMOD.IRX when setting up their own IOP<->EE communication.
It simply enables FMOD to know the size, and what indicies into the sceSifCmdData array the user has set that FMOD can use.
It allows the user's app and FMOD to share the buffer that the user has created.
FMOD uses 2 sif handlers. A main one and secondary one.
sceSifAddCmdHandler(
YOURHANDLERINDEX ,
yourhandler ,
NULL
);
Parameters
buffersize |
The size of the sceSifCmdData array that the user has set.
|
bufferindexmain |
The index into the user created sceSifCmdData array for the primary FMOD sifcmd handler.
|
bufferindexsecondary |
The index into the user created sceSifCmdData array for the secondary FMOD sifcmd handler.
|
Return Value
void
Remarks
FMOD will automatically use the previously set command buffer, as sceSifSetCmdBuffer returns the previously set buffer which FMOD uses.
This is why you dont have to pass in the actual buffer itself.
-----------
IMPORTANT! FMOD.IRX must also be notified when it is initialized!
The IOP side of the command handler, which is initialized when FMOD.IRX is loaded, must also be notified of the user's IOP side buffer size and indicies.
By passing it as command line parameter with sceSifLoadModule, you can do this. If this is not done, unexpected results may occur.
The FMOD.IRX takes 3 parameters. They are simply 3 integers seperated by a space.
Parameter 1 is equal to 'buffersize'
Parameter 2 is equal to 'bufferindexmain'
Parameter 3 is equal to 'bufferindexsecondary'
------------
Here is an example of using sceSifLoadModule to notify FMOD.IRX of your IOP side sifCmd buffer size and command handler index.
sprintf(s, "4989424 1238404 205", CMDBUFSIZE, FMODINDEXMAIN, FMODINDEXSECONDARY); // NOTE : must be formatted as 3 integers seperated by a space.
sceSifLoadModule("host0:api/fmod.irx", strlen(s), s);
Then later on the EE side, before calling FSOUND_Init, you will call this function, ie
FSOUND_SetSifCommandInfo(CMDBUFSIZE, FMODINDEXMAIN, FMODINDEXSECONDARY);
And before any of this, you would have set up your own command handler with something like this.
sceSifInitCmd();
sceSifSetCmdBuffer(&yourcommandbuffer
See Also
FSOUND_Init
This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:37 2005
by SourceDoc v0.10, the automated source code documenter.