Skip to content

Commit f45fe83

Browse files
authored
Merge pull request #11 from amiaopensource/sorting-and-bug-fix
Sorting and bug fix
2 parents deefb8f + dad06fc commit f45fe83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

audioqc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class QcTarget
123123
diff_prior = (ratio - @sample_ratios[i - 1]).abs
124124
diff_post = (ratio - @sample_ratios[i + 1]).abs
125125
if diff_prior > 15 && diff_post > 15
126+
# I think there is something wonky with how ffmpeg splits to frames vs samples - this math for finding time needs to be looked at
126127
@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)
127128
end
128129
end
@@ -166,9 +167,10 @@ class QcTarget
166167
if ! @dual_count.nil? && ! @stereo_count.nil?
167168
if @dual_count > 0
168169
phase_limit = Configurations['dualmono_audio_phase_limit']
169-
elsif
170-
@stereo_count > 1
170+
elsif @stereo_count > 1
171171
phase_limit = Configurations['stereo_audio_phase_limit']
172+
else
173+
phase_limit = Configurations['generic_audio_phase_limit']
172174
end
173175
else
174176
phase_limit = Configurations['generic_audio_phase_limit']
@@ -304,6 +306,8 @@ end
304306
if file_inputs.empty?
305307
puts 'No targets found!'
306308
exit
309+
else
310+
file_inputs.sort!
307311
end
308312

309313
file_inputs.each do |fileinput|

0 commit comments

Comments
 (0)