Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2000 17:04:25 -0400
From:      Rob Furphy <rcf@ox.com>
To:        "freebsd-java@FreeBSD.ORG" <freebsd-java@FreeBSD.ORG>
Subject:   Native JDK sound
Message-ID:  <394E8AD9.25790642@ox.com>

next in thread | raw e-mail | index | archive | help
Hi,
Thought I'd share what I've found in case anyone is also looking into
this.

I have tested the Java2D demo in the JDK build under every patchset back
to patchset 5(had to rebuild that one).
The good news is that under patchset 5 the sound does indeed
work(mostly).  The bad news is that patchset 6
and subsequent patchsets do not have working sound (But we knew that).

There seems to be a problem related to the HaeDevice in sun.audio.  When
attempting to instanciate a
HaeMixer object an HaeException is thrown.

I have tracked this down to the file HAE_API_freebsd.c in
src/freebsd/native/sun/audio

The versions of this file are very different between patchset5 (which
sorta worked) and subsequent
patchsets (which don't work).  Looks like the file was changed to use
"/dev/audio" instead of "/dev/dsp"
and a host of other changes to support this fundamental change.  Perhaps
whoever made these changes
could look back and fix the file or offer suggestions.

For the patchset 9 sound the call to ioctl() in the function
HAE_Setup(void) in the above mentioned file is
returning an error (errno 22 - "Invalid Argument") and this becomes the
exception which is thrown.
Also, the sound device is open()ed as read only, is this right?  I hope
to look at this again soon, but I wanted to report in.

Any hints or suggestions would be appreciated.  BTW the audio plays
better in the native JDK
than through the Linux emulation.

Rob Furphy

PS.
For what it's worth here's something fun to do.  Save a copy of your
patchset 9 version of the above mentioned
file.  Place a copy of the patchset 5 version of the file into your
patchset 9.  Rebuild the (9)JDK and install.
Sound will now work in the (9)JDK, but with some gotchas.  Only ".mid"
and ".rmf" files play correctly,
".au", ".wav" and ".aiff" files do not.  Try out the Java2D demo under
the "Mix" tab.  YMMV





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?394E8AD9.25790642>