Is this the OA code for .ogg support?
No, this code isn't in OA but is something that may be included in the future to reduce filesize.
I'm not a programmer, so I'm afraid I'm not really sure what I'm looking at
What it does is strip the file extension off any wav file compiled into a map and replaces it with ogg, allowing oggs with the same filename to be substituted, there are better solutions for what you want, but this is existing code that will accomplish the same thing plus you get the added bonus of leaving off the file extension when mapping to play whichever sound file exists.
Is this all that's needed, or are there other files needed (codec .dlls, etc.)?
After this patch is applied to your code base, you'll need to compile the binary with ogg support, just change
ifndef USE_CODEC_VORBIS
USE_CODEC_VORBIS=0
endif
to this
ifndef USE_CODEC_VORBIS
USE_CODEC_VORBIS=1
endif
in the makefile. You'll also need the ogg and vorbis headers along with a slew of libs for the ogg support to be compiled properly (as outlined
here). To hear the ogg's ingame you need the libogg, libvorbis, and libvorbisfile dll's.
And is the chopping issue related to music, or using .ogg for target_speakers (if that's even possible)? I did a test using an .ogg file for music (by bringing down the console and typing /music music/test) and it worked great for me, no issues. I didn't test looping, though.
The chopping doesn't happen in music which is handled separately, it just happens in sound effects. It might also be an issue with the sound files themselves as I just tested that patch in our experimental branch to see what would happen and didn't notice any chopping from one sound file.
Thanks for sharing!
Not a problem.