No Music in Linux

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

No Music in Linux

Post by Conditional Zenith »

I am running OTTD in linux, but cannot get music. I have copied the gm folder frow Win TTD into both the OTTD directory and the OTTD/data directory, but I cannot get music. I can get sounds fine. Does anyone know how I can get the music?

Also, while it is not affecting me while I am playing, I am getting many "dbg:frameskip" (or something like that) messages in my terminal which I find after I have quit.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

don't care about frameskips

the gm folder should be in the same folder as the executable file and you need timidity to get it to work. You also needs an addition to timidity, which I always forgets the name of. It's named something like earmuffs or something
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Re: No Music in Linux

Post by dominik81 »

Conditional Zenith wrote:I am running OTTD in linux, but cannot get music. I have copied the gm folder frow Win TTD into both the OTTD directory and the OTTD/data directory, but I cannot get music. I can get sounds fine. Does anyone know how I can get the music?
Read my sig.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
whitehawk
Engineer
Engineer
Posts: 3
Joined: 05 May 2004 11:14

Post by whitehawk »

I ave the same problem too. I have read the readme, and I tried to put /gm in 5 different places but non worked.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

whitehawk do as he wrote ... read is sig ...

after taking brief in 10 seconds I found this:
./ttd -m extmidi
I don't want to give you everything so this is only clue ... search the forum aswell read the readme file to fins it yourself
what are you looking at? it's a signature!
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Post by Conditional Zenith »

I also read the readme which came with the source a few times (before I posted here). I got the soure tarball from SF and it had a readme which is 6767 bytes.

All it says about music is:

"If you want music you need to copy the gm/ folder from Windows TTD."

It says nothing about any -m option.
mispunt
Traffic Manager
Traffic Manager
Posts: 213
Joined: 05 Apr 2004 08:38
Location: Ede, The Netherlands
Contact:

Post by mispunt »

yes there is:
Readme Mandrake Linux.txt wrote:If you want the original TTD music you need to copy the whole /gm/ directory from Windows. Additionally the TiMidity driver is required:
TiMidity++-2.12.0-0.pre1.4mdk (+ dependencies)
To run OpenTTD with music support type
$ ./ttd -m extmidi
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Post by Conditional Zenith »

The text you just quoted was definitely not in the readme I got with the source. I did not get any file called "Mandrake Linux.txt" either, only "readme.txt".
mispunt
Traffic Manager
Traffic Manager
Posts: 213
Joined: 05 Apr 2004 08:38
Location: Ede, The Netherlands
Contact:

Post by mispunt »

Somebody told:
dominik81 wrote:Read my sig.
which tells:
"There's a readme that comes with the source. I suggest you read it."
There you could find the readme file which is released at May 8th and OpenTTD 0.3.1 is released at April 26th.
I hope that in the next release this readme is included.
Gof.dk
Engineer
Engineer
Posts: 25
Joined: 31 May 2004 16:09
Location: Denmark

Post by Gof.dk »

Ive done as the readme states and if i run

Code: Select all

timidity somettdmusicfile.gm
i get the music playing, but if i run

Code: Select all

./ttd -m extmidi
i still don't get any midi, and i have all the files
from /gm/ lying under /gm/ in my gamefolder on linux.

Can anyone plz help me to what i am doing wrong?

Gof
* To study is fun, when you have vacation *
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Post by dominik81 »

Are you sure that you have them all in the correct folder? Look at Makefile.config and check "DATA_DIR_PREFIX:=". Is it set to any particular directory? If yes, you have to move the gm folder to the specified directory.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
Gof.dk
Engineer
Engineer
Posts: 25
Joined: 31 May 2004 16:09
Location: Denmark

Post by Gof.dk »

Ok thx a lot i thought it had to lie under the openttd folder as /gm/ and not data/gm/

Gof
* To study is fun, when you have vacation *
Gof.dk
Engineer
Engineer
Posts: 25
Joined: 31 May 2004 16:09
Location: Denmark

Post by Gof.dk »

Ok i tried moving the gm folder and i found out that that wasen't the problem
because when i moved it i got file not found errors while playing openttd,
so the location was right, i moved em back and errors dissapeared.
But i still get no music.

I know timidity++ is working because i can play the songs with timidity,
and i know the .gm files is in right location because if i move them to
somewhere diffrent i get file not found errors. And i am using ./ttd -m extmidi
to start the game. But no music :(

Anyone have any good ideas?

Gof
* To study is fun, when you have vacation *
Nikerabbit
Engineer
Engineer
Posts: 1
Joined: 06 Jun 2004 17:04
Location: Finland

Post by Nikerabbit »

I have exactly the same problem.
I traced it into that OTTD has already taken my soundcard for sound effects. Timidity then waits until it's freed, which is never while playing. :cry:
SuspiciouS
Engineer
Engineer
Posts: 1
Joined: 10 Jun 2004 18:16

Post by SuspiciouS »

Well, i tried all the things that are listed in the readme... But no sounds here.

In Makefile.config i set DATA_DIR_PREFIX:=/home/dennis/games/openttd

But then also it doesn't work, i get this error:

Code: Select all

extmidi: couldn't execl: No such file or directory
extmidi: play song failed
Runnig RedHat 9, installed the latest TiMidity++, rebuild the game, nothing helped.

Anyone who had an idea ?
voyageur
Engineer
Engineer
Posts: 3
Joined: 12 Jun 2004 11:40
Location: France
Contact:

Post by voyageur »

I have the same problem as Nikerabbit, because my crappy sound card can not do multiplexing... So timidity won't be able to play, because sound is already in use by the game itself :(

I think this was already suggested, but why not use SDL_mixer instead of fork+execl of timidity? Since SDL is already used for sound... Sadly I don't have time to check it out myself, but combining existing code and some inspiration from SDL tutorials (like http://www.kekkai.org/roger/sdl/mixer/index.html ) could make it.
Voyageur
Linux-powered
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

there have been talk about SDL_mixer, but nobody have started to code that :(
It would solve this problem and the problem that some people haven't installed timidity and the problem where the mac port uses too much CPU time
nazcafan
Engineer
Engineer
Posts: 1
Joined: 20 Jun 2004 19:35

Post by nazcafan »

gof.dk

I have the same problem as you and apparently, it doesn't come from the game but the multiplexing drivers as voyageur stated :

I tried launching the game by :

./ttd -s null -m extmidi

then the music worked but evidently without sound
I remember that I can't play - let's say - mplayer and xmms together so it must come from the mixer or something. Does anyone knows how to solve that ?
--
Nazcafan
"Stay on target !"
voyageur
Engineer
Engineer
Posts: 3
Joined: 12 Jun 2004 11:40
Location: France
Contact:

Post by voyageur »

A fix is to use a software multiplexer, namely esd, arts (from kde), jack, or dmix (if you have alsa sound drivers). But you have to set them up to intercept sound, and using programs like esddsp to do so (in this case extmidi.c calls have to be modified to use it).

But I recently discovered that the alsa drivers/libs have a software multiplexer, timidity can use alsa and sdl programs too. I'm currently trying to make all of these work on my system (side effect: allow xmms to play ogg files and licq to play "new message" sounds)

See:
http://alsa.opensrc.org/index.php?page=DmixPlugin
http://alsa.opensrc.org/index.php?page= ... irty+HOWTO

Well it's rather a hack than a fix, SDL_mixer would be quite better to it! But using it will mean some recoding of audio output too...
Voyageur
Linux-powered
Post Reply

Return to “OpenTTD Problems”

Who is online

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