• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Sound not loading

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi my sound will not load when I run my applet... Here's the code try and spot the error btw I am using eclipse IDE and no errors come up when I run it or am typing in the code so its defiantly summin I have done...

 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Preston wrote:Hi my sound will not load when I run my applet



Do you have the two mp3 files, and are they in the right place?

Also, you should get rid of the deprecated method call, not suppress the warning.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Preston wrote:Hi my sound will not load when I run my applet... Here's the code try and spot the error btw I am using eclipse IDE and no errors come up when I run it or am typing in the code so its defiantly summin I have done...


hello......
Firstly, don't use stop() method of thread class,its deprecated.
Secondly, you cannot play mp3 using audioclip interface.Convert it into .au.
Thirdly,bye........
 
randy orton
Greenhorn
Posts: 15
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

Adam Preston wrote:Hi my sound will not load when I run my applet



Do you have the two mp3 files, and are they in the right place?

Also, you should get rid of the deprecated method call, not suppress the warning.


hi.....
as far as i know we cannot play mp3 using audio clip interface............
 
Adam Preston
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kk, thanks guys I'm getting this code from a book which uses JDK 1.1. Is there any way I can still keep the code but modify the stop part. And btw I will try using the .au sound file and report back in a bit. But I got another piece of code on my hands which I am trying to resolve you'll see that posted in a minute... I will also take the suppress warnings off
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

randy orton wrote:
as far as i know we cannot play mp3 using audio clip interface............



Good catch. I hadn't noticed that.
 
Adam Preston
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope still doesn't work... even with the things changed.
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Preston wrote:kk, thanks guys I'm getting this code from a book which uses JDK 1.1. Is there any way I can still keep the code but modify the stop part. And btw I will try using the .au sound file and report back in a bit. But I got another piece of code on my hands which I am trying to resolve you'll see that posted in a minute... I will also take the suppress warnings off



Read the API for the deprecated method. You'll find a recommendation there.

In general, all deprecated method APIs provide the recommended way to accomplish whatever it was that the method does.
 
randy orton
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Adam Preston wrote:Nope still doesn't work... even with the things changed.


I had run the code using .au and its working fine.If it still does not work check your applet tag.......
Refer this link for deprecationthread deprecation
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic