line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MP3::Cut::Gapless::Track; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
369
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
8
|
|
|
8
|
1
|
11
|
my $class = shift; |
7
|
|
|
|
|
|
|
|
8
|
8
|
|
|
|
|
9
|
my $self; |
9
|
|
|
|
|
|
|
|
10
|
8
|
50
|
|
|
|
20
|
if ( ref $_[0] eq 'Audio::Cuefile::Parser::Track' ) { |
11
|
8
|
|
|
|
|
203
|
$self = { |
12
|
|
|
|
|
|
|
start_ms => _parseMSF( $_[0]->index ), |
13
|
|
|
|
|
|
|
performer => $_[0]->performer, |
14
|
|
|
|
|
|
|
position => $_[0]->position, |
15
|
|
|
|
|
|
|
title => $_[0]->title, |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
8
|
|
|
|
|
137
|
bless $self, $class; |
20
|
|
|
|
|
|
|
|
21
|
8
|
|
|
|
|
26
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
8
|
|
|
8
|
1
|
77
|
sub position { $_[0]->{position} } |
25
|
0
|
|
|
0
|
1
|
0
|
sub performer { $_[0]->{performer} } |
26
|
0
|
|
|
0
|
1
|
0
|
sub title { $_[0]->{title} } |
27
|
0
|
|
|
0
|
1
|
0
|
sub index { $_[0]->{index} } |
28
|
0
|
|
|
0
|
1
|
0
|
sub start_ms { $_[0]->{start_ms} } |
29
|
0
|
|
|
0
|
1
|
0
|
sub end_ms { $_[0]->{end_ms} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _parseMSF { |
32
|
8
|
|
|
8
|
|
52
|
my $msf = shift; |
33
|
|
|
|
|
|
|
|
34
|
8
|
|
|
|
|
26
|
my ($min, $sec, $frm) = split /:/, $msf, 3; |
35
|
|
|
|
|
|
|
|
36
|
8
|
|
|
|
|
197
|
return sprintf "%d", ((60 * $min) + $sec + ($frm / 75)) * 1000; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |