1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/games/gracer/files/patch-ab
Chris D. Faulhaber a85ec5feb6 Update port to 0.1.4
Add sound support

PR:		15141
Submitted by:	Maintainer
1999-12-27 23:15:21 +00:00

24 lines
624 B
Plaintext

Index: src/sound.cxx
@@ -30,6 +30,21 @@
int Sound_Init (Tcl_Interp *interp)
{
sched = new slScheduler (8000);
+ /*
+ * check for sound working, otherwise we get a segfault in
+ * sched->addSampleEnvelope below if /dev/dsp is not configured
+ */
+ if (sched->not_working()) {
+#if 0
+ /* XXX this gets a few
+ * `gracer in free(): warning: junk pointer, too high to make sense.'
+ * don't ask me why. So we'll just leak memory, it should only
+ * be allocated once per process...
+ */
+ delete sched;
+#endif
+ sched = NULL;
+ }
if (sched) {
sched->setSafetyMargin (0.2);
}