Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2036 closed defect (fixed)

COMI: no sound with ALSA

Reported by: (none) Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Monkey Island 3

Description

Hi all,

after startig monkey3 with scummvm-0.7.1 I can't hear
any music. I tried with "default" and "ALSA" setting (I
use ALSA on linux 2.6).

I do not hear any music or speech.
Some ideas?

Ticket imported from: #1206314. Ticket imported from: bugs/2036.

Change History (32)

comment:1 by (none), 14 years ago

Summary: no sound with ALSACOMI: no sound with ALSA

comment:2 by eriktorbjorn, 14 years ago

I assume you're playing the game from hard disk. Did you
copy the files in the "resource" directories from your CDs?
In particular the files musdisk1.bun and musdisk2.bun since
they're the ones that contain all of the music.

comment:3 by (none), 14 years ago

Yes I copied all files from both CDs under RESSOURCES to
disk as well. Maybe scummvm can't find those, because files
are case senstivie under Linux?

Is there some kind of debugging mode, to see which files
scummvm wants to load?

Greetings, Mathias

comment:4 by eriktorbjorn, 14 years ago

In that case, try renaming all the files to either all
upper-case or all lower-case letters. ScummVM ought to be
able to find them then, at least.

comment:5 by fingolfin, 14 years ago

What is the status of this item?

comment:6 by fingolfin, 14 years ago

Status: newpending

comment:7 by (none), 14 years ago

Status still the same -- I renamed all unter "resource" to
upper or lower case. When every file is in upper case,
scummvm says "can't open file ..." -- so it seems, files
have to be lower case.

But even then I can't hear any sound or music. Seems like my
sound system is not used (I use ALSA and KDE). Sound system
works, I can hear music via xmms or KDE tools w/o a problem.
I even tried to start scummvm, with "artsdsp".

When starting scummvm via cmdline I get this output:

unix_connect: can't connect to server
(unix:/tmp/mcop-root/itchy_lame_at-70e3-428f8da8)
Unable to connect to UNIX socket /tmp/.esd/socket
Looking for comi
Trying to start game 'The Curse of Monkey Island'
WARNING: Sound mixer initialization failed!
WARNING: SO_VERB_LINE_SPACING 24: not yet implemented!

comment:8 by (none), 14 years ago

Status: pendingnew

comment:9 by fingolfin, 14 years ago

Actually, the "ALSA" setting in the GUi is fr MIDI only.
But COMI doesn't use MIDI, it uses digital output, and that
is simply passed on to SDL.

Which audio system SDL uses is not influenced by ScummVM at
all. In your case it looks as if it tries to use ESD but
that fails for some reason. But you can use the
SDL_AUDIODRIVER environment variable to tell SDL to use
another default audio driver. See
<http://sdldoc.csn.ul.ie/sdlenvvars.php>

comment:10 by (none), 14 years ago

Thanks for your info about SDL and audio, but I can't get it
to work with the SDL_AUDIODRIVER env. var. either :(

I tried with these calls on cmdline:
SDL_AUDIODRIVER="artsc" scummvm
SDL_AUDIODRIVER="alsa" scummvm
SDL_AUDIODRIVER="alsa" AUDIODEV="/dev/dsp" scummvm
SDL_AUDIODRIVER="alsa" AUDIODEV="/dev/dsp" artsdsp scummvm
SDL_AUDIODRIVER="artsc" scummvm

none of them worked :(
What do I wrong?

comment:11 by fingolfin, 14 years ago

Do other programs which use SDL produce sound output?

Did you make sure the volume settings are not set to 0 (look at the builtin
options dialog) ?

comment:12 by (none), 14 years ago

I don't think other SDL based programs do have problems with
sound -- for example, I can hear sound when I play Never
Winter Nights.

And I checked builtin optons dialog -- volume settings are
at maximum...

comment:13 by fingolfin, 14 years ago

NWN ships with its own copy of SDL, so that doesn't say much.

So, do you get the "/tmp/.esd/socket" message even when setting
SDL_AUDIODRIVER to alsa ? Or what message(s) do you get?

comment:14 by (none), 14 years ago

[ 14:50 haim@itchy ~ ] SDL_AUDIODRIVER="artsc" scummvm
unix_connect: can't connect to server
(unix:/tmp/mcop-root/itchy_lame_at-70e3-428f8da8)
Looking for comi
Trying to start game 'The Curse of Monkey Island'
WARNING: Sound mixer initialization failed!
WARNING: SO_VERB_LINE_SPACING 24: not yet implemented!
[ 14:51 haim@itchy ~ ]
[ 14:51 haim@itchy ~ ] SDL_AUDIODRIVER="alsa" scummvm
Looking for comi
Trying to start game 'The Curse of Monkey Island'
WARNING: Sound mixer initialization failed!
WARNING: SO_VERB_LINE_SPACING 24: not yet implemented!

comment:15 by eriktorbjorn, 14 years ago

The "Sound mixer initialization failed" message means that
_mixer->isReady() returned false.

The isReady() function returns the value that was returned
by _syst->setSoundCallback() when the ScummVM mixer class
was initialized.

With the SDL backend, the only case where setSoundCallback()
returns false is if SDL_OpenAudio() fails. This, of course,
is where the whole thing passes out of ScummVM's hands and
into SDL's.

I've added a warning message to this case that includes
whatever error string SDL provides. Of course, that won't
make any difference to whether or not it'll work.

comment:16 by fingolfin, 14 years ago

So, we need the bug submitter to try with a current daily build,
and then we need to know what additional output ScummVM
now produces...

comment:17 by fingolfin, 14 years ago

Status: newpending

comment:18 by (none), 14 years ago

Status: pendingnew

comment:19 by (none), 14 years ago

ok, so I downloaded latest scummvm (20050626) and compiled
it. But when I now try to start the gane "COMI", I get this
error on cmdline:

[ 14:57 haim@itchy scummvm ] ./scummvm
Looking for comi
Trying to start game 'The Curse of Monkey Island'
Fatal signal: Segmentation Fault (SDL Parachute Deployed

comment:20 by eriktorbjorn, 14 years ago

Hmph. Not really an improvement, though I don't think my
change would cause that.

Could you run ScummVM in a debugger to see where it crashes?

comment:21 by fingolfin, 14 years ago

haimat, is that really precisely the content of your
console?

If you just enter "./scummvm", it will not launch comi
normally, so I have the suspicion you are leaving out bits
here... ?

comment:22 by (none), 14 years ago

hi fingolfin, yes that's precisely the content of my
console, I c&p it from there. To be 100% accurate:
- downloaded latest CVS source
- "./configure" and "make"
- run "./scummvm" from this directory
- select COMI game from within the scummvm GUI

After that, the GUI exits and I can see this error on cmdline:

[ 14:57 haim@itchy scummvm ] ./scummvm
Looking for comi
Trying to start game 'The Curse of Monkey Island'
Fatal signal: Segmentation Fault (SDL Parachute Deployed

@eriktorbjorn:
maybe this error now occurs because I configured and maked
the sources from cmdline? The "official" build 7.1 was made
via emerge on my Genoo box from portage ebuild...

comment:23 by eriktorbjorn, 14 years ago

Shouldn't make any difference, I believe. If it had been the
other way around, I might have been more suspicious because
I hear Gentoo can be pretty aggressive about turning on
optimizations which could expose previously unseen bugs both
in ScummVM and in GCC itself.

As I said, it'd be really helpful if you would try running
ScummVM in a debugger. If you have GDB installed, it's quite
simple: Instead of starting it with "./scummvm" you'd start
it with "gdb ./scummvm".

After a brief copyright notice, you'd see a "(gdb)" prompt.
Type "run" to start the program and if/when it crashes, type
"bt" at the prompt to get a backtrace. The output from that
should show where the crash occured. (At least if ScummVM
was compiled with debugging symbols, which it should be in
this case, and hasn't been stripped.)

comment:24 by (none), 14 years ago

Hi eriktorbjorn, thanks for your quick answer. Here is my
output of gdb debugging.

[ 18:18 haim@itchy scummvm ] gdb ./scummvm
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run
Starting program: /home/haim/programme/scummvm/scummvm
[New Thread 16384 (LWP 12838)]
[New Thread 32769 (LWP 12842)]
[New Thread 16386 (LWP 12843)]
Looking for comi
Trying to start game 'The Curse of Monkey Island'

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12838)]
0xb7692486 in Arts::StartupManager::startup() () from
/usr/kde/3.4/lib/libmcop.so.1
(gdb) bt
#0 0xb7692486 in Arts::StartupManager::startup() () from
/usr/kde/3.4/lib/libmcop.so.1
#1 0xb7677fc9 in
Arts::Dispatcher::Dispatcher(Arts::IOManager*,
Arts::Dispatcher::StartServer) () from
/usr/kde/3.4/lib/libmcop.so.1
#2 0xb712bb4d in arts_backend_init () from
/usr/kde/3.4/lib/libartscbackend.so.0
#3 0xb79ac772 in arts_init () from
/usr/kde/3.4/lib/libartsc.so.0
#4 0xb7e0ad9b in SDL_MixAudio_MMX_S8 () from
/usr/lib/libSDL-1.2.so.0
#5 0xb7e080b6 in SDL_OpenAudio () from /usr/lib/libSDL-1.2.so.0
#6 0x08050640 in OSystem_SDL::setSoundCallback(void
(*)(void*, unsigned char*, int), void*) (this=0x8423368,
proc=0xb7808b34, param=0xb7808b34)
at backends/sdl/sdl.cpp:305
#7 0x08242ac3 in Mixer (this=0x841f9a8) at sound/mixer.cpp:121
#8 0x08058bc9 in GameDetector::createMixer() () at
base/gameDetector.cpp:642
#9 0x08050b60 in Engine (this=0x1, syst=0xb7808b34) at
base/engine.cpp:41
#10 0x0805b4e0 in ScummEngine (this=0x841f9a8,
detector=0xbffff280, syst=0xb7808b34, gs=@0xbffff0e0,
md5sum=0x1 <Address 0x1 out of bounds>,
substResFileNameIndex=-1216312524) at scumm/scumm.cpp:711
#11 0x08060792 in ScummEngine_v6 (this=0x84774f0,
detector=0xb7808b34, syst=0xb7808b34, gs=@0xb7808b34,
md5sum=0xb7808b34 <Address 0xb7808b34 out of bounds>,
substResFileNameIndex=-1216312524) at scumm/scumm.cpp:1319
#12 0x080617ad in ScummEngine_v7 (this=0x84774f0,
detector=0xb7808b34, syst=0xb7808b34, gs=@0xb7808b34,
md5sum=0xb7808b34 <Address 0xb7808b34 out of bounds>,
substResFileNameIndex=-1216312524) at scumm/scumm.cpp:1416
#13 0x0806198f in ScummEngine_v8 (this=0x84774f0,
detector=0xb7808b34, syst=0xb7808b34, gs=@0xb7808b34,
md5sum=0xb7808b34 <Address 0xb7808b34 out of bounds>,
substResFileNameIndex=-1216312524) at scumm/scumm.cpp:1428
#14 0x08067716 in Engine_SCUMM_create(GameDetector*,
OSystem*) (detector=0xbffff280, syst=0x8423368) at
scumm/scumm.cpp:3036
#15 0x0805b26d in
StaticPlugin::createInstance(GameDetector*, OSystem*) const
(this=0xb7808b34, detector=0xb7808b34, syst=0xb7808b34)
at base/plugins.cpp:101
#16 0x08058b90 in GameDetector::createEngine(OSystem*)
(this=0xb7da1601, sys=0xb7808b34) at base/gameDetector.cpp:638
#17 0x080591e8 in runGame (detector=@0xbffff280,
system=@0x8423368) at base/main.cpp:267
#18 0x08059bca in main (argc=1, argv=0xbffff334) at
base/main.cpp:443
#19 0xb7bb7800 in __libc_start_main () from /lib/libc.so.6
(gdb) quit
The program is running. Exit anyway? (y or n) y

comment:25 by eriktorbjorn, 14 years ago

That looks quite similar to the backtrace in
http://www.libsdl.org/pipermail/sdl/2004-June/062716.html
but I haven't found any followups to that yet.

comment:26 by eriktorbjorn, 14 years ago

I couldn't find any followups, but since it appears to be
aRts that is doing the crashing, and not ScummVM or SDL, it
might be worth trying not to use aRts. I don't know enough
about it to say exactly how, though. (My sound card already
allows several applications to use it at the same time, so
it doesn't need any sound daemon to act as mixer.)

There's an "aRts Troubleshooting" page at
http://wiki.kde.org/tiki-index.php?page=aRts+Troubleshooting
but I don't know if it's at all helpful.

comment:27 by fingolfin, 14 years ago

This looks as if your version of SDL was linked to audio
libs which were then changed in a binary incompatible
fashion... Can you recompile SDL, or install a different
version of it?

comment:28 by (none), 14 years ago

yeah fingolfin, thanks a lot, that was it! After
re-installing SDL I now can hear sound and music in COMI

This solution fixes this bug.
Greetings, Matthias

comment:29 by (none), 14 years ago

Resolution: fixed

comment:30 by fingolfin, 14 years ago

Status: newclosed

comment:31 by fingolfin, 14 years ago

Glad to hear that :-)

comment:32 by fingolfin, 14 years ago

Owner: set to fingolfin
Note: See TracTickets for help on using tickets.