BASS.NET API for the Un4seen BASS Audio Library

BassTagsBASS_TAG_GetFromFile Method (String)

BASS.NET API for the Un4seen BASS Audio Library
Retrieves the requested tags/headers from a file, if they are available.

Namespace:  Un4seen.Bass.AddOn.Tags
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static TAG_INFO BASS_TAG_GetFromFile(
	string file
)

Parameters

file
Type: SystemString
The fully qualified name of the file stream to get the TAG information from.

Return Value

Type: TAG_INFO
Returns a new TAG_INFO instance if successful. If TAGs could be retrieved successfully is returned.
Exceptions

ExceptionCondition
NotSupportedExceptionInvalid/Unsupported tag version detected.
FormatExceptionInvalid syncsafe integer found in tag data.
Remarks

Note: This method uses the BASS plug-in system and such supports all formats which are supported by BASS or any of its add-ons. So make sure to load all needed add-ons via BASS_PluginLoad(String).

This method first evaluates the file name extension. If using with a ".wma" or ".wmv" file and you are using the WMA DRM version, the WMA tags are received immediately. For all other file types an internal stream handle is created by using the plug-in system and calling BASS_StreamCreateFile(String, Int64, Int64, BASSFlag). If successful, the TAG_INFO is returned via BASS_TAG_GetFromFile(String) (see overload list). All members of the TAG_INFO structure will be updated. However, some files and tag structures might not support all members. This overload

Examples

Getting TAGs from a file directly:
TAG_INFO tagInfo = BassTags.BASS_TAG_GetFromFile(fileName);
if ( tagInfo != null )
{
  // display the tags...
}
See Also

Reference