Wma/AudioProperties.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.6% 29 / 30 CC 2 SCAR 2.9
CC
2
Cov
96%
init
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Wma.pm ↑ Summary
1 package Audio::File::Wma::AudioProperties;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw( Audio::File::AudioProperties );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Audio::WMA;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.02';
9  
10 1 ▶sub init {
Subroutine init: called CC=2 SCAR=7.0
Pod documented
11 1 my $self = shift;
12 1 ▶ $self->{wma} = Audio::WMA->new( $self->{filename} ) or return;
Branch: 1 branch
BranchTrueFalseTotal
$self->{"wma"} = "Audio::WMA"->new($self->{"filename"}) or return 1 0 1
13 1 my $info = $self->{wma}->info;
14  
15 1 $self->length( $info->{playtime_seconds} );
16 1 $self->bitrate( $info->{bitrate} );
17 1 $self->sample_rate( $info->{sample_rate} );
18 1 $self->channels( $info->{channels} );
19
20 1 return 1;
21 }
22  
23 1 1;
« Wma.pm ↑ Summary