![]() |
![]() |
Accueil > Intranet Michel Buffa > Plarpebu 1.1 : netbeans and eclipse projects
Plarpebu 1.1 : netbeans and eclipse projectsDe $1Table des matièresIntroductionOk, here are some ready to go projects for plarpebu : Netbeans project
How to run / compile under netbeans :Unrar the archive, you should get a Plarpebu1.1 directory. Open it with netbeans (I'm using the netbeans 6.8 version with jdk 1.6_17), you should get : Notice that almist every package has "plugins" in its name !!! Yep, nearly everything is a plugin... long story... To run it, you can not right-click the project and choose run in the menu. Go to the "Files tab", open the Plarpebu1.1 directory in the tree, and right click the build.xml file, that is in fact a makefile for the ant tool. Then choose run target, and choose run to run the project (it will compile if necessary the modified files), or just compile, etc... I'll try to explain what package does what and what each source file does, work in progress... Good luck ! Package explanationsThere are several high level packages : com.plarpebu contains the main files for the player (non graphic) : Player.java is the main part of the code : it loads all the plugins (uses a lib for that, written by a collegue of mine, Richard Grin + modified by myself) and uses PluginMenuItem.java + PluginMenuItemFactory.java to build the menu depending on the plugins that have been found in the plugins dir. Plugins are jar files, by the way. The SkinMgr.java files contains all the code for skinning. It uses the skinlf.jar lib by Frederic Lavigne. com.plarpebu.basicplayer contains the two (non graphic) players : the midi player and the mp3 player (that also plays ogg, flac files...). The Composite player is just a holder for both the mp3 and midi player and choose which one to use depending on the type of the file to be played. It implements a BasicController interface with start(), stop(), etc. The BasicPlayer is the superclass for BasicMP3Player and BasicMidiPlayer, it holds all the code for registering Listeners and sending them events. Remember that the players are non graphic. When a file is played, listeners will get events for the current position in the sound file, time, etc... BasicPlayer does that. The BasicMidiPlayer is just a holder for the JavaSoundMidiKar.java player (that is the real implementation of a midi player). It clones the functionalities from the BasicMP3Player : sets the artist name, length, style, etc it mimics the id3 tags even if we are playing a karaoke file (that usually contains such informations about the song in one text midi track). The BasicMP3Player is a real player that deals also with id3 tags. This package is an attempt to make an abstraction of the different players and give them a unified behavior.
Mots clés:
|
Powered by MindTouch Deki Open Source Edition v.8.08 |