| 1 | package MP3::Cut::Gapless::Track; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 8 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 6 | 8 | my $class = shift; | |||||||||
| 7 | |||||||||||
| 8 | 8 | my $self; | |||||||||
| 9 | |||||||||||
| 10 | 8 | ▶ | if ( ref $_[0] eq 'Audio::Cuefile::Parser::Track' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 8 | $self = { | |||||||||
| 12 | start_ms => _parseMSF( $_[0]->index ), | ||||||||||
| 13 | performer => $_[0]->performer, | ||||||||||
| 14 | position => $_[0]->position, | ||||||||||
| 15 | title => $_[0]->title, | ||||||||||
| 16 | }; | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 8 | bless $self, $class; | |||||||||
| 20 | |||||||||||
| 21 | 8 | return $self; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 8 | ▶ | sub position { $_[0]->{position} } | ||||||||
|
Subroutine
position: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | 0 | ▶ | sub performer { $_[0]->{performer} } | ||||||||
|
Subroutine
performer: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 26 | 0 | ▶ | sub title { $_[0]->{title} } | ||||||||
|
Subroutine
title: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 27 | 0 | ▶ | sub index { $_[0]->{index} } | ||||||||
|
Subroutine
index: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 28 | 0 | ▶ | sub start_ms { $_[0]->{start_ms} } | ||||||||
|
Subroutine
start_ms: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | sub end_ms { $_[0]->{end_ms} } | ||||||||
|
Subroutine
end_ms: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | |||||||||||
| 31 | 8 | ▶ | sub _parseMSF { | ||||||||
|
Subroutine
_parseMSF: called CC=1 SCAR=0.0
| |||||||||||
| 32 | 8 | my $msf = shift; | |||||||||
| 33 | |||||||||||
| 34 | 8 | my ($min, $sec, $frm) = split /:/, $msf, 3; | |||||||||
| 35 | |||||||||||
| 36 | 8 | return sprintf "%d", ((60 * $min) + $sec + ($frm / 75)) * 1000; | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 1 | 1; | |||||||||
| 40 | __END__ | ||||||||||