Solved

Javazoom.com's PlaybackListener

Posted on 2004-04-12
4
658 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
Comment Utility
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
Comment Utility
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
Comment Utility
nevermind just needed to play around with it a bit more, thanks for your help though

0
 
LVL 92

Expert Comment

by:objects
Comment Utility
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
array11 challenge 16 50
Free Alternative to JIRA 4 51
advertisement module in core php 4 78
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

763 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

10 Experts available now in Live!

Get 1:1 Help Now