New music system for OpenTTD

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

egladil
OpenTTD Developer
OpenTTD Developer
Posts: 188
Joined: 07 Nov 2005 17:10
Location: Sweden

Post by egladil »

I don't know about that. It's more a question about what you write and how well written it is.
As for the devs having it easier to get something into trunk, that is quite natural as they are the ones responsible for maintaining the code.
Tron
OpenTTD Developer
OpenTTD Developer
Posts: 57
Joined: 13 Dec 2004 23:15

Post by Tron »

webfreakz.nl wrote:Because it's very hard to get some code in /trunk/ if you're not a OpenTTD developer...
Go somewhere else if you want to flame people who spend their free time to write a game you can play for free.

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.
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

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? ;)
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

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? ;)
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.
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
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

Hmm, just replied in the other topic:
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.
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.

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.
User avatar
LKRaider
Transport Coordinator
Transport Coordinator
Posts: 360
Joined: 23 Mar 2005 04:05
Location: Brasil
Contact:

Post by LKRaider »

Why not implement the SDL mixer as default ?

It has support for Vorbis and MP3, along with Midi and Mod.
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

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...
User avatar
LKRaider
Transport Coordinator
Transport Coordinator
Posts: 360
Joined: 23 Mar 2005 04:05
Location: Brasil
Contact:

Post by LKRaider »

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 :D
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

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.
User avatar
UltraNub
Engineer
Engineer
Posts: 119
Joined: 13 Dec 2007 21:22

Re: New music system for OpenTTD

Post by UltraNub »

How do u use this?
ERROR: Signature Not Found, Search Behind Couch? Y/N
LordAzamath
Tycoon
Tycoon
Posts: 1656
Joined: 08 Jun 2007 08:00

Re: New music system for OpenTTD

Post by LordAzamath »

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 ;)
PS: And I stopped the propaganda to support Dave Worley since he got a nice new red hat now.[/color]
I know I have a BBCode error in my signature but I really cba to fix it.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: New music system for OpenTTD

Post by 2007Alain2007 »

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
For Community Integrated Version http://code.google.com/p/civopenttd/
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: New music system for OpenTTD

Post by Roujin »

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...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: New music system for OpenTTD

Post by Yexo »

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.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests