You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- For Ogg Vorbis support on Windows, you need libogg-0.dll, libvorbis-0.dll, and libvorbisfile-3.dll in the same directory as your crimesquad.exe executable. For Ogg Vorbis support on UNIX-based systems, you need libogg, libvorbis, and libvorbisfile installed on your system. Luckily none of these dependencies are needed for compiling, and they are optional at runtime, the program doens't crash if you leave them out, it just doesn't have Ogg Vorbis support and falls back to MIDI instead.
- There is still MIDI support and MIDI files. It is used as a fallback if you don't have Ogg Vorbis support (don't have the necessary .DLLs or libraries) or if the .OGG files in question are missing.
- The MIDI files have all been moved from the /art directory to the /art/midi directory so it's easier to deal with them and decide whether or not to include them in a distribution or on your own computer.
- The Ogg Vorbis files are similarly located in the /art/ogg directory.
- There are many different licenses for the Ogg Vorbis files and some related documentation, and I also put in licenses for everything else in the game, in a new file, /art/licenses.txt. Since it's in the art directory people will always get that file. Legally it needs to be included along with any distribution of the Ogg Vorbis files to cover their license requirements. And actually it's legally needed for certain libraries in the source code that also have their licenses in it too. /art/licenses.txt also has useful information on including Ogg Vorbis files, like why you can't use files with a sampling rate of 48 kHz, and how you can convert them to 44.1 kHz using Audacity so they'll work with the game (a little complicated, you have to change the sampling rate in 2 places and also adjust the speed of the music too).
- Of course everything is under a Liberal license that is compatible with packaging along with a GNU GPL game for it to playback while you play it. Because the music and the game engine can be packaged separately and neither requires the other (you can play the music in a media player, and you can run the game without any music), legally they can be considered separate and not have to be under the same license. So that is where /art/licenses.txt comes in to explain what files are under what licenses.
- Anyway now you can bundle the game with Ogg Vorbis music (lots of disk space but better quality sound), MIDI music (way less disk space but lower quality sound), or no music at all, and any of those options works equally well, with the same exact compiled executable.
- Relocated the MIDI files in Makefile.am and added the Ogg Vorbis ones... not sure if this'll work since they're in subdirectories of /art. The makefile might just plop 'em all in /art rather than the proper subdirectories, I don't really understand makefiles quite enough to figure out whether that will happen or not, or how to fix it if it actually is a problem.
- With official release versions we'll PROBABLY have one version with Ogg Vorbis music and one with MIDI music, that's what I think would be a good idea anyway (and they can both use the exact same crimesquad.exe file).
- Enabled FluidSynth for people on UNIX-based systems who have it, apparently it had to be turned on, I just assumed it was on by default.
- Mixer and files for it all have to be 44.1 kHz. I think the mixer was set to 48 kHz before but that didn't affect MIDI, at least on Windows, since it was played back through Windows' Midi Mapper rather than the Windows's Wave Mixer... it DOES affect Ogg Vorbis though so I needed to fix it to 44.1 kHz.
- Anyway the point is now people can listen to either MIDI or Ogg Vorbis as their music, or not have music at all, and all 34 songs are implemented as both types.
- The MusicClass in the source code (declared in includes.h and having its bigger functions implemented in misc.cpp) is now even more, umm, object-oriented and now extracts away SDL2 and SDL2_mixer stuff from the rest of the game completely, which simplifies the code in the main game.cpp.
- Used EXIT_SUCCESS and EXIT_FAILURE as exit codes for the program instead of 0 and 1, since that's what the C++ standard recommends (it behaves identically on Windows, but might improve things on other platforms).
- Some minor code cleanup.
- As far as music choices go, unfortunately I did have to use some ancient recordings from the 1900s, 1910s, 1920s, or 1930s for songs where better recordings weren't available under public domain or under Liberal licenses. But for most songs I got quite good music. And for the old ones I cleaned them up a bit in Audacity to make them sound better.
- All 34 Ogg Vorbis files are 44.1 kHz sampling rate and have a target bitrate of 64 kbps but actually in practice have bitrates somewhere between 54 and 60, which saves disk space. The Ogg Vorbis files also have lots of metadata (some of the licenses require it, and it's just helpful anyway).
- The total filesize of all 34 Ogg Vorbis files is 56.7 MB (59,485,596 bytes). I had estimated on the forums it might be 79 megs, as a general ballpark estimate of the order of magnitude. So I am pleasantly surprised that it came in so low at only 56.7 megabytes for all 34 Ogg Vorbis files. And the sound quality is very very nice, I am amazed how good it can sound at a low bitrate, it is WAY better than MP3 at low bitrates.
0 commit comments