News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

OGG support?

Started by Isaac Eiland-Hall, April 16, 2009, 06:26:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Isaac Eiland-Hall

I know we can't support MP3 due to licensing... what about OGG?

Reason I ask: A while back, there was a spurt of music for Simutrans - in midi. And it's great. But midi is.... insufficient, in my mind, as a format for music. Don't get me wrong, I've loved MIDI since I first got to play with it in the 90s... but for in-game music, having some sort of wave-based format would really open us up, imho.

In fact, I currently have a topic where I'm sharing my music, with Simutrans in mind. And I assume others would jump in, if given a format like OGG.

Any chance for this at some future point? (I realize it would surely be a low priority at best)

(Link to topic: http://forum.simutrans.com/index.php?topic=1924.new#new )

VS

I can't claim to be a walking oracle of libraries, but sound support is one of the pain in the **** moments of cross-platform. Vorbis is very common format though, and supported by sdl_sound, which is iirc used for our midi anyway. So there may be some hope...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Isaac Eiland-Hall

I suppose that, in the worst case scenario... maybe even .wav? We might be able to optimize music to some sort of degree that would be acceptable to many... but something like OGG would certainly be preferable...

(There are also other formats like FLAC, but I'm guessing OGG might have the widest support, especially given VS's reply above...)

VS

#3
Uhm... you have to get the right format for the job. For game media, OGG is perfect (compression). FLAC is for quality (no editing "rot") and all else second - think of it as wav in zip. The relation between the two is same as jpeg vs. png for pictures.

Wav already plays (vehicles), so nothing new there. Mid is an atrocity :D

Support for sounds means a) decoder and b) actual output. I guess in this situation this means (with high probability) that we continue to use sdl_sound as (b) and it will newly also depend on libvorbis for (a).

The slight problem is pulling in a new dependency. The more stuff you delegate to others' libraries, the more you depend on someone else keeping their act up. IIRC so far Simutrans as game engine is very strongly decoupled from all i/o - it runs routinely on sdl, gdi, and allegro (and do I see code for X there as well?). That is good™, and I wonder how would that work with another library.

But let's wait for Prissi :)




PS: Perhaps I overrated the problems with sound. But I follow more projects than this one and recurring (developer) problems concern sound output, 3d acceleration and integration of [external] scripting languages. When you look at it from some perspective - stereo almost always works out of the box, but where is support for 5.1 surround sound and such, ha? Also, ogg is well backed up in that sense but try playing, say, aac in your own program :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

WAV is actually only a container format and could contain MP3, OGG or whatever. The problem is that those wavs are almost only handled properly on windows (or it was like this two years ago when I hat the last try on this). SDL_mixer provides OGG support and would play anystuff (if it plays at all).

Licening is not an issue, as the endcoder decoder is in a library, not in the program.