Solved

Javazoom.com's PlaybackListener

Posted on 2004-04-12
4
682 Views
Last Modified: 2012-05-04
Hey i dont know if any of you have played around with
javazoom's Mp3 Layer, but if you could you tell me how to use set
the playbackListener, since i do not know how to. Im use to a Listener being an interface and then just implementing it.
thanks for your help like always, you guys are all great.




AdvancedPlayer a; PlayBackListener p;

 a=soundm.playMp3(new File(file),p);

    a.setPlayBackListener(p);
0
Comment
Question by:DrunkenTigerDDD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 10809113
you just need to extend instead of implement:

public class MyPlaybackListener extend PlaybackListener
{
   public void playbackFinished(PlaybackEvent evt)
   {
        // do your stuff here
   }
           
  public void playbackStarted(PlaybackEvent evt)  
  {
        // do your stuff here
  }
}

0
 

Author Comment

by:DrunkenTigerDDD
ID: 10810697
Hey i did try that before, and when i do i get a NullPointerException, so is it in the way i set the playbacklistener?

a=soundm.playMp3(new File(file),p);

?? Will that set p to a PlaybackListener?
0
 

Author Comment

by:DrunkenTigerDDD
ID: 10810703
nevermind just needed to play around with it a bit more, thanks for your help though

0
 
LVL 92

Expert Comment

by:objects
ID: 10810716
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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.

729 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