Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

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

 

Creates a sample stream from an MP3, MP2, MP1, OGG, WAV, AIFF or plugin supported file.

 

Syntax

 

hStream = TBASS_StreamCreateFile (Memory, FileName, Offset, Lenght, Flags)

 

Returns

 

Number

If successful, the new stream's handle is returned, else 0 is returned. Use %TBASS_ErrorGetCode to get the error code.

 

Parameters

 

Name

Type

Optional

Meaning

Memory

Number

No

%TBASS_TRUE = stream the file from memory.

FileName

String/Number

No

Filename (Memory = %TBASS_FALSE) or a memory location (Memory = %TBASS_TRUE).

Offset

Number

No

File offset to begin streaming from (only used if Memory = %TBASS_FALSE).

Lenght

Number

No

Data length... 0 = use all data up to the end of the file (if Memory = %TBASS_FALSE).

Flags

Number

No

Any combination of these flags.

 

Flag

Meaning

%TBASS_SAMPLE_FLOAT

Use 32-bit floating-point sample data. Not really recommended for samples as it (at least) doubles the memory usage.

 

%TBASS_SAMPLE_MONO

Convert the sample to mono, if it is not already mono. This flag is automatically applied if %TBASS_DEVICE_MONO was specified when calling TBASS_Init.

%TBASS_SAMPLE_SOFTWARE

Force the sample to not use hardware DirectSound mixing.

%TBASS_SAMPLE_3D

Enable 3D functionality. This requires that the %TBASS_DEVICE_3D flag was specified when calling TBASS_Init, and the sample must be mono.

%TBASS_SAMPLE_LOOP

Looped? Note that only complete sample loops are allowed, you cannot loop just a part of the sample. More fancy looping can be achieved by streaming the file.

%TBASS_SAMPLE_FX


%TBASS_STREAM_PRESCAN


%TBASS_STREAM_AUTOFREE


%TBASS_STREAM_DECODE


%TBASS_SPEAKER_xxx


%TBASS_UNICODE


 

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software