PDA

View Full Version : Sound on Ubuntu (Allegro/Pulseaudio issues) -- need help with allegro.cfg



Snarwin
06-24-2010, 09:33 PM
Fresh install, latest linux build, Ubuntu 9.10 (karmic). Start zelda-l from ZC Launcher with default options. There is no sound of any kind--music or sfx.

Examining allegro.log reveals the following:
Initializing sound driver... Sound driver not available. Sound disabled.

Apparently, allegro and pulseaudio don't get along very well. (http://opensnc.sourceforge.net/forum/viewtopic.php?id=100)

Fortunately, a workaround is given. Unfortunately, however, ZC users will run into trouble at step 2a, which instructs them to edit the file /usr/lib/allegro/4.2.2/modules.lst, which a) probably doesn't exist on their system, and b) won't affect the custom version of allegro used by ZC in any case.

Now, what step 2a actually does isn't that complicated--it forces allegro to use the OSS sound driver--so even if that particular file won't work, there should be another way to accomplish the same thing. And indeed, according to the official allegro docs,

Allegro reads information about your hardware from a file called allegro.cfg
...
Normally the setup program and allegro.cfg will go in the same directory as the Allegro program they are controlling.
So, hopefully, all I need to do is figure out the right line(s) to put in allegro.cfg, and I'll be back on track. Which brings me to my question:

What do I put in allegro.cfg to force allegro (and thus ZC) to use the OSS sound driver?

CSD
06-25-2010, 02:59 AM
It's... google246!

"What do I put in allegro.cfg to force allegro (and thus ZC) to use the OSS sound driver?"
And... I can be of no help to you whatsoever!

Saffith
06-25-2010, 07:29 PM
Before you do all that, try running ZC and ZQuest a couple of times each, if you haven't already. It should work, but it takes a few tries to figure it out.

Snarwin
06-29-2010, 05:52 PM
Tried, no effect. Still no sound of any sort from ZC or ZQ, still the same message in allegro.log. I'm not really sure why you expected this to help, to be honest--all it seems to do is regenerate ag.cfg.

In any case, I finally found the documentation for allegro.cfg here (http://www.google.com/url?sa=t&source=web&cd=15&ved=0CCAQFjAEOAo&url=http%3A%2F%2Fftp.heanet.ie%2Fdisk1%2Fsourcefor ge%2Fa%2Fproject%2Fal%2Falleg%2Fallegro-manual%2F4.2.0%2Fallegro-manual-4.2.0.en.pdf&rct=j&q=%22allegro.cfg%22+%22sound+driver%22&ei=JGYqTOD-MYWdlgey88nsAw&usg=AFQjCNEYE_E33ZLT5hiWEpCxp3td-_Z0JA), and setting oss_driver = /dev/dsp under [sound] in ag.cfg seems to have done the trick. Running aoss ./zelda-l gives me full sound now.

MIDI playback quality is still horrendous, but at least it's working.

Saffith
06-29-2010, 06:36 PM
Tried, no effect. Still no sound of any sort from ZC or ZQ, still the same message in allegro.log. I'm not really sure why you expected this to help, to be honest--all it seems to do is regenerate ag.cfg.
Eh, that's what always works for me. Every new build, no sound until they've been run a few times, then they're fine.

I'm not sure if it'll use the included MIDI patches when run through aoss, but if it does, you can replace them with an sf2 soundfont pretty easily. Install liballegro4.2-dev and run pat2dat patches.dat <soundfont> and replace the one in the samplesoundset directory.

Snarwin
06-29-2010, 06:48 PM
Oh, it uses the default patches fine--they just happen to sound awful (same as they did last time I managed to get working sound).

Fortunately, I managed to find an alternative soundfont (http://www.sf2midi.com/soundfonts/file-detail/timgm6mb-sf2-3604.html) that sounds halfway decent after pat2dat conversion.