Miles Sound System SDK 7.2a

RAD_IOPHardwareVolumes

The function RAD_IOPHardwareVolumes sets the sound core hardware volumes.

S32 RAD_IOPHardwareVolumes(
  U32 which_core,
  S32 master_core_left,
  S32 master_core_right,
  S32 pcm_channel_left,
  S32 pcm_channel_right
);

In Parameters

which_core
Specifies a 0 or 1 for which of the sound cores to control.
master_core_left
Specifies a linear volume level from 0 to 0x3fff for the core's master left speaker out. If you don't want to set this volume level, pass -1.
master_core_right
Specifies a linear volume level from 0 to 0x3fff for the core's master right speaker out. If you don't want to set this volume level, pass -1.
pcm_channel_left
Specifies a linear volume level from 0 to 0x7fff for the pcm channel's left speaker out. If you don't want to set this volume level, pass -1.
pcm_channel_right
Specifies a linear volume level from 0 to 0x7fff for the pcm channel's right speaker out. If you don't want to set this volume level, pass -1.

Returns

Returns non-zero on success, or zero on failure.

Discussion

This function sets the hardware sound volumes. Unless you have previously set the master volumes, you will need to call this function at least once to establish the levels.

The master volume controls the volume of all voices on that chip (including the ADPCM voices). The pcm channel volume just sets the pcm channel. All Bink and Miles voices use the same IOP voice, so you should use this function to just set baselines, and then use normal Bink or Miles function calls to set volumes on a per-source basis.

Note that sound core 0 feeds into sound core 1, so if you use core 0, then you also have to turn the core 1 master volume, or you won't hear anything.


Group: The RAD_IOP API for the Sony PS2
Related Basic Types: S32, U32

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