BASS.NET API for the Un4seen BASS Audio LibraryBassWma ClassBASS.NET API for the Un4seen BASS Audio Library
BASS.NET API wrapper for BASSWMA.DLL

Requires: basswma.dll - Windows Media Audio Format (WMA) Add-On - available @ www.un4seen.com.

The Windows Media Format modules are also required to be installed on the user's system. They are installed with Windows Media Player, so will already be on most users' systems, but they can also be installed separately (WMFDIST.EXE).

Inheritance Hierarchy

SystemObject
  Un4seen.Bass.AddOn.WmaBassWma

Namespace: Un4seen.Bass.AddOn.Wma
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public sealed class BassWma

The BassWma type exposes the following members.

Properties

  NameDescription
Public propertyStatic memberBASS_WMA_IsDRMVersion
Return , if this version is a WMA DRM version - else .
Top
Methods

  NameDescription
Public methodStatic memberBASS_WMA_EncodeClose
Finishes encoding and closes the file or network port.
Public methodStatic memberBASS_WMA_EncodeGetClients
Retrieves the number of clients currently connected to the encoder.
Public methodStatic memberBASS_WMA_EncodeGetPort
Retrieves the network port for clients to connect to.
Public methodStatic memberCode exampleBASS_WMA_EncodeGetRates
Retrieves the WMA encoding bitrates available for a specified sample format.
Public methodStatic memberCode exampleBASS_WMA_EncodeOpen
Initializes WMA encoding to a user defined function.
Public methodStatic memberCode exampleBASS_WMA_EncodeOpenFile
Initializes WMA encoding to a file.

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

Public methodStatic memberCode exampleBASS_WMA_EncodeOpenNetwork
Initializes WMA encoding to the network.
Public methodStatic memberCode exampleBASS_WMA_EncodeOpenNetworkMulti
Initializes WMA encoding to the network, using multiple bitrates.
Public methodStatic memberBASS_WMA_EncodeOpenPublish
Initializes WMA encoding to a publishing point on a Windows Media server.

This overload implements the Unicode version for url, user and pass. BASS_UNICODE will automatically be added if not set.

Public methodStatic memberBASS_WMA_EncodeOpenPublishMulti
Initializes WMA encoding to a publishing point on a Windows Media server, using multiple bitrates.

This overload implements the Unicode version for url, user and pass. BASS_UNICODE will automatically be added if not set.

Public methodStatic memberCode exampleBASS_WMA_EncodeSetNotify
Sets a client connection notification callback on a network encoder.
Public methodStatic memberCode exampleBASS_WMA_EncodeSetTag(Int32, String, String)
Sets a tag in a WMA encoding (Unicode version).
Public methodStatic memberCode exampleBASS_WMA_EncodeSetTag(Int32, IntPtr, IntPtr, BASSWMATag)
Sets a tag in a WMA encoding.
Public methodStatic memberBASS_WMA_EncodeSetTag(Int32, String, IntPtr, Int32)
Sets a binary tag in a WMA encoding.
Public methodStatic memberCode exampleBASS_WMA_EncodeSetTag(Int32, String, String, BASSWMATag)
Sets a tag in a WMA encoding.
Public methodStatic memberCode exampleBASS_WMA_EncodeWrite(Int32, Byte, Int32)
Encodes sample data, and writes it to the file or network.

This overload uses a managed byte[] to handover sample data to the encoder (perfect for 8-bit samples).

Public methodStatic memberCode exampleBASS_WMA_EncodeWrite(Int32, Int16, Int32)
Encodes sample data, and writes it to the file or network.

This overload uses a managed short[] to handover sample data to the encoder (perfect for 16-bit samples).

Public methodStatic memberCode exampleBASS_WMA_EncodeWrite(Int32, Int32, Int32)
Encodes sample data, and writes it to the file or network.

This overload uses a managed int[] to handover sample data to the encoder (Note: An int[] is 32-bit. When using 16-bit samples we can keep a stereo pair in here).

Public methodStatic memberCode exampleBASS_WMA_EncodeWrite(Int32, IntPtr, Int32)
Encodes sample data, and writes it to the file or network.

This overload uses an IntPtr to point to the memory block containing the data.

Public methodStatic memberCode exampleBASS_WMA_EncodeWrite(Int32, Single, Int32)
Encodes sample data, and writes it to the file or network.

This overload uses a managed float[] to handover sample data to the encoder.

Public methodStatic memberBASS_WMA_GetTags
Get the tags from a file, can be used on DRM protected files (not thread-safe!).
Public methodStatic memberBASS_WMA_GetTagsArray
Get the tags from a file, can be used on DRM protected files (not thread-safe!).

This special helper method already evaluates the null-terminated and variable length data block using UTF-8 strings.

Public methodStatic memberCode exampleBASS_WMA_GetWMObject
Retrieves a pointer to the IWMReader interface of a WMA stream, or IWMWriter interface of a WMA encoder.
Public methodStatic memberCode exampleBASS_WMA_StreamCreateFile(IntPtr, Int64, Int64, BASSFlag)
Creates a sample stream from a WMA memory IntPtr.

This overload implements streaming from memory.

Public methodStatic memberCode exampleBASS_WMA_StreamCreateFile(String, Int64, Int64, BASSFlag)
Creates a sample stream from a WMA file.

This overload implements unicode filenames. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberBASS_WMA_StreamCreateFileAuth(IntPtr, Int64, Int64, BASSFlag, String, String)
Creates a sample stream from a WMA memory IntPtr.

This overload implements streaming from memory. Username and Password are UNICODE, so the BASS_UNICODE flag will be added automatically.

Public methodStatic memberBASS_WMA_StreamCreateFileAuth(String, Int64, Int64, BASSFlag, String, String)
Creates a sample stream from a WMA file.

This overload implements Unicode filenames, username and password. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberCode exampleBASS_WMA_StreamCreateFileUser
Creates a sample stream from a WMA file via a user callback function.
Public methodStatic memberBASS_WMA_StreamCreateIStream
Creates a sample stream from an IStream object.
Public methodStatic memberBASS_WMA_StreamCreateIStreamAuth
Creates a sample stream from an IStream object.

This overload implements UNICODE user name and password. The BASS_UNICODE flag will be added automatically, if not alreday set.

Public methodStatic memberBASS_WMA_StreamCreateURL
Creates a sample stream from a URL.

This overload implements Unicode urls. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberFreeMe
Unloads this library. This must be called when you have previously called LoadMe.
Public methodStatic memberCode exampleLoadMe
Loads this library into memory. The library will be search in the current application directory.
Public methodStatic memberCode exampleLoadMe(String)
Loads this library into memory. The library will be loaded from the given path.
Top
Fields

  NameDescription
Public fieldStatic memberSupportedStreamExtensions
Supported file extensions of the basswma.dll
Public fieldStatic memberSupportedStreamName
Supported file format name of the basswma.dll
Top
Remarks

BASSWMA is an extension to the BASS audio library, enabling the playback of WMA files and network streams. The audio tracks of WMV files can also be played. WMA file encoding and network broadcasting functions are also provided.

The WMA format is used in very much the same way as any of the built-in BASS stream formats - simply call the WMA stream creation function instead of the BASS built-in functions. The BASS plugin system (see BASS_PluginLoad(String)) is also supported for local WMA files.

More information can be found on Microsoft Windows Media — Your Digital Entertainment Resource.

See Also

Reference