Solved

Javazoom.com's PlaybackListener

Posted on 2004-04-12
4
668 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split53 challenge 7 95
Apps blocked by Java 9 79
web services creation SOAP vs REST 5 38
web application structure 18 76
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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.

785 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