Mercurial > rinkhals
changeset 113:55105d3bdab1
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
author | David Fraser <davidf@sjsoft.com> |
---|---|
date | Wed, 02 Sep 2009 19:13:54 +0000 |
parents | 91fd3d5d66a3 |
children | 4c2fbab20abe |
files | data/sounds/fire-machinegun.ogg data/sounds/fire-rifle.ogg data/sounds/get-sources data/sounds/sources.txt |
diffstat | 4 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 +