Hi Corsya,
I use WAV files in my applicaction and it runs nices, by now. ;)
This is the way I do it:
1) Statup sound engine when you create your scene.
disp_snd=simpleU.getViewer().createAudioDevice();
2) Load the files.
CONTENEDOR=new MediaContainer("file:sonidos/" + "file.wav");
CONTENEDOR.setCacheEnable(true);
3) Now it's time to create a PointSound with its properties.
BoundingSphere limites=new BoundingSphere(new
Point3d(0.0,0.0,0.0),100.0);
SONIDO=new PointSound();
SONIDO.setSoundData(CONTENEDOR);
SONIDO.setPosition(0.0f,0.0f,0.0f);
SONIDO.setInitialGain(1.0f);
SONIDO.setCapability(PointSound.ALLOW_ENABLE_WRITE);
SONIDO.setCapability(PointSound.ALLOW_ENABLE_READ);
SONIDO.setSchedulingBounds(limites);
4) Add it to the scenegraph
TG.addChild(SONIDO);
5) When you need to play the sound, you write:
SONIDO.setEnable(true);
Regards from Spain.
V�ctor
Corysia Taware ha escrito:
> I'm starting to work with sound and I'm running into
> some difficulties. The first thing I tried was to use
> WAV files instead of AU files in the provided demos,
> but that wasn't successful. I continually got an
> error when attempting to load the WAV. Does it need
> to be a certain format?
>
> Second, I'm wondering about the capabilites of the 3D
> sound engine in Java3D. Is everything done thru
> emulation? Does a Soundscape use EAX capabilities and
> hardware acceleration?
>
> Does anyone have some simple sound demos? I'm looking
> for an example of how to use a PointSound and a
> BackgroundSound. So far, I haven't been able to hear
> anything, so getting started has been difficult.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> ===========================================================================
> 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".
--
"Cuando le� los problemas que causa beber, dej� de leer."
===========================================================================
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".