Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jan 2002 10:56:18 -0500
From:      "Robert Furphy" <rfurphy@ox.com>
To:        freebsd-java@FreeBSD.ORG
Subject:   Re: Playing audio with Java (JDK 1.3.1)???
Message-ID:  <3C35D0A2.50106@ox.com>
References:  <Pine.LNX.4.33.0201040157360.6341-100000@daedalus.cs.brandeis.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg is correct.  The last time I munged with the sound code was back in
1.2.2 days (a year or more ago I think).  I remember that .au and .mid files
worked, and maybe .rmf.  I think I remember .wav and .aiff files not 
working.
There is a demo in the 1.2.2 jdk tree which allowed me to test all the 
various
formats easily but it has since changed in 1.3.1 and 1.4.0 to not have 
the tab
page for playing the sound files.  The demo I'm talking about is in
<jdkrootdir>/demo/jfc/Java2D.  (Check the "Mix" tab page)

There are some low level calls being made by the JVM to the sound hardware
which don't properly initialize the sound card for the file formats 
which don't
work.  Long ago I left some initial debugging messages in the source to 
try to
discover what was wrong but I don't know if they're stiil there or if I 
was even
on the right track to fixing the JVM.

I think sound support is being moved more to the JMF api.  Perhaps there 
is where
you'll find good example programs for how playing sound is supposed to 
be done
going forward (jdk1.3.1, jdk1.4.0 and beyond) like jmstudio.


Rob Furphy

 

Mikhail Kruk wrote:

>I have appletviewer from 1.3.1 playing au files more or less fine.
>I suspect that you are just asking to much of it. Last time I checked
>appletviewer was playing only .au files (sun's audio format). I might be
>wrong here though... I think that last time was around jdk 1.1 :)
>In other words try your applet on win32 or Linux, maybe it it's not
>supposed to work.
>
>>On Thu, Jan 03, 2002 at 04:20:29PM -0500, Brian Skrab wrote:
>>
>>>	I'm attempting to play a small WAV file on my FreeBSD box, running
>>>	4.4-STABLE and jdk1.3.1.  Using the method described in almost every
>>>	Java sound tutorial I've found results in the application simply
>>>	waiting forever.  Here is the source code that I'm using:
>>>
>>I've no idea who has tested playing sound other than you, but as the
>>person who munged in the sound code from 1.2.2, I can tell you that this
>>is the first time I've heard from someone who has tested the code under
>>1.3.1.  I can also tell you that I have no sound card, nor any familiarity
>>with how sound playing works.
>>
>>However, I'm told that the sound support did partially work in 1.2.2
>>(Rob Furphy got it to that stage).  I believe that it did play some
>>formats but not others.  So, I'd try another format :).
>>
>>I would guess that your chances of JavaSound stuff working well is
>>pretty limited unless someone (with a sound card preferably :) steps
>>up in terms of debugging it.
>>
>>Probably not what you wanted to hear, but may be helpful :).
>>
>>--
>>Greg Lewis                            Email : glewis@eyesbeyond.com
>>Eyes Beyond                           Phone : (801) 796 6999
>>Information Technology                Web   : http://www.eyesbeyond.com
>>
>>
>>To Unsubscribe: send mail to majordomo@FreeBSD.org
>>with "unsubscribe freebsd-java" in the body of the message
>>
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-java" in the body of the message
>




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?3C35D0A2.50106>