Skip to content

Commit

Permalink
Merge pull request #20 from LuisMayo/fix-2-chars-sound
Browse files Browse the repository at this point in the history
Fixed a problem where the beep sound would repeat a long time.
  • Loading branch information
micah5 authored Feb 7, 2021
2 parents 2554e47 + 846a7bb commit fd8672b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anim.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def do_audio(sound_effects: List[Dict]):
if obj["_type"] == "silence":
audio_se += AudioSegment.silent(duration=int(obj["length"] * spf))
elif obj["_type"] == "bip":
audio_se += blink + long_bip[: int(obj["length"] * spf - len(blink))]
audio_se += blink + long_bip[: max(int(obj["length"] * spf - len(blink)), 0)]
elif obj["_type"] == "objection":
if obj["character"] == "phoenix":
audio_se += pheonix_objection[: int(obj["length"] * spf)]
Expand Down

0 comments on commit fd8672b

Please # to comment.