0
0

I’m trying to use the

FSOUND_Stream_GetTagField( audioStream_, int , &tag_type, &tag_name, &tag_data, &tag_length )

function.

I’ve successfully been able to retrieve data from ID3v1 tags but I’m not sure what I’m getting in the tag_name parameter when int, the second param, is 2; an ID3v2 tag.

So I have this loop:

FSOUND_Stream_GetNumTagFields( pAudioStream_, &num_tags );
for( int i = 0; i < num_tags; ++i)
{
FSOUND_Stream_GetTagField( audioStream, i, &tag_type,
&tag_name, &tag_data, &tag_length );

//check if it's ID3v2
if( tag_type == FSOUND_TAGFIELD_ID3V2 )
{
//then check which field from the tag I have
           std::string info;
           info = tag_name;
}

the first time through the loop, tag_name is “TRCK” which I assume is track but I can’t seem to decipher the others.

Any Help?
Thanks

  • You must to post comments
0
0

The secong tag_name I’m getting is “TENC” and then “WXXX” then “TCOP” and so forth…

Where are these tag names coming from? If you look at ID3v2 tag info on an mp3 in winamp ID3v2’s have the same tag names as 1’s. How can I decipher these?

  • You must to post comments
0
0

Check out the ID3 standard here :

[url:1eslsnlf]http://www.id3.org/[/url:1eslsnlf]

It has details on all the tag names – it’s up to you how you display them in your program.

  • You must to post comments
0
0

Okay fair enough.

So it says on their site, for example, that TIT2 should contain the title tag and TPE1 should contain the artist / performer tag. So the void* from the FMOD function will point to the data from the TIT2, title tag. How do I get at the data that the void* points at?

I’m trying to cast to a char* but I don’t seem to be getting anything.

  • You must to post comments
0
0

[url:22axtr4n]http://www.id3.org[/url:22axtr4n]

Read the text encoding byte and interpret the string accordingly :

[quote:22axtr4n]Frames that allow different types of text encoding contains a text
encoding description byte. Possible encodings:

 $00   ISO-8859-1 [ISO-8859-1]. Terminated with $00.
 $01   UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All
       strings in the same frame SHALL have the same byteorder.
       Terminated with $00 00.
 $02   UTF-16BE [UTF-16] encoded Unicode [UNICODE] without BOM.
       Terminated with $00 00.
 $03   UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.[/quote:22axtr4n]

Or just skip the byte and cast to a char *. Most tags are ISO-8859-1 which is a normal ASCII string.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.