On Mar 16 17:37:19, [email protected] wrote:
> Hi ports --
>
> Attached is a tarball for ctronome, a command line metronome.
>
> Works for me on amd64 and loongson; I assume it will work on macppc and all
> other archs as well due to the simplicity of the program, but I haven't
> tested it.
Works fine on my IBM Thinkpad,
but fails on current/amd64:
$ ctronome prog_example.txt
FATAL: your wav has 1 channels, while your DSP only supports 2 channels.
Apparently, this doesn't use any of the sndio functionality,
and talks to audio hardware directly via the dsp_* routines
(ossaudio).
Indeed, the audio interface on this machine can only do stereo itself.
I believe most audio hardware now can do stereo (and possibly not mono).
Would it make sense to hardwire the stereo wav's to be used by ctronome?
It works for me with patch-ctronome_h replaced with the diff bellow.
Jan
$OpenBSD$
--- ctronome.h.orig Wed Aug 22 14:52:58 2012
+++ ctronome.h Sat Mar 16 17:01:12 2013
@@ -1,4 +1,4 @@
-#include <sys/soundcard.h>
+#include <soundcard.h>
#include <stdint.h>
#define MYNAME "ctronome"
@@ -8,7 +8,7 @@
/* set up these three variables to your system */
-static char *metronomewav1 = "/usr/share/ctronome/metronome1.wav\0";
-static char *metronomewav2 = "/usr/share/ctronome/metronome2.wav\0";
-static char *dspdev = "/dev/dsp\0";
+static char *metronomewav1 = "/usr/share/ctronome/metronome1_stereo.wav\0";
+static char *metronomewav2 = "/usr/share/ctronome/metronome2_stereo.wav\0";
+static char *dspdev = "/dev/audio\0";
/* means: 1/4, 1/8 etc. */
static int default_base_note = 4;