' void taglib_set_strings_unicode(BOOL unicode)
' By default all strings coming into or out of TagLib's C API are in UTF8.
' However, it may be desirable For TagLib To operate On Latin1(ISO - 8859 - 1) strings In which Case this should be set To FALSE.
' TagLib_File *taglib_file_new_type(const char *filename)
' Creates a TagLib file based on \a filename.
' TagLib_Tag *taglib_file_tag(const TagLib_File *file)
' Returns a pointer to the tag associated with this file.
' char *taglib_tag_title(const TagLib_Tag *tag)
' Returns a string with this tag's title.
' char *taglib_tag_artist(const TagLib_Tag *tag)
' Returns a string with this tag's artist.
' char *taglib_tag_album(const TagLib_Tag *tag)
' Returns a string with this tag's album name.
' unsigned int taglib_tag_year(const TagLib_Tag *tag)
' Returns the tag's year or 0 if year is not set.
' char *taglib_tag_comment(const TagLib_Tag *tag)
' Returns a string with this tag's comment.
' unsigned int taglib_tag_track(const TagLib_Tag *tag)
' Returns the tag's track number or 0 if track number is not set.
'Private Extern taglib_tag_encoder(tag As TagLib_Tag) As String
'Private Extern taglib_tag_volume_number(tag As TagLib_Tag) As Integer
' char *taglib_tag_genre(const TagLib_Tag *tag)
' Returns a string with this tag's genre.
' const TagLib_AudioProperties *taglib_file_audioproperties(const TagLib_File *file)
' Returns a pointer to the the audio properties associated with this file.
Private Extern taglib_file_audioproperties
(_file
As TagLib_File
) As TagLib_AudioProperties
' int taglib_audioproperties_length(const TagLib_AudioProperties *audioProperties)
' Returns the length of the file in seconds.
' int taglib_audioproperties_bitrate(const TagLib_AudioProperties *audioProperties)
' Returns the bitrate of the file in kb/s.
' int taglib_audioproperties_samplerate(const TagLib_AudioProperties *audioProperties)
' Returns the sample rate of the file in Hz.
' int taglib_audioproperties_channels(const TagLib_AudioProperties *audioProperties)
' Returns the number of channels in the audio stream.
' void taglib_tag_free_strings(void)
' Frees all of the strings that have been created by the tag.
' void taglib_file_free(TagLib_File *file)
' Frees and closes the file.
Dim auprop
As TagLib_AudioProperties
'taglib_set_strings_unicode(False)
taglib_set_strings_unicode
(True) fl = taglib_file_new(fileaudio)
autag = taglib_file_tag(fl)
inf.Add(taglib_tag_album(autag), "Album")
inf.Add(taglib_tag_artist(autag), "Artist")
inf.Add(taglib_tag_track(autag), "Track")
inf.Add(taglib_tag_title(autag), "Title")
inf.Add(taglib_tag_year(autag), "Year")
inf.Add(taglib_tag_genre(autag), "Genre")
inf.Add(taglib_tag_comment(autag), "Comment")
' Mostra le proprietà del file audio:
auprop = taglib_file_audioproperties(fl)
inf.
Add(True,
"AudioError") inf.Add(taglib_audioproperties_length(auprop), "Length")
inf.Add(taglib_audioproperties_bitrate(auprop), "Bitrate")
inf.Add(taglib_audioproperties_samplerate(auprop), "Frequency")
inf.Add(taglib_audioproperties_channels(auprop), "Channels")
' Va in chiusura:
taglib_tag_free_strings()
taglib_file_free(fl)