From owner-freebsd-java Mon Jun 19 14: 4:32 2000 Delivered-To: freebsd-java@freebsd.org Received: from firewall.ox.com (firewall.ox.com [129.77.1.1]) by hub.freebsd.org (Postfix) with ESMTP id 11FDF37B517 for ; Mon, 19 Jun 2000 14:04:29 -0700 (PDT) (envelope-from rcf@ox.com) Received: from firewall.ox.com (root@localhost) by firewall.ox.com with ESMTP id RAA17471 for ; Mon, 19 Jun 2000 17:04:28 -0400 (EDT) Received: from pur-wk-rfurphy.ny.ox.com (pur-wk-rfurphy.ny.ox.com [129.77.2.133]) by firewall.ox.com with ESMTP id RAA17467 for ; Mon, 19 Jun 2000 17:04:27 -0400 (EDT) Received: from ox.com (localhost.ny.ox.com [127.0.0.1]) by pur-wk-rfurphy.ny.ox.com (8.9.3/8.9.3) with ESMTP id RAA02008 for ; Mon, 19 Jun 2000 17:04:25 -0400 (EDT) (envelope-from rcf@ox.com) Message-ID: <394E8AD9.25790642@ox.com> Date: Mon, 19 Jun 2000 17:04:25 -0400 From: Rob Furphy X-Mailer: Mozilla 4.73 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: "freebsd-java@FreeBSD.ORG" Subject: Native JDK sound Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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