Creates a sample stream from a WebM file via a user callback function.
Namespace: Un4seen.Bass.AddOn.WebM
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("basswebm.dll", CharSet = CharSet.Auto)] public static int BASS_WEBM_StreamCreateFileUser( BASSStreamSystem system, BASSFlag flags, BASS_FILEPROCS procs, IntPtr user, int track )
Parameters
- system
- Type: Un4seen.BassBASSStreamSystem
File system to use: see BASSStreamSystem. - flags
- Type: Un4seen.BassBASSFlag
Any combination of these flags: see BASSFlag.BASS_WEBM_DOP Produce DSD-over-PCM data (with 0x05/0xFA markers). DSD-over-PCM data is 24-bit, so the BASS_SAMPLE_FLOAT flag is required. BASS_WEBM_RAW Produce raw WebM data instead of PCM. The WebM data is in blocks of 8 bits (1 byte) per-channel with the MSB being first/oldest. WebM data is not playable by BASS, so the BASS_STREAM_DECODE flag is required. - procs
- Type: Un4seen.BassBASS_FILEPROCS
The user defined file functions (see BASS_FILEPROCS). - user
- Type: SystemIntPtr
User instance data to pass to the callback functions. - 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: Int32If successful, the new stream's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
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).
Examples
See Also