Branch Coverage

blib/lib/Audio/Analyzer.pm
Criterion Covered Total %
branch 32 74 43.2


line true false branch
61 33 0 if (defined $$self[0]) { }
64 1 32 unless (defined $pcm)
72 0 0 unless @samples
99 1 1 if (defined $freq_cache)
126 1 0 if (exists $opts{'file'}) { }
0 0 elsif (not defined $opts{'fileless'}) { }
127 0 1 unless (defined($file = $opts{'file'}))
134 0 1 unless (defined($dft_size = $opts{'dft_size'}))
138 0 1 unless (defined($sample_rate = $opts{'sample_rate'}))
142 0 1 unless (defined($channels = $opts{'channels'}))
146 0 1 if (defined($bits_per_sample = $opts{'bits_per_sample'})) { }
147 0 0 if ($bits_per_sample != 8 and $bits_per_sample != 16)
156 0 1 if (defined($fps = $opts{'fps'})) { }
0 1 elsif (defined $seek_step and not defined $file) { }
1 0 elsif (not defined($seek_step = $opts{'seek_step'})) { }
157 0 0 unless defined $file
166 1 0 if (defined $file)
167 0 1 if (ref $file eq 'GLOB') { }
171 0 1 unless open PCM, $file
187 0 1 unless (defined $file)
191 1 0 if (not exists $opts{'scaler'}) { }
0 0 elsif (defined $opts{'scaler'}) { }
225 32 0 if ($bytes_per_sample == 2) { }
244 0 0 if (defined $input)
248 0 0 unless scalar @$fileless_buffer >= $samples_needed
263 0 34 unless defined $input
267 0 34 if (not defined $ret) { }
1 33 elsif ($ret == 0) { }
1 32 elsif ($ret < $read_size) { }
279 0 1 unless seek $input, $size - $read_size, 0
288 0 32 if ($rewind and not $EOF_found)
289 0 0 unless seek $input, $rewind * -1, 1
404 32 0 if (defined $scaler)
427 0 1 unless (defined $analyzer)
447 32 0 if ($freq < 10000) { }
477 0 1024 if ($$mags[$i] > 1)
508 0 0 if ($one > $$self{'peak'})