Vuott: Estoy usando tu ejemplo de Extern con la librería TagLib y funciona bien y rápido para extraer metadatos de los archivos de música.
https://www.gambas-it.org/wiki/index.php...i_Libtag_c
Me interesa acceder a algunos datos mas pero luego de intentar un tiempo desistí.
Estos usando la información del sitio
https://taglib.org/
pero no logro implementar nada.
Deseo saber el codec del archivo, el artista del album, y el tipo de id3 y la versión.
En todos los intentos que hice, el código da error y dice que esa función no esta en libtag_c......
El código modificado es este:
Saludos.
https://www.gambas-it.org/wiki/index.php...i_Libtag_c
Me interesa acceder a algunos datos mas pero luego de intentar un tiempo desistí.
Estos usando la información del sitio
https://taglib.org/
pero no logro implementar nada.
Deseo saber el codec del archivo, el artista del album, y el tipo de id3 y la versión.
En todos los intentos que hice, el código da error y dice que esa función no esta en libtag_c......
El código modificado es este:
GAMBAS
- Library "libtag_c:0.0.0"
-
-
-
-
- ' 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.
-
- ' 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.
- 'taglib_set_strings_unicode(False)
- 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(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)
- Return inf
Saludos.
1 Saludo.