This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Loads sample from file or memory.
Syntax
sample = TBASS_LoadSample(mem, source, offset, length, maxPlaybacks, flags)
Returns
Number, sample handle - non-zero in case of success.
Parameters
Name |
Type |
Optional |
Meaning |
||||||||||||||
mem |
Numeric |
No |
flag indicating if you want to load the sample from memory |
||||||||||||||
source |
String / Pointer |
No |
file name (if mem is FALSE), otherwise memory location of sample |
||||||||||||||
offset |
file offset to load the sample from (only used if mem is FALSE). |
||||||||||||||||
length |
Data length... 0 = use all data up to the end of file (if mem is FALSE). If length over-runs the end of the file, it will automatically be lowered to the end of the file. |
||||||||||||||||
maxPlaybacks |
Maximum number of simultaneous playbacks... 1 - 65535. Use one of the %TBASS_SAMPLE_OVER flags to choose the override decider, in the case of there being no free channel available for playback (ie. the sample is already playing maxPlaybacks times) |
||||||||||||||||
flags |
A combination of these flags
|
Remarks
Restrictions
See also
Examples
' Load sample from file on disk, as looping
DWord sample = TBASS_SampleLoad(%TBASS_FALSE, "C:\sounds\mysound.wav", 0, 0, 1, %TBASS_SAMPLE_LOOP)