New music system for OpenTTD
Moderator: OpenTTD Developers
Go somewhere else if you want to flame people who spend their free time to write a game you can play for free.webfreakz.nl wrote:Because it's very hard to get some code in /trunk/ if you're not a OpenTTD developer...
This patch is based on a hack i did to the sound mixer of ottd. I will not allow this hack gets into the official source, period.
- orudge
- Administrator
- Posts: 25223
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Would you, or someone, like to rewrite the mixer then? I personally do not have the time to do that, but I would be a bit miffed if the many hours I've spent working on this go to waste.
In addition, I'm quite aware that parts of the code in my patch aren't too tidy, but I'd like to think for the most part, it is pretty logical. Besides, we have the code correctness police for that too, surely?
In addition, I'm quite aware that parts of the code in my patch aren't too tidy, but I'd like to think for the most part, it is pretty logical. Besides, we have the code correctness police for that too, surely?

Owen, could you update your patch to the current SVN (r4341+), as I have a request to add your patch to the mini IN. I cannot get the system to compile (the diff was difficult to say the least - multiple copies of some files in there!) and I know nothing whatsoever about the music system. Many thanks.orudge wrote:Would you, or someone, like to rewrite the mixer then? I personally do not have the time to do that, but I would be a bit miffed if the many hours I've spent working on this go to waste.
In addition, I'm quite aware that parts of the code in my patch aren't too tidy, but I'd like to think for the most part, it is pretty logical. Besides, we have the code correctness police for that too, surely?
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
- orudge
- Administrator
- Posts: 25223
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Hmm, just replied in the other topic:
Also, Tron has said that he won't accept the music patch as it is with the current mixer hack - so basically, somebody will have to rewrite the mixer to work a bit more cleanly before he'll let this go anywhere near the trunk, so I'm not sure how inclined I am to do that either, or to work on it in its current state. We'll see, I'm sure.
Not sure how multiple copies of some of those files got into the diff, it was generated by TortoiseSVN so presumably something got confused there. Anyway, the main stuff shouldn't be too hard to tweak to get working with the latest SVN, I just don't have the time just now.I wrote: Indeed, it'll probably need updating to work with the latest SVN. I may or may not do this sometime, depends if I have enough time and energy. As nobody seems to be interested in it now after all that work, I'm not sure if I can be bothered at the moment... perhaps later in the year when I have more time.
Also, Tron has said that he won't accept the music patch as it is with the current mixer hack - so basically, somebody will have to rewrite the mixer to work a bit more cleanly before he'll let this go anywhere near the trunk, so I'm not sure how inclined I am to do that either, or to work on it in its current state. We'll see, I'm sure.
Why not implement the SDL mixer as default ?
It has support for Vorbis and MP3, along with Midi and Mod.
It has support for Vorbis and MP3, along with Midi and Mod.
- orudge
- Administrator
- Posts: 25223
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Silly question, but does SDL_mixer require SDL? (Indeed, just checked, and it does). If so, that's a no-go, OpenTTD only uses SDL on certainly platforms, it uses OS-specific systems where available (specifically, Windows and Mac OS X at the moment, possibly some other systems).
Besides, I've already written the code, it just needs some debugging and tidying up...
Besides, I've already written the code, it just needs some debugging and tidying up...
Well, SDL is cross-platform. Works great for me here on Windows. Also, it could be a compilation option to use SDL (as it already is), and it could fallback to platform-specific solutions if SDL was not compiled in (ie: something like it happens with libpng and zlib now, the game works, you just loose the extra functionality).
But anyways, I'll be trying your patch. Seems cool
But anyways, I'll be trying your patch. Seems cool

- orudge
- Administrator
- Posts: 25223
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Yes, SDL works on most platforms, but not all. OpenTTD has been ported to architectures SDL doesn't currently work on, and the native solutions are often much better than the SDL versions (eg, on Windows, and on OS X SDL is a cause of many problems, particularly with the new Intel Macs). I personally am not keen on making SDL a compulsory requirement for the game.
The way my patch works, it pipes everything through the existing sound drivers (whether they're SDL, Win32 sound, OS X CoreAudio or anything else). It uses libvorbis and libmad to decode Vorbis and MP3 files itself, both of which should compile on many different systems, and if not, the features disable themselves, just like libpng and zlib.
The way my patch works, it pipes everything through the existing sound drivers (whether they're SDL, Win32 sound, OS X CoreAudio or anything else). It uses libvorbis and libmad to decode Vorbis and MP3 files itself, both of which should compile on many different systems, and if not, the features disable themselves, just like libpng and zlib.
Re: New music system for OpenTTD
How do u use this?
ERROR: Signature Not Found, Search Behind Couch? Y/N
-
- Tycoon
- Posts: 1656
- Joined: 08 Jun 2007 08:00
Re: New music system for OpenTTD
Probably by compiling r3317 with this and change the playlist...A worthy bump...NOOOT. I fail to see why you dug that up..This patch probably doesn't work anyways with current trunk 

-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: New music system for OpenTTD
can music be changed in openttd and how do i get music in my games
like mp3 wma files to work or is it just the old ttd ones that work can some one help me
like mp3 wma files to work or is it just the old ttd ones that work can some one help me
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: New music system for OpenTTD
How about reading the initial post? It clearly states what is possible and what not with this patch.
Good luck updating btw, if you plan to do so. Three and a half years of changes in trunk to merge...
Good luck updating btw, if you plan to do so. Three and a half years of changes in trunk to merge...
Re: New music system for OpenTTD
Probably by compiling r3317 with this and change the playlist...A worthy bump...NOOOT. I fail to see why you dug that up..This patch probably doesn't work anyways with current trunk 
LordAzamath: I hope you don't mind me copying your post, it's equally applicable this time.

LordAzamath: I hope you don't mind me copying your post, it's equally applicable this time.
Who is online
Users browsing this forum: No registered users and 1 guest