I've not figured out how to translate a call like this
        simpleU.getViewer().createAudioDevice();
for use with a non-simple VirtualUniverse.

I did spent some time working with this approach:
            AudioEngine3D a3d = new AudioEngine3D(physicalEnvironment);
            physicalEnvironment.setAudioDevice(a3d);
            a3d.initialize();
but was unable to get it to work.  The device is created and attached
to the universe, but I couldn't get any audio.

whereas the following works, at least with certain MediaContainer types
            HeadspaceMixer mixer = new HeadspaceMixer(physicalEnvironment);
            mixer.initialize();

For completeness, the sample code I pointed to before:
        http://clearwater.com.au/java/J3DSound6.java
contains both implementations, with the AudioEngine3D method
switched out in favour of the HeadSpaceMixer.

At 10:59 AM 21/11/2002 -0600, John Wright wrote:
Alan, we've used:
  AudioDevice audioDev = simpleU.getViewer().createAudioDevice();
in our 3D worlds but we did have unpredictable problems (locking up
after a random amount of time, often HOURS later) but can't specifically
identify sound as the exact problem but it clearly increased the
frequency of crashing.  This was back on Java 3D 1.2, so far with Java
3D 1.3 we have done almost no work with sound.

- John Wright
Starfire Research

Alan Hudson wrote:
>
> 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".

===========================================================================
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".
===========================================================================
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