• Post Reply Bookmark Topic Watch Topic
  • New Topic

i want to play wav audio files in java

 
Giri Regu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i want to play wav and mp3 songs using java program
i can easily play au audio format files using Audio clip interface
if i tryplay other files it throws unsuppoterfile format exception.
help me please
if any body have sample code thats very help to me
thanks in advance
[ December 04, 2006: Message edited by: Bear Bibeault ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

AudioClip only supports the .au format. Starting with Java 1.4, the javax.sound.sampled package should be used for playing audio. The Java Almanac has code examples for that.
 
J. Insi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
then how about the wav file?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read and consider my post?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AudioClip also supports WAV files these days.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!