Miles Sound System SDK 7.2a

MSS_RESOURCE_POLICY

The basic type MSS_RESOURCE_POLICY specifies a usage policy for the AIL_set_scratchpad_policy function.

Fundamental Values

 Value  Description
 MSS_DO_NOT_USE MSS will not use the PS2 scratchpad RAM under any conditions.

This is the default scratchpad policy.
 MSS_USE_AND_SAVE MSS will use the PS2 scratchpad for certain tasks, and will save and restore its contents at interrupt time to avoid conflicts with any other users of the scratchpad.
 MSS_USE_WITHOUT_SAVING MSS will use the PS2 scratchpad for certain tasks, and will NOT preserve its contents at interrupt time.

This policy should be selected only if your application (and any of its other libraries) will not make use of the scratchpad.
 MSS_USED Reserved for internal use.

Discussion

By default, MSS does not use the PS2 scratchpad. However, certain operations (currently limited to MP3 decoding and DTS encoding) can be accelerated slightly by giving MSS permission to store intermediate results in SPRAM.

If your application does not require MP3 or DTS support, then you do not need to change the scratchpad-usage policy. If your application uses Miles's MP3 or DTS support but otherwise does not use the scratchpad RAM for anything including mixed foreground and background calls to the MP3 decoder, you can call this function with MSS_USE_WITHOUT_SAVING. If you need to be able to use the scratchpad with interrupts enabled, but would like the interrupt-driven parts of MSS to use it as well, you should pass MSS_USE_AND_SAVE to this function. (Saving and restoring the scratchpad contents imposes a performance cost of its own, so we can run a little faster if we don't have to preserve the scratchpad contents at interrupt time.)

You can change the scratchpad-usage policy at any time. However, any requested changes made to Miles's scratchpad-usage policy will not take effect until the next end-of-buffer interrupt that Miles receives from the IOP. At that time, the value reported by AIL_scratchpad_policy will change to reflect the new policy. Note that any foreground calls made by the application that end up calling the MP3 decoder to decompress audio data will not save the scratchpad contents under any conditions. This means that if you need to disable scratchpad usage in preparation for a foreground call to AIL_process_digital_audio or a similar function, you'll want to poll AIL_scratchpad_policy first until your requested change takes effect.


Group: Low-Level Sony PlayStation 2 Support Services
Related Functions: AIL_process_digital_audio, AIL_scratchpad_policy, AIL_set_scratchpad_policy

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.