Solved

Javazoom.com's PlaybackListener

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
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.

733 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