Skip to content

Commit 9354f28

Browse files
committed
Merge pull request liamrahav#3 from ryukinix/compress-huge-files
Compress huge .wav files to .ogg: 10x smaller! 100mb~ -> 10mb
2 parents 6355580 + 73274f3 commit 9354f28

File tree

11 files changed

+4
-4
lines changed

11 files changed

+4
-4
lines changed
2.71 MB
Binary file not shown.
-33.8 MB
Binary file not shown.
5.27 MB
Binary file not shown.
-67.5 MB
Binary file not shown.

basics/assets/sound/bounce.ogg

16.5 KB
Binary file not shown.

basics/assets/sound/bounce.wav

-155 KB
Binary file not shown.

basics/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AudioLayer(Layer):
2424
def __init__(self):
2525
super(AudioLayer, self).__init__()
2626
# Now, in the layer we create an Audio object from the class we described above
27-
song = Audio("assets/sound/LatinIndustries.wav")
27+
song = Audio("assets/sound/LatinIndustries.ogg")
2828
# And lastly we make the song play when the layer is initialized
2929
song.play(-1) # Setting the parameter to -1 makes the song play indefinitely
3030

basics/review.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def __init__(self, x=320, y=240, is_trippy=False):
4848
# Now I create an audio object and store it within self, based on whether or not it's trippy
4949
if self.is_trippy:
5050
# When it is trippy, I have a slowed down and distorted version of the song I made in Audacity
51-
self.bg_music = Audio("assets/sound/LatinIndustriesSlow.wav")
51+
self.bg_music = Audio("assets/sound/LatinIndustriesSlow.ogg")
5252
# I also start running a couple effects that make it seem very trippy
5353
# It's important to note that you can do math on Cocos2D effects and actions
5454
self.do((Waves(duration=4) * 100) + Liquid(duration=15))
5555
# In this case I added two actions together and multiplied the waves by 100 for run
5656
else:
5757
# If it's not trippy then I just make it the same boring old song we've been using before
58-
self.bg_music = Audio("assets/sound/LatinIndustries.wav")
58+
self.bg_music = Audio("assets/sound/LatinIndustries.ogg")
5959

6060
# We lower the volume of the background music and have it play the whole time
6161
self.bg_music.set_volume(.2)
2.71 MB
Binary file not shown.
-33.8 MB
Binary file not shown.

intermediate/menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self):
4242
]
4343

4444
# Now let's set the song we want them to hear (good god I love me some Latin Industries)
45-
self.song = Audio("assets/sound/LatinIndustries.wav")
45+
self.song = Audio("assets/sound/LatinIndustries.ogg")
4646

4747
# Then we simply create the menu using the create_menu method and passing in our MenuItem list
4848
self.create_menu(menu_items)

0 commit comments

Comments
 (0)