Here are some observations working with Java3D 1.3.1 beta 1,
for the benefit of anyone else warring with Java3D audio, and
for feedback to Kelvin et al at Sun.

Problem 1: sound cloning problem

Periodically, and not by any obvious cause, a single sound
source will ignore a setEnable(false), and a subsequent
setEnable(true) will result in two copies of the audio
source being played out *at double speed*.  It sounds
like 50% of the buffers are being discarded because the audio
progresses at double time without the pitch doubling.
This is bad, but very hard to reproduce.

Problem 2: sound priorities

I create a headspace mixer and it reports 8 audio channels available.
I then create 12 ConeSound objects, all with the default priority,
and all with looped audio via
       sound.setLoop(ConeSound.INFINITE_LOOPS);
I expect to be able to hear 8 of them.
In fact I hear 10 sounds.  Odd, but okay.

The problem is that I can never hear the two sounds
which have been excluded, even as I disable all of the other
sounds with setEnable(false) and restart the two
silently playing sounds.

However there is a partial workaround.  If you call
setLoop(0) on each sound before setEnable(false)
then the silently playing sounds become audible
but *only* if they are restarted.  I would expect
the silently playing songs to become audible as
soon as the active songs are disabled, but that
doesn't happen.

Looks to me like there are some logic problems
in managing the audio channels.
       1) An audio channel is not released when active
       sounds with setLoop(INFINITE_LOOPS) are disabled.
       2) If an audio channel becomes free due to an active sound
       being disabled, the channel is not allocated to enabled sounds
       which are waiting for an audio channel.  It is available to
       newly enabled sounds.

Environment: W2K + J3D 1.3.1 beta 1 + J2sdk1.4.1
I'm testing all of this within Xj3D M6.1, so no standalone repros.

-Guy.

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