[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Bug in Liveice fixed on OpenBSD



A more useful version of the "diff" is included at the very end of this message.

JT

Date: Mon, 25 Sep 2000 21:16:36 -0400
To: ports_(_at_)_openbsd_(_dot_)_org
From: John Todd <jtodd_(_at_)_loligo_(_dot_)_com>
Subject: Bug in Liveice fixed on OpenBSD
Cc: spm_(_at_)_star_(_dot_)_arm_(_dot_)_ac_(_dot_)_uk

For i386 platforms on OpenBSD, the following diff displays the fixes performed to make LiveIce function correctly using gogo as an encoder.

Liveice, in conjunction with a "live" audio stream via a soundcard, will allow one to encode directly from audio-in into a shoutcast/icecast MP3 streaming server. Handy for lights-out radio rebroadcasting, which is what I'm using it for.

I have no idea if this was an OpenBSD specific bug or if this is a general problem with all variations of the software; I didn't do the repair, and I can't program my way out of a paper bag with both hands and a roadmap, to mix my metaphors.

The curses-based display is still very sloppy, with "gogo" (my chosen MP3 encoder) dumping garbage all over the screen due to stderr/stdout write problems, but it works which is all I currently care about.

Liveice can be found on http://star.arm.ac.uk/~spm/software/liveice.html

JT


wxpn# cd liveice-unmodified-source wxpn# diff streams.c ../this.is.good.liveice/streams.c 39c39 < #include <machine/soundcard.h> --- > #include <soundcard.h> 662c662,666 < open_soundcard(O_RDWR); --- > if(g_conf.full_duplex) /* do we want full-duplex mode? */ > open_soundcard(O_RDWR); /* yes, open read/write */ > else > open_soundcard(O_RDONLY); /* no, open read only */ > wxpn#


wxpn# diff -u streams.c ../this.is.good.liveice/streams.c
--- streams.c   Tue May 23 14:08:00 2000
+++ ../modified.liveice/streams.c       Wed Sep 20 01:14:22 2000
@@ -36,7 +36,7 @@
 #ifdef HAVE_SYS_SOUNDCARD_H
 #include <sys/soundcard.h>
 #else
-#include <machine/soundcard.h>
+#include <soundcard.h>
 #endif
 #endif
 #include <sys/ioctl.h>
@@ -659,7 +659,11 @@
                close_esdmon(enc);
        } else {
 #ifdef SOUNDCARD_SUPPORT
-               open_soundcard(O_RDWR);
+        if(g_conf.full_duplex) /* do we want full-duplex mode? */
+         open_soundcard(O_RDWR); /* yes, open read/write */
+       else
+         open_soundcard(O_RDONLY); /* no, open read only */
+
                read_soundcard();
                close_soundcard();
 #else
wxpn#