Solved

sound

Posted on 2002-04-11
2
154 Views
Last Modified: 2010-03-31
Hi,

i am having no look with adding sound into my application.
this is the code i have so far.

public void mousePressed(MouseEvent event)
{
Object source = event.getSource();
if (source == comparelsbuttons[0])
{ System.out.println("mpsd comparelsbuttons[0]");
earlyactivitiescount++;
comparelsbuttons[0].removeMouseListener(this);
WellDoneSound();
}
}


public void WellDoneSound()
{
System.out.println("In welldonesound 1");
try
{
System.out.println("In welldonesound 2");
URL welldoneurl = new URL("file://C:/Java/FYP/sounds/welcome.wav");
AudioClip welldoneclip = JApplet.newAudioClip(welldoneurl);
welldoneclip.play();
}
catch (MalformedURLException e){System.err.println(e.getMessage());}
}

the application is compiling and running correctly.
the sound file is functioning correctly both on its own and in another tester application!
any ideas???????

thank you



0
Comment
Question by:Codster
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 10 total points
ID: 6935399
Whats the sample rate of your wav file?
0
 

Author Comment

by:Codster
ID: 6935403
i havent got a clue? where will i find that?
Thank you
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Java virtual machine monitoring tools 3 39
array220 challenge 8 45
count11 challenge 6 47
Strange loading of website behaviour 3 23
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now