[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Javazoom.com's PlaybackListener

Posted on 2004-04-12
4
Medium Priority
?
708 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 1600 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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.
Suggested Courses

656 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