Game Development Community

Using .ogg files in T2D again....

by Richard Ranft · in Torque 2D Professional · 05/17/2013 (9:48 am) · 7 replies

Anybody else up for this? I'm contemplating putting this back in, for Windows anyway since I don't have a Mac or any iOS devices. I suppose it could be conditionally excluded for those platforms.

About the author

I was a soldier, then a computer technician, an electrician, a technical writer, game programmer, and now software test/tools developer. I've been a hobbyist programmer since the age of 13.


#1
05/17/2013 (12:52 pm)
Ogg playback is indeed pretty necessary imho.

A quick scan reveals that the basic structure for handling .ogg playback is defined but the actual interpretation of the file format is nowhere to be found.

If the engine is looking for a .wav file but doesn't find it, it actually will look for the equivalent .ogg file but can't load it.
Another hole to plug!

I'm still neck deep into fixing the CompositeSpriteToy but I will definitely add this to my TODO list.

Of course, I highly encourage community members to rally behind Richard and slay this bug!
#2
05/18/2013 (5:51 am)
If we can also support compressed audio for iOS and OS X, I'm all for it. The problematic part is that .ogg will not run on iOS, at all. I think more people need to weigh in if they want this in the core repository after Richard is finished. I'm just not a fan of runtimes having mixed format support.
#3
05/18/2013 (11:59 pm)
Ogg Vorbis support would be good, if it was for Windows and OSX. For iOS, we are going to want to use Mp3 anyway for the hardware decoder on those devices. Then it just needs to be noted that a program like Audacity can be used to convert between .ogg and .mp3.
#4
05/20/2013 (5:44 pm)
Oh, yes. Ogg support is definitely wanted. I really, really want it but I really, really can't actually help with implementing it right now. :/
#5
05/22/2013 (4:30 pm)
I'm not a fan of Apple.... ;p

We're still in a place where we have sub-optimal sound support - no .mp3 on Windows thanks to licensing issues and .wav is not preferred for streaming on iOS (unless I'm just off base here). Either .ogg or .mp3 deliver better quality in smaller packages and stream better than .wav.

Does .mp3 work on iOS currently?
#6
05/22/2013 (5:19 pm)
@Richard - Yeah. Because of the platform differences, audio support is really sticky at this point. This is why I inserted a technical milestone for 3SS/T2D was to provide support for a fully cross-platform, streaming audio format. Unfortunately, we never made it that far =/.

.mp3 works on iOS. .ogg will work on Windows and OS X. .wav works on all platforms.
#7
05/23/2013 (8:09 am)
I stopped fiddling with my add-in dll project a while back - choked on all of the imports and exports. But I'm thinking there's a way to use an exports list to allow the plug-in manager to directly create console functions using function pointers into the dll and register them when the dll loads, which would mean no exports from the engine (wow, what a ton of work that saves). Then this would all be academic - just make a plug-in to handle whatever sound system you want, or to extend sound support.

I think that one could then strip down a copy of the engine code to just what we want to use in the dll and build it that way - again no exports from the engine, just a ton of culling. I believe this would allow my dll functions to pass back correctly typed objects to the engine (AudioBuffers, for example).

I suppose this would be a solid test project for both objectives, eh?