Miles Sound System SDK 7.2a

AIL_serve

The function AIL_serve provides periodic foreground service to the Miles Sound System to avoid "starvation" during periods when the application does not yield control frequently.

void AIL_serve();

Discussion

Under Windows, you only need to call this function when you won't be yielding to the Windows messaging system regularly. So, if you have a situation where you won't be calling PeekMessage or GetMessage, then you should try to call this function more than 5 times a second, but less than 20 times a second. If you call this function less than 5 times a second, the system can starve and sound will start breaking up. If you call this function more than 20 times a second, then system performance will be adversely affected.

At typical output sample rates, the Windows MSS digital audio system can maintain background playback for at least 500 milliseconds without receiving foreground timer service internally. Applications which need to continue digital audio playback during disk access, movie playback or other situations which tend to "starve" the Windows message queue should call AIL_serve as frequently as possible to help avoid sound dropouts.

Under MacOS, this function will pump the QuickTime MIDI services, if you are currently playing a MIDI file through QuickTime.

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

You may have to use this function periodically under Win32 when reading huge amounts of data off a CD-ROM or hard-drive that is still using a 16-bit driver.

This function is not supported under DOS.


Group: System Services
Related Sections: Sharing the CPU under MacOS
Related Functions: AIL_auto_service_stream, AIL_get_timer_highest_delay, AIL_serve, AIL_service_stream
Related Basic Types: MILES_PREFERENCES, void
Related FAQs: My sound is skipping on Windows or MacOS X - what can I do?

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