LoadSample

Loads an AIFF or AIFC sample from file.

Synopsis

Item LoadSample( char *Name )

Description

This function allocates task memory and creates a sample item there that contains the digital-audio recording from the specified file. The file must be either an AIFF file or an AIFC file. These can be created using almost any sound development tool including AudioMedia, Alchemy, CSound, and SoundHack.

AIFC files contain compressed audio data. These can be created from an AIFF file using the SquashSound MPW tool from The 3DO Company.

A single loop is supported for sustained repetitive waveforms.

When you finish with the sample, you should call UnloadSample() to deallocate the resources.

Arguments

Name
The name of the AIFF or AIFC file.

Return Value

The function returns an item number if successful or an error code (a negative value) if an error occurs.

Implementation

Folio call implemented in Audio folio V20.

Associated Files

audio.h

See Also

AttachSample(), DetachSample(), SetAudioItemInfo(), UnloadSample(), DebugSample(), CreateSample(), ScanSample(), GetAudioItemInfo(), LoadSampleHere ()