Navigation:  thinBasic Modules > TBASS > Streams >

TBASS_StreamCreateFile

Previous pageReturn to chapter overviewNext page

 

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


%TBASS_SAMPLE_MONO


%TBASS_SAMPLE_SOFTWARE


%TBASS_SAMPLE_3D


%TBASS_SAMPLE_LOOP


%TBASS_SAMPLE_FX


%TBASS_STREAM_PRESCAN


%TBASS_STREAM_AUTOFREE


%TBASS_STREAM_DECODE


%TBASS_SPEAKER_xxx


%TBASS_UNICODE


 

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com