Playing sound: what to use?

R

rapunzeljoy

I am writing some code that includes the capability to play sound.
After reading many tutorials I have some interesting stuff going.
However, we tried changing a file recorded in a slightly different
format for the file played in the demo I copied from and it gave a
javax.sound.sampled.UnsupportedAudioFileException that said that it
only supported 44100 kHz, 16 bit, mono, Windows PCM format audio. Why
is that? I thought javax.sound.sampled was supposed to support several
variations. At least, that's what it seems to say in the javadocs.
There is a getFormat method that tells you about the format, so I would
assume that you could set it to play various formats. How do you do get
it to play, say 44100, 8 bit mono? I mean, sure I can convert the
audio beforehand, but that is time and storage consuming if I need to
convert lots of audio.

Also, what could I use to play a VOX file? Thanks to whoever is a sound
guru.

Rebecca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top