| Miles Sound System SDK 7.2a |
The function AIL_file_read loads a data file into the specified memory address, optionally allocating the memory as well.
void * AIL_file_read( char const * filename, void *dest ); |
If *dest was NULL, then this function will return the pointer to the new memory block. If *dest was an address, then this function will just return *dest. If an error occurred, then this function will return NULL - use AIL_file_error and AIL_last_error to get the specific error.
If you use this function to allocate the memory for you, then you must free the pointer it returns with AIL_mem_free_lock or your application will leak.
Under DOS and MacOS 9, this function must not be invoked from an interrupt-based callback function.
Example files that use this function: DEMO.C
Group:
Memory and File Services
Related Functions:
AIL_file_error, AIL_file_fss_read, AIL_file_size, AIL_file_write, AIL_last_error, AIL_mem_alloc_lock, AIL_mem_free_lock, AIL_set_file_async_callbacks, AIL_set_file_callbacks
Related Basic Types:
char const *, void, void *
Related FAQs:
How careful do I have to be when shutting down?, How do I play a digital sound?, How do I play an XMIDI file with a DLS instrument set?, How do I play an XMIDI or MIDI file?
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.