line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Audio::File::Flac::AudioProperties; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
13
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
63
|
|
5
|
1
|
|
|
1
|
|
9
|
use base qw( Audio::File::AudioProperties ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1558
|
|
6
|
|
|
|
|
|
|
use Audio::FLAC::Header |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
159
|
our $VERSION = '0.02'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
234
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
12
|
1
|
50
|
|
|
|
10
|
$self->{flac} = Audio::FLAC::Header->new( $self->{filename} ) or return; |
13
|
1
|
|
|
|
|
465
|
my $flacinfo = $self->{flac}->info(); |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
16
|
$self->length( $self->{flac}->{trackTotalLengthSeconds} ); |
16
|
1
|
|
|
|
|
8
|
$self->bitrate( $self->{flac}->{bitRate} ); |
17
|
1
|
|
|
|
|
6
|
$self->sample_rate( $flacinfo->{SAMPLERATE} ); |
18
|
1
|
|
|
|
|
11
|
$self->channels( $flacinfo->{NUMCHANNELS} ); |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
4
|
return 1; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |