Author Topic: metaData  (Read 420 times)

Dorian

  • Guest
metaData
« on: 26 Aug '23 - 19:28 »
Hi, anyone has a sample objc code on how to retrieve metadata, i.e. artistName, albumName, sampleRate, etc...?

Thanks!

Ian @ un4seen

  • Administrator
  • Posts: 26108
Re: metaData
« Reply #1 on: 28 Aug '23 - 13:09 »
The sample rate is available from BASS_ChannelGetInfo (see the "freq" value). Artist and album names will depend on what tags (if any) the file contains. When it's available, the easiest way to get that info is probably to use the TAGS add-on. For example, like this:

Code: [Select]
const char *artist = TAGS_Read(handle, "%ARTI");
const char *album = TAGS_Read(handle, "%ALBM");

Please see the "readme" file included with the TAGS add-on for details.

Dorian

  • Guest
Re: metaData
« Reply #2 on: 28 Aug '23 - 19:42 »
Thank you very much!