On 2010-9月-17 金 09:42:04, w29 wrote:
Show quoted text> Hi
>
> I've been using the Audio::Flac::Header module in Perl to manage my
> music collection.
> Everything works fine (and thanks a lot for developping the module), but
> I think that I've found a little bug.
> When I ask the bits per sample (BITSPERSAMPLE), the result is always 6.
> Normally it should be 16.
>
> I hope I've found a problem (and it's not me :D). Thanks in advance.
Hi,
I happened to find same problem today (and visit here just now!)
If you are using pure perl version, look for the line below in Header.pm
(maybe you'll find at line 395)
$info->{'BITSPERSAMPLE'} = unpack('N', pack('B32', substr($x32 .
substr($metaBinString, 100, 5), -32))) + 1;
I have changed this line as
$info->{'BITSPERSAMPLE'} = unpack('N', pack('B32', substr($x32 .
substr($metaBinString, 103, 5), -32))) + 1;
then my 16 & 24 bit flac files gave me "16" or "24".
Wish this your help.
Tetsuya