forked from Nebuleon/hocoslamfy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reduces the amount of I/O necessary. This avoids stutters when streaming music on devices with slow I/O. Thanks to Paul Cercueil for coming up with and testing this idea. I put the conversion in the Makefile, so we have the option to switch to a different codec later, or use an improved encoder or change the quality setting. The encoder is instructed to resample the audio if necessary. Some of the sfx weren't at 44100 kHz and I imagine oggenc can do a better job at resampling than SDL_mixer, since it doesn't run realtime. I picked -q2 as the quality setting. In general -q4 to -q6 is recommended for transparency, but with this particular music -q2 sounded fine to me. Besides, reducing the chance of stutters probably contributes more to a good audio experience than more accurate encoding. Note that despite the name, Mix_LoadWAV() loads Ogg files just fine.
- Loading branch information
Showing
8 changed files
with
19 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.o | ||
data/*.ogg | ||
hocoslamfy | ||
hocoslamfy-od | ||
hocoslamfy-od.opk | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.