Yes, yes. And if u r not using simple universe, u can use the following code:
PhysicalEnvironment physicalEnv = new PhysicalEnvironment();
JavaSoundMixer soundEnv = new JavaSoundMixer(physicalEnv);
soundEnv.initialize();
physicalEnv.setAudioDevice(soundEnv);
view.setPhysicalEnvironment(physicalEnv);
vladimir
-=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net
>-------<=============>-------<
In your previous letter u wrote:
--------------------------------
TB> Question: does setLoop() work? I have my BackgroundSound playing, but all
TB> values of setLoop() are ignored. Hmm, I just went and recompiled
TB> SimpleSounds.java in the demos and it seems like all values are ignored
TB> there too. Is there some magic to getting Sound.setLoop() to work?
TB> It seems like the single most common application for a BackgroundSound
TB> would be to run forever, for ambience, so this is making me feel stupid.
TB> COuld this be my sound card? Hm......
TB> BTW, previously I couldn't get any sound at all, asking: why doesn't this
TB> work?
TB> MediaContainer mc = new MediaContainer();
TB> mc.setURL("url-of-my-.au-file");
TB> BackgroundSound sound = new BackgroundSound();
TB> sound.setLoop(0);
TB> sound.setEnable(true);
TB> sound.setSoundData(mc);
TB> sound.setInitialGain(0.7f);
TB> sound.setSchedulingBounds(box); // bounds include where I am
TB> myMainBranchGroup.addChild(sound);
TB> Answer: add the following line of code:
TB> AudioDevice ad = simpleUniverse.getViewer().createAudioDevice();
TB> ===========================================================================
TB> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
TB> of the message "signoff JAVA3D-INTEREST". For general help, send email to
TB> [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".