Retrieves the requested tags/headers from a stream channel, if they are available.
Namespace: Un4seen.Bass.AddOn.Tags
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- stream
- Type: SystemInt32
The stream channel to get the TAG information from. - tags
- Type: Un4seen.Bass.AddOn.TagsTAG_INFO
The TAG_INFO class where to put the data.
Return Value
Type: BooleanIf TAGs could be retrieved successfully is returned, else is returned.
Exceptions
Exception | Condition |
---|---|
NotSupportedException | Invalid/Unsupported tag version detected. |
FormatException | Invalid syncsafe integer found in tag data. |
Remarks
This method first evaluates the BASS_CTYPE_xxx for the stream, by calling the BASS_ChannelGetInfo(Int32, BASS_CHANNELINFO) function internally. Based on the retrieved BASSChannelType a call to the BASS_ChannelGetTags(Int32, BASSTag) function is made in order to retrieve the pointer to the tags/header data - if available. Finally this tag pointer is evaluated and the related tag/header data is evaluated.
This method is able to retrieve the following TAGs:
MP3, MP2, MP1 | BASS_TAG_ID3V2 first, then BASS_TAG_ID3, then BASS_TAG_APE, then BASS_TAG_RIFF_BEXT. |
OGG, FLAC, OPUS | BASS_TAG_OGG first, then BASS_TAG_APE |
WAV, BWF | BASS_TAG_RIFF_INFO first, then BASS_TAG_RIFF_BEXT. |
MF | BASS_TAG_MF. |
WMA | BASS_TAG_WMA |
MP4, AAC, ALAC | BASS_TAG_MP4 first, then BASS_TAG_ID3V2, then BASS_TAG_APE |
APE, MPC, OFR, WV | BASS_TAG_APE first, then BASS_TAG_ID3V2, then BASS_TAG_ID3 |
WINAMP | BASS_TAG_ID3V2 first, then BASS_TAG_APE |
SPX, AC3 | not available |
MOD | MOD music name and message are evaluated only. |
The following TAGs are combined in the following order (if multiple TAGs are found):
BASS_TAG_ID3V2 | BASS_TAG_ID3 + BASS_TAG_APE + BASS_TAG_ID3V2 |
BASS_TAG_ID3 | BASS_TAG_APE + BASS_TAG_ID3 |
BASS_TAG_WMA | BASS_TAG_WMA |
BASS_TAG_OGG | BASS_TAG_APE + BASS_TAG_OGG |
BASS_TAG_APE | BASS_TAG_ID3 + BASS_TAG_APE |
BASS_TAG_MP4 | BASS_TAG_APE + BASS_TAG_ID3V2 + BASS_TAG_MP4 |
BASS_TAG_RIFF_INFO | BASS_TAG_RIFF_BEXT + BASS_TAG_RIFF_CART + BASS_TAG_ID3V2 + BASS_TAG_RIFF_INFO |
Examples
// create a stream int stream = Bass.BASS_StreamCreateFile(fileName, 0, 0, BASSFlag.BASS_DEFAULT); // update the tags TAG_INFO tagInfo = new TAG_INFO(fileName); if ( BassTags.BASS_TAG_GetFromFile( stream, tagInfo) ) { // display the tags... }
See Also