Miles Sound System SDK 7.2a

AIL_set_file_async_callbacks

The function AIL_set_file_async_callbacks replaces the file I/O handlers that Miles uses for its high-level streaming functions on certain platforms.

void AIL_set_file_async_callbacks(
  AIL_file_open_callback opencb,
  AIL_file_close_callback closecb,
  AIL_file_seek_callback seekcb,
  AIL_file_async_read_callback areadcb,
  AIL_file_async_status_callback statuscb
);

In Parameters

opencb
specifies the callback function to be called when opening a file.
closecb
specifies the callback function to be called when closing a file.
seekcb
specifies the callback function to be called when seeking in a file.
areadcb
specifies the callback function to be called to initiate an asynchronous read from a file.
statuscb
specifies the callback function to be called when polling the status of an asynchronous file operation.

Discussion

Asynchronous file I/O is used by Miles's high-level streaming subsystem on the Wii, PS2, and MacOS 9 platforms. Most applications should permit Miles to do its own file management, but for those that cannot, this function may be called to provide an alternative set of asynchronous file I/O routines to Miles. These functions must be thread-safe.

Note that permitting Miles to maintain its own (potentially-redundant) handles to your audio data files imposes very little system overhead, and eliminates many potential bugs. You do not need to provide file callbacks simply to stream from a packed file; see the AIL_open_stream function for details on how to pass existing file handles and offsets to Miles.


Group: Memory and File Services
Related Functions: AIL_file_async_read_callback, AIL_file_async_status_callback, AIL_file_close_callback, AIL_file_open_callback, AIL_file_read, AIL_file_seek_callback, AIL_file_size, AIL_open_stream, AIL_set_file_callbacks
Related Basic Types: void
Related FAQs: How do I access files from a big packed file?

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