Skip to main content
Topic: r2150 WinXP - I can't hear any music (Read 7858 times) previous topic - next topic

Re: r2150 WinXP - I can't hear any music

Reply #1
Well I can. This is only disabled, if initialising the midi subsystem fails.

Re: r2150 WinXP - I can't hear any music

Reply #2
This seems to be a problem with the nightly builds (same problem here with r2153/gdi and r2151/win-sdl), because music works with my own build.

By the way: I would appreciate if the music didn't always start with #1, instead, the last played song should be saved to know where to continue, no matter whether shuffle is switched on.

EDIT/correction: nightly GDI build doesn't have the problem, you just get a lengthy delay, probably due to the initialization of the sound system.

Re: r2150 WinXP - I can't hear any music

Reply #3
Do you use "my" sdl-Mixer-dll??
I hope you understand my English

Re: r2150 WinXP - I can't hear any music

Reply #4
Might not be dll related...  I have the same problem on Linux.

Simutrans r2156 pak128-264 - Midi disabled, sound effect ok.

Simutrans r2082 pak128-264 - Midi and sounds ok.

I am including the results of log -1.




Re: r2150 WinXP - I can't hear any music

Reply #6
music.tab was also updated with the dashes, so that is not the problem.

Re: r2150 WinXP - I can't hear any music

Reply #7
Yes, I tried again after extracting the complete archive for r2156/win-sdl. My self-built SDL executable (which can play music when started in the same environment) doesn't depend on SDL_mixer.dll (huh?), so comparing that doesn't tell much.

Simu.log doesn't give a clue in my case, but look at Lmallets log: "could not load wav (MPEG Layer 3 data not supported)".

Re: r2150 WinXP - I can't hear any music

Reply #8
How do you compiled, that you not need the sdl-mixer .....
I hope you understand my English

Re: r2150 WinXP - I can't hear any music

Reply #9
On windoes using mingw, win32 sound will be used, since it is built in from win 3.11 and work well for ages.

Re: r2150 WinXP - I can't hear any music

Reply #10
Still does not work on r2159, WinXP and Linux.

I took a look at the source code.  It seems dr_init_midi() in simmain.cc never gets called.  I commented out all the IF statements to force Simutrans to run Mix_OpenAudio() from music/sdl_midi.cc, but it segfaults every time when Mix_OpenAudio() is called.

Just to make sure the problem was not with my computer, I compiled the SDL_Mixer tutorial here: http://www.kekkai.org/roger/sdl/mixer/ and replaced the ogg file with a mid file, and that works fine.

I will look at it more tonight.  If Prissi doesn't beat me to it :)  [It is taking a long time to learn what is where in the code, and I haven't done any serious programming since high school, but it is coming back slowly  ;)].

Re: r2150 WinXP - I can't hear any music

Reply #11
My first Simutrans patch: for music/sdl_midi.cc.   Rewrote dr_init_midi().  Seems as if it never returned true (therefore music never gets initialized).  Note that you might have to re-enable sounds by un-checking the Disable Midi box in the Sound options, as starting a "broken" version will have written in simuworld.cfg to start disabled.  I feel like I am missing something, but the patch works for me.

Re: r2150 WinXP - I can't hear any music

Reply #12
Does this change all sounds to double frequency? Last time we checked, this was the cases.

Re: r2150 WinXP - I can't hear any music

Reply #13
Whoops!  My mistake, should have been 22050.   ;D

Re: r2150 WinXP - I can't hear any music

Reply #14
In trunk now.

You have a very strange patch program if you succeed with this patch ... please use "svn diff" to generate the diffs.

Re: r2150 WinXP - I can't hear any music

Reply #15
aparently solved ...