<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > TBASS (Sound Module) > Streams > TBASS_StreamCreateFile |
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.
|
Remarks
Restrictions
See also
Examples