No sound in Xpat2 with sound option on
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xpat2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: xpat2
The sound does not work in Xpat2 when the sound option is turned on. This appears to be due to the fact that the program checks for the presence of /dev/audio before playing sounds, and /dev/audio is no longer present by default in Ubuntu 10.10. The following patch applied to the source file '/src/X-
--- xpat2-1.
+++ xpat2-1.
@@ -19,22 +19,8 @@
static int audio = 1;
if (audio && checksound()) {
char fullname[200];
- FILE *fp, *fsnd;
- int c;
- if (!(fsnd = fopen(AUDIO_DEVICE, "wb"))) {
- audio = 0;
- return; /* cannot open /dev/audio */
- }
flush_display();
- sprintf(fullname, "%s/audio/%s.au", LIBDIR, filename);
- if (!(fp = fopen(fullname, "rb"))) {
- fclose(fsnd);
- return;
- }
- /* yeah, copy data */
- while ((c = getc(fp)) != EOF)
- fputc(c, fsnd);
- fclose(fsnd);
- fclose(fp);
+ sprintf(fullname, "aplay %s/audio/%s.au", LIBDIR, filename);
+ system(fullname);
}
}
After extracting the source file 'xpat2_
'XPATROOT = /usr/games/
'XPATROOT = /usr/share/
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: xpat2 1.07-17
ProcVersionSign
Uname: Linux 2.6.35-23-generic i686
Architecture: i386
Date: Tue Dec 28 09:43:35 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
LANG=en_AU.utf8
SHELL=/bin/bash
SourcePackage: xpat2