I've been running audio/hydrogen on an AMD64 machine with uaudio output; the
stock install can't play audio and instead spews the following messages to
stderr:

  [EMAIL PROTECTED] hydrogen DefaultSong.h2song

  Hydrogen 0.9.3 [Dec 24 2006]  [http://www.hydrogen-music.org]
  Copyright 2002-2005 Alessandro Cominu


  Compiled modules:  (FLAC) (OSS)

  Hydrogen comes with ABSOLUTELY NO WARRANTY
  This is free software, and you are welcome to redistribute it
  under certain conditions. See the file COPYING for details

  Using data path: /usr/local/share/hydrogen/data
  [WARNING]   SongReader          [readSong] Trying to load a song created with 
a different version of hydrogen.
  [WARNING]   SongReader          [readSong] Song 
[/usr/local/share/hydrogen/data/demo_songs/TR808kit-demo.h2song] saved with 
version 0.9.2-cvs
  [LadspaFX::getPluginList] reading directory: /usr/local/lib/hydrogen/plugins
  [LadspaFX::getLadspaFXGroup]
  [LadspaFX::getPluginList] reading directory: /usr/local/lib/hydrogen/plugins
  [ERROR]     OssDriver           ERROR_IOCTL: unable to set BlockSize
  [ERROR]     Hydrogen            [audioEngine_startAudioDrivers] Error 
starting audio driver [audioDriver::connect()]
  [ERROR]     Hydrogen            [audioEngine_startAudioDrivers] Using the 
NULL output audio driver
  [ERROR]     Hydrogen            [audioEngine_startAudioDrivers] 
m_pMainBuffer_L == NULL
  [ERROR]     Hydrogen            [audioEngine_startAudioDrivers] 
m_pMainBuffer_R == NULL
  [ERROR]     Hydrogen            [audioEngine_setupLadspaFX] nBufferSize=0
  [ERROR]     NullDriver          [setBpm] not implemented yet

Tracking things down a bit I added the following diff to
patches/patch-src_lib_drivers_OssDriver_cpp:

$OpenBSD: patch-src_lib_drivers_OssDriver_cpp,v 1.1.1.1 2006/09/25 18:56:00 
grange Exp $
--- src/lib/drivers/OssDriver.cpp.orig  Mon Oct 17 23:31:42 2005
+++ src/lib/drivers/OssDriver.cpp       Mon Dec 25 00:07:15 2006
@@ -178,11 +180,11 @@ int OssDriver::connect() {
 
        infoLog( "Blocksize audio = " + toString( bs ) );
 
-       if (bs != ( 1 << bufferBits) ){
+       /*if (bs != ( 1 << bufferBits) ){
                errorLog("ERROR_IOCTL: unable to set BlockSize");
                close(fd);
                return 1;
-       }
+       }*/
 
        int format = AFMT_S16_LE;
        if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) == -1) {

And now Hydrogen works fine. I'm not 100% sure, but reading the code in the
OSS driver, it looks to me like Hydrogen can't actually set the block size;
instead it just tries to assert that the block size is what it would like to
be, and if it isn't it errors. I am unclear as to whether this is OpenBSD /
uaudio / AMD64 specific or not.

I've sent this patch a couple of times to the listed maintainer, but haven't
heard anything back, hence this message to [EMAIL PROTECTED]


Laurie
-- 
http://tratt.net/laurie/    -- Personal
http://convergepl.org/      -- The Converge programming language
http://sosym.dcs.kcl.ac.uk/ -- Software and Systems Modelling Team

Reply via email to