BASS_SampleLoad

Loads a WAV, AIFF, MP3, MP2, MP1 or OGG sample.

  Syntax
Return HSAMPLE = BASS_SampleLoad(file, max, flags)
  Parameters
filename
String
Filename.
max
Integer
Maximum number of simultaneous playbacks... 1 (min) - 65535 (max).
flags
DWORD
Any combination of these flags.
BASS_SAMPLE_FLOAT Use 32-bit floating-point sample data.
BASS_SAMPLE_MONO Decode/play the stream (MP3/MP2/MP1 only) in mono, reducing the CPU usage (if it was originally stereo). This flag is automatically applied if BASS_DEVICE_MONO was specified when calling BASS_Init.
BASS_SAMPLE_SOFTWARE Force the stream to not use hardware mixing.
BASS_SAMPLE_3D Enable 3D functionality. This requires that the BASS_DEVICE_3D flag was specified when calling BASS_Init, and the stream must be mono.
BASS_SAMPLE_LOOP Loop the file.
BASS_STREAM_PRESCAN Enable pin-point accurate seeking (to the exact byte) on the MP3/MP2/MP1 stream. This also increases the time taken to create the stream, due to the entire file being pre-scanned for the seek points.
BASS_STREAM_AUTOFREE Automatically free the stream when playback ends.
BASS_STREAM_DECODE Decode the sample data, without playing it.

  Returns

If successful, the loaded sample's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.

  See also

List of commans
Main page



Hosted by uCoz