BASS.NET API for the Un4seen BASS Audio Library

BassWebMBASS_WEBM_StreamCreateFile Method (String, Int64, Int64, BASSFlag, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Creates a sample stream from a WebM file.

This overload implements UNICODE filenames. The BASS_UNICODE flag will be added automatically, since all .Net strings are always unicode.

Namespace:  Un4seen.Bass.AddOn.WebM
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.7
Syntax

public static int BASS_WEBM_StreamCreateFile(
	string file,
	long offset,
	long length,
	BASSFlag flags,
	int track
)

Parameters

file
Type: SystemString
Filename for which a stream should be created.
offset
Type: SystemInt64
File offset to begin streaming from.
length
Type: SystemInt64
Data length... 0 = use all data up to the end of the file.
flags
Type: Un4seen.BassBASSFlag
Any combination of these flags: see BASSFlag.
track
Type: SystemInt32
The track to play from the file... 1 = first, 0 = first playable track. When requesting the first playable track, all tracks will be checked in numerical order until a playable one is found. The active track is available via the BASS_ATTRIB_WEBM_TRACK attribute.

Return Value

Type: Int32
If successful, the new stream's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Works almost in the same way BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) does - so for details look there.

WebM is a subset of the Matroska file format. WebM files can contain Vorbis or Opus audio data, while Matroska also supports other codecs including AAC / AC3 / MP3. BASS includes support for Vorbis and MP3, and AAC on some platforms, but add-ons are required (loaded via BASS_PluginLoad) to support other codecs, eg. BASSOPUS for Opus. Not all Matroska features are supported but most Matroska files should be playable.

To stream a file from the internet, use BASS_WEBM_StreamCreateURL(String, Int32, BASSFlag, DOWNLOADPROC, IntPtr, Int32). To stream from other locations, see BASS_WEBM_StreamCreateFileUser(BASSStreamSystem, BASSFlag, BASS_FILEPROCS, IntPtr, Int32).

See Also

Reference