Guy Carpenter wrote:
I'm trying to set the sound source for
a pointSound.  If I load sound data from a MediaContainer
created from a URL, like this, it works:

    MediaContainer sample = new MediaContainer("file:/d:/vrml/doodoo.wav");
    sound.setSoundData(sample);

However if instead I create the MediaContainer
from an InputStream like this:

    InputStream inputStream = new BufferedInputStream(new
FileInputStream("d:/vrml/doodoo.wav"));
    MediaContainer sample = new MediaContainer(inputStream);
    sound.setSoundData(sample);

then I get no sound, and these two lines of output:
    null: Sound source data could not be loaded
    null: Sound source data could not be loaded

I have a complete standalone repro here:
    http://clearwater.com.au/java/J3DSound6.java
I'm using a HeadspaceMixer.

Has any one managed to create a MediaContainer from an InputStream
and feed it to pointSound or coneSound?

Has anyone tried just using an AudioDevice?  We'd lose spatialized
sound, but that would be ok till Sun can fix the 3D version.  I haven't
looked at the setup but the bug parade mentions AudioDevice3D problems.

--
Alan Hudson
President: Yumetech, Inc.                      http://www.yumetech.com/
Web3D Open Source Chair        http://www.web3d.org/TaskGroups/source/

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to