Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: MP3::Tag - Leading zeros on 'track' truncated

by martin (Pilgrim)
on Jan 17, 2008 at 11:50 UTC ( #662851=note: print w/ replies, xml ) Need Help??


in reply to MP3::Tag - Leading zeros on 'track' truncated

The track number available in an ID3v1 tag is a small unsigned integer number stored in a single byte. If you retrieve this information once MP3::Tag has stored it in such a tag you will only get a numerical value back, without fancy formatting.

The documentation you quote refers to parse_rex() -- a method not related to your code.

If you want to find out about the conversion from a Perl scalar holding some numerical value into a raw byte look out for the pack function.

Example:

$x = pack 'C', 65; print "$x\n"; # prints the letter A $n = unpack 'C', $x; print "$n\n"; # prints the number 65


Comment on Re: MP3::Tag - Leading zeros on 'track' truncated
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://662851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-09-02 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls