This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this was a huge deal. 0. finding the sound on opengameart. thank ZEUS for that website 1. i had to figure out how to make ffmpeg convert a 24KB file into something much smaller to fit into 13KB. even 10KB was probably too big because i want to add extra code. it was always too big using Ogg Vorbis, so i tried Ogg Opus, but that doesn't even play, so then i fell back to mp3. 2. converting mp3s to data-uris is actually not fun. i might write a bin to do it if i have to do this a lot. 3. if you have hecka Audio streams, you're screwed. if the game plays a total of 1000 explosion sounds, you can't make 1000 audio streams. so you have to reuse them. i tried to max it out (in a reasonable way, making a sound a few times a second) and it made 9 streams max. i was happy with that. 4. because it's mp3, this doesn't work on Firefox (unless you're on Windows, according to Wikipedia) but it should work elsewhere. phew. i hate sound
- Loading branch information
Showing
8 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# to ogg opus | ||
# ffmpeg -i boom-original.ogg -to 00:00:0.600 -y -acodec opus -ar 8k -ac 1 boom.ogg | ||
|
||
ffmpeg -i boom-original.ogg -to 00:00:0.600 -y -ar 12k -ac 1 boom.mp3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters