Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#17869 - [allegro] no sound

Attached to Project: Arch Linux
Opened by Matěj Týč (bubla) - Saturday, 16 January 2010, 21:43 GMT
Last edited by Ionut Biru (wonder) - Thursday, 21 January 2010, 21:48 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The following program always fails to init sound. I don't know since when, but it is quite troublesome.
This behavior is identical in Allegro 4.4.0.1, at least in my case :-(

See the demonstration at the end of this bugreport.

Additional info:
* package version(s)
allegro-4.2.3.1-1

Steps to reproduce:

Run these commands in a dedicated directory (you can copy&paste all of them at once).

cat > allegro_test.c << EOF
#include <stdio.h>
#include <allegro.h>

int main()
{
allegro_init();
int have_sound = install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL);
if (have_sound == -1)
fprintf(stderr, "No sound!\n");
else
fprintf(stderr, "Sound OK!\n");
return 0;
}
END_OF_MAIN()
EOF
gcc allegro_test.c -O0 -g `allegro-config --libs` -o sound_test
./sound_test

Do you get "no sound" too?
This task depends upon

Closed by  Ionut Biru (wonder)
Thursday, 21 January 2010, 21:48 GMT
Reason for closing:  Not a bug
Comment by Thomas Dziedzic (tomd123) - Saturday, 16 January 2010, 23:20 GMT
I modified your test program. (see allegro_test.c) and I got the following output:

No sound!
No supported synth type found

"midi very rarely is setup on linux machines. most sound cards just dont support midi these days." - Tomasu from #allegro
"if you want to keep AUTODETECT the allegro.cfg file can have midi_card=NONE" - Tomasu from #allegro

The second version "allegro_test_working.c" works because it disables midi.

AFAICT, this is not a bug. Does "allegro_test_working.c" work for you?
Comment by Matěj Týč (bubla) - Saturday, 16 January 2010, 23:36 GMT
Dear Tom,
you are right about that. When I change that parameter, the sound works again.

However, I am sure that previous setup has worked on the same hardware like a year ago and it is not a very good autodetection anyway if it fails completely in the case when just midi can't be found.

So if you know Allegro devs well enough and you agree that this is an issue, please let them know. I think that other distros may encounter this kind of problems problems later since Arch is usually two steps ahead.

Otherwise I will file a bug upstream.
Thank you,
Matej.
Comment by Thomas Dziedzic (tomd123) - Sunday, 17 January 2010, 00:18 GMT
I also asked if autodetection should fail like that. The people in #allegro told me that the autodetection is for the driver, it will fail if none are found, unless you add the previously mentioned line to the config file.

Can you make sure your card supports midi? It might work with software synthesizers, but I'm guessing that if this would be a bug with your midi autodetection, that you would need at least a software synthesizer running.
Comment by Thomas Dziedzic (tomd123) - Sunday, 17 January 2010, 04:39 GMT
Do you still have any comments about this bug?
Comment by Matěj Týč (bubla) - Sunday, 17 January 2010, 12:39 GMT
The only comment I have is that I am convinced that this is a regression, not necessarily caused by Allegro, though.
I don't know whether my card support MIDI, maybe that it doesn't. At least lspci | grep -i midi (is this the right way to check?) doesn't show anything.
But now I don't get any sound even from Allegro demos. And I know that it used to work (on the same hardware).
Comment by Thomas Dziedzic (tomd123) - Sunday, 17 January 2010, 15:46 GMT
http://www.linux.org/docs/ldp/howto/MIDI-HOWTO-7.html

If your card does support it, it might be a regression, or it could have not been set up properly.
Go through the link and check if you can confirm that you actually have a midi sound card.
And are you sure you ran this correctly on an ARCH system previously? It wasn't on some other distro right?

NOTE: the only way to run midi without a card that supports it is to use a software synthesizer.
Comment by Matěj Týč (bubla) - Sunday, 17 January 2010, 16:35 GMT
Thank you for your reply, Tom.
Judging from the link, my card does not support MIDI. On the other hand, that page is quite old, OSS-centered and some files that are reffered don§t exist anymore. However there is no trace of MAD among modules whatsoever. I get some output from cat /proc/modules | grep midi though, but it looks different than it should.
The reason I call it a regression is that it once worked for me. It was also Arch for sure, but I might have reinstalled the system to 64-bit in between. I am unsure whether I have experienced working Allegro sound after that reinstall. What might have occured is that a MIDI module has not made it into rc.conf... Anyway, it would mean that new installs can be affected by this issue as well, which doesn§t sound good.
I think that the function should not fail if at least one digi driver has been found succesfuly, since not many people use MIDI nowadays.
Comment by Thomas Dziedzic (tomd123) - Monday, 18 January 2010, 13:54 GMT
As I said, if you don't have a card that supports midi, then the only way to play it is setting up a software synthesizer.
You should find a 'newer' way to confirm if you have midi.

Is it possible you installed a synthesizer before and just don't remember it? Fluidsynth is one and there are more you could have used.

As for the initialization function, I also find that it failing on auto is weird but there might be a reason for this behavior. When I brought up the issue in irc, they didn't seem to be bothered, which is why I think there is a reason it is implemented like this. Anyways, changing the function behavior would be an upstream issue.
Comment by Thomas Dziedzic (tomd123) - Monday, 18 January 2010, 14:12 GMT
Some links:
http://home.roadrunner.com/~infofiles/midi.html
https://help.ubuntu.com/community/Midi/HardwareSynthesisSetup
alsa-user@lists.sourceforge.net/"> http://www.mail-archive.com/alsa-user@lists.sourceforge.net/

Try the first one. Also can you give the output of lspci? or at least the exact sound card model?

Loading...