# HG changeset patch # User David Fraser # Date 1251918834 0 # Node ID 55105d3bdab1a1837cc266e2111d30e9af38b2eb # Parent 91fd3d5d66a396ad8906983e756b54adbd56c6a1 Renamed fire-rifle to fire-machinegun, and added a single-shot rifle Adjusted convert_audio so you can specify a converter, namely oggenc, as nothing else seems to handle fire-rifle.wav diff -r 91fd3d5d66a3 -r 55105d3bdab1 data/sounds/fire-machinegun.ogg Binary file data/sounds/fire-machinegun.ogg has changed diff -r 91fd3d5d66a3 -r 55105d3bdab1 data/sounds/fire-rifle.ogg Binary file data/sounds/fire-rifle.ogg has changed diff -r 91fd3d5d66a3 -r 55105d3bdab1 data/sounds/get-sources --- a/data/sounds/get-sources Wed Sep 02 18:55:46 2009 +0000 +++ b/data/sounds/get-sources Wed Sep 02 19:13:54 2009 +0000 @@ -26,9 +26,12 @@ for section in source_config.sections(): yield section, dict(source_config.items(section)) -def convert_audio(source_filename, target_filename, source_format, target_format): +def convert_audio(source_filename, target_filename, source_format, target_format, converter=None): """converts audio between files""" logging.info("Converting %s (format %s) to %s (format %s)", source_filename, source_format, target_filename, target_format) + if converter == "oggenc": + subprocess.call(["oggenc", source_filename, "-o", target_filename]) + return if not acodec or not muxer: logging.debug("pymedia not present: will try use transcode") if source_format == "aiff": @@ -148,5 +151,6 @@ source_filename = download_filename orig_format = source_options.get("originalformat", orig_ext) target_format = source_options.get("targetformat", target_ext) - convert_audio(source_filename, target_filename, orig_format, target_format) + converter = source_options.get("converter", None) + convert_audio(source_filename, target_filename, orig_format, target_format, converter) diff -r 91fd3d5d66a3 -r 55105d3bdab1 data/sounds/sources.txt --- a/data/sounds/sources.txt Wed Sep 02 18:55:46 2009 +0000 +++ b/data/sounds/sources.txt Wed Sep 02 19:13:54 2009 +0000 @@ -55,7 +55,7 @@ ArchiveExtension: zip ArchiveMember: Berklee44v6/dog_bark_1.wav -[fire-rifle.ogg] +[fire-machinegun.ogg] URL: http://www.archive.org/download/Berklee44v13/Berklee44v13.zip Source: http://www.archive.org/details/Berklee44v13 License: http://creativecommons.org/licenses/by/3.0/ @@ -63,3 +63,11 @@ ArchiveExtension: zip ArchiveMember: Berklee44v13/fake_gunfire_1.wav +[fire-rifle.ogg] +URL: http://free-loops.com/force-audio.php?id=3007 +Source: http://free-loops.com/download-free-loop-3007.html +License: Public Domain +Credit: Gunshot Sound Effect +OriginalExtension: wav +Converter: oggenc +