ScanSample

Loads a truncated sample file.

Synopsis

Item ScanSample( char *Name, int32 BufferSize )

Description

This function is similar to LoadSample(), but allocates only as much memory as specified by BufferSize. It then loads as much of the sample data as will fit. This is handy for loading the first part of a very large sound file that won't fit in memory.

Arguments

Name
Name of an AIFF or AIFC file.
BufferSize
Amount of memory to allocate (in bytes).

Return Value

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

Caveats

Any loop points in an AIFF or AIFC file beyond the BufferSize cause this function to return an error.

Implementation

Folio call implemented in Audio folio V20.

Associated Files

audio.h

See Also

AttachSample(), DetachSample(), SetAudioItemInfo(), LoadSample(), UnloadSample(), DebugSample(), CreateSample(), GetAudioItemInfo()