Miles Sound System SDK 7.2a

AIL_set_sample_51_volume_pan

The function AIL_set_sample_51_volume_pan controls a sample's playback volume and pan values when using multichannel discrete output modes.

void AIL_set_sample_51_volume_pan(
  HSAMPLE S,
  F32 volume,
  F32 pan,
  F32 fb_pan,
  F32 center_scale,
  F32 sub_scale
);

In Parameters

S
indicates the sample whose volume is to be set.
volume
is a volume level from 0 (minimum) to 1.0 (maximum) in loudness (0.5 is 10 dB down).
pan
is a power pan level from 0 (hard-left) to 1.0 (hard-right).
fb_pan
is a front to back power pan level from 0 (front) to 1.0 (back).
center_scale
is a volume multipler for the center channel from 0 (minimum) to 1.0 (maximum) - this is multiplied by the volume level above.
sub_scale
is a volume multipler for the subwoofer channel from 0 (minimum) to 1.0 (maximum) - this is multiplied by the volume level above.

Discussion

This function is available on all software-mixed platforms, as well as on the Xbox. Parameters that don't correspond to an available speaker in the HDIGDRIVER's current mode will be ignored.

Levels calculated by this function are multiplied with any values arising from 3D positioning and/or the use of the AIL_set_sample_channel_levels function. This function is intended primarily for use as a "shortcut" for multichannel applications, notably on the Xbox and Xbox 360 platforms (which are always treated as 5.1-channel platforms by Miles). The volume setting is linear in loudness (not amplitude) - using 0.5 is equivalent to 10 dB down. Use AIL_set_sample_51_volume_levels to set volumes linear in amplitude.

All sample volume scaling occurs at full sample precision.

When a sample handle is initialized by AIL_init_sample, the sample's volume value is set to 1.0 and the pan values are set to 0.5.

The pan setting is a power-pan function (DLS standard). Sliding the pan from left to right adjusts the internal volume as well, such that the sound appears to remain at the same audible level as it pans across the speakers.


Group: Digital Audio Services
Related Sections: Sound under Xbox, Sound under Xbox 360
Related Functions: AIL_init_sample, AIL_sample_51_volume_pan, AIL_sample_volume_pan, AIL_set_sample_51_volume_levels, AIL_set_sample_channel_levels, AIL_set_sample_reverb_levels, AIL_set_sample_volume_pan
Related Basic Types: F32, HSAMPLE, void

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