Miles Sound System SDK 7.2a

AIL_quick_startup

The function AIL_quick_startup initializes the quick integration system.

S32 AIL_quick_startup(
  S32 use_digital,
  S32 use_MIDI,
  U32 output_rate,
  S32 output_bits,
  S32 output_channels
);

In Parameters

use_digital
specifies whether you want to play digital sounds. Use one of the MILES_QUICK_DIGITAL_OPEN constants.
use_MIDI
specifies whether you want to play XMIDI files. Use one of the MILES_QUICK_MIDI_OPEN constants.
output_rate
specifies the desired digital audio output frequency rate (11025, 22050, etc.).
output_bits
specifies the desired digital audio output word size (8 or 16 bits).
output_channels
specifies the desired number of digital audio output channels (1 = mono, 2 = stereo, or an MSS_MC_SPEC enum value).

Returns

This function will return a non-zero value if the function succeeded. If it failed (zero return value), then AIL_last_error will contain the reason.

Discussion

This function must be called before any other quick API functions are used. You can use either the digital, XMIDI, or both systems simultaneously. You can pass in zeros for any of the output parameters, if you'd like MSS to choose the best value. Note that the output rate represents only the final output quality of the sound system - you can play any type of sound and MSS will convert it on-the-fly.

Call AIL_quick_shutdown to close the Quick Services.

You must call AIL_set_redist_directory to set your application's Miles directory before calling this function.

Under DOS, Wii, PS2 and MacOS 9, this function must not be invoked from an interrupt-based callback function.

Under the original Xbox, this function will open the DirectSound system.

The Xbox hardware always uses a fixed 48 Khz, 16-bit output, so the frequency, bits, and channels don't specify the output mode, but instead specify the default format of each sound buffer. You should set these parameters to those of the majority of your sound samples (if not, Miles will simply reset the format when you start the sound which is a little less efficient).

On the Xbox 360, this function will open the XAudio system.

On the Sony PS2, the driver is always opened in 48 kHz 16-bit stereo mode. The only meaningful channel configurations are MSS_MC_STEREO, MSS_MC_40_DTS, and MSS_MC_51_DTS.

On the Nintendo Wii, the driver is always opened in 32028 Hz 16-bit mode. Miles will use one or two AX voices.

On the Sony PS3, this function opens one of the libaudio ports for output. Miles for PS3 always uses 48 Khz, 32-bit floating point output.

Under MacOS, MSS will use the Sound Manager. There have been many versions of the Sound Manager, some of which behave better than others. If you have trouble, try downloading the latest version of QuickTime - this will get you the latest version of Sound Manager.

Under DOS, MSS will set the sound format preferences and then call AIL_install_DIG_INI to load a real-mode DOS driver.

For an understanding of the options available with the output_channels parameter, see the How do I use multi-channel sound output in Miles? FAQ.

Example files that use this function: Quick.C, Play.C


Group: Quick Integration Services
Related Sections: Miles DTS Provider for the Sony PS2, Miles Dolby Surround Provider, Miles SRS Circle Surround Provider
Related Functions: AIL_last_error, AIL_open_digital_driver, AIL_quick_handles, AIL_quick_shutdown, AIL_set_redist_directory, AIL_speaker_configuration, AIL_startup
Related Basic Types: MILES_QUICK_DIGITAL_OPEN, MILES_QUICK_MIDI_OPEN, MSS_MC_SPEC, S32, U32
Related FAQs: How do I initialize the Miles Sound System for use?, How do I use multi-channel sound output in Miles?

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