2
\$\begingroup\$

Is there an easy way to put music in a java applet? Preferably streaming so that it doesn't need to be preloaded.

\$\endgroup\$
1
  • \$\begingroup\$ As this isn't game development specific, you might get a better response at stackoverflow.com. \$\endgroup\$
    – Ricket
    Aug 27, 2010 at 14:56

2 Answers 2

1
\$\begingroup\$

You might try something like this, though as the author said he didn't stream so it stuttered. You'd want to preload a certain amount of the sound before feeding it to the Line.

\$\endgroup\$
1
  • \$\begingroup\$ Yes, it's not exactly what I'm looking for, but I guess there is no other easy way to do this. Thanks for the answer. \$\endgroup\$
    – Danik
    Aug 28, 2010 at 14:05
1
\$\begingroup\$

This site may help you, it contains a lot of examples of how to use the Java sound API (loading, playing, streaming, recording...).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .