Skip to content

Commit

Permalink
Merge pull request #11 from amiaopensource/sorting-and-bug-fix
Browse files Browse the repository at this point in the history
Sorting and bug fix
  • Loading branch information
privatezero authored Jun 29, 2021
2 parents deefb8f + dad06fc commit f45fe83
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions audioqc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class QcTarget
diff_prior = (ratio - @sample_ratios[i - 1]).abs
diff_post = (ratio - @sample_ratios[i + 1]).abs
if diff_prior > 15 && diff_post > 15
# I think there is something wonky with how ffmpeg splits to frames vs samples - this math for finding time needs to be looked at
@possible_drops << normalize_time(i * @ffprobe_out['frames'][0]['tags']['lavfi.astats.Overall.Number_of_samples'].to_f / @mediainfo_out['media']['track'][1]['SamplingRate'].to_f)
end
end
Expand Down Expand Up @@ -166,9 +167,10 @@ class QcTarget
if ! @dual_count.nil? && ! @stereo_count.nil?
if @dual_count > 0
phase_limit = Configurations['dualmono_audio_phase_limit']
elsif
@stereo_count > 1
elsif @stereo_count > 1
phase_limit = Configurations['stereo_audio_phase_limit']
else
phase_limit = Configurations['generic_audio_phase_limit']
end
else
phase_limit = Configurations['generic_audio_phase_limit']
Expand Down Expand Up @@ -304,6 +306,8 @@ end
if file_inputs.empty?
puts 'No targets found!'
exit
else
file_inputs.sort!
end

file_inputs.each do |fileinput|
Expand Down

0 comments on commit f45fe83

Please sign in to comment.