Skip to content

Commit

Permalink
Support using a local file too.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxPower15 committed Feb 11, 2024
1 parent 2fdfae7 commit c33dfaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
end
File.write("out/downloaded-file", resp.body)
input_file = "out/downloaded-file"
elsif input_file
puts "Using local file #{input_file}"
else
# generate the sine wave we'll use as input
system("ffmpeg -hide_banner -loglevel error -nostats -y -f lavfi -i \"sine=frequency=#{SINE_FREQUENCY}:duration=#{SINE_WAVE_DURATION}\" out/#{SINE_WAVE_FILE_NAME}")
Expand Down

0 comments on commit c33dfaf

Please sign in to comment.