Package javazoom.jlgui.basicplayer

Examples of javazoom.jlgui.basicplayer.BasicController


        removeAll();
        bundle = ResourceBundle.getBundle("plugins/audioPlayer/javazoom/jlgui/player/amp/util/ui/device");
        setBorder(new TitledBorder(getResource("title")));
        BoxLayout layout = new BoxLayout(this, BoxLayout.Y_AXIS);
        setLayout(layout);
        BasicController controller = null;
        if (player != null) controller = player.getController();
        if ((controller != null) && (controller instanceof BasicPlayer))
        {
            bplayer = (BasicPlayer) controller;
            List devices = bplayer.getMixers();
View Full Code Here


    public void play(String filename) {
// Instantiate BasicPlayer.
        BasicPlayer player = new BasicPlayer();
// BasicPlayer is a BasicController.
        BasicController control = (BasicController) player;
// Register BasicPlayerTest to BasicPlayerListener events.
// It means that this object will be notified on BasicPlayer
// events such as : opened(...), progress(...), stateUpdated(...)
        player.addBasicPlayerListener(this);

        try { // Open file, or URL or Stream (shoutcast, icecast) to play.
            control.open(new File(filename));

// control.open(new URL("http://yourshoutcastserver.com:8000"));
// Start playback in a thread. control.play();
// If you want to pause/resume/pause the played file then
// write a Swing player and just call control.pause(),
// control.resume() or control.stop().
// Use control.seek(bytesToSkip) to seek file
// (i.e. fast forward and rewind). seek feature will
// work only if underlying JavaSound SPI implements
// skip(...). True for MP3SPI and SUN SPI's
// (WAVE, AU, AIFF). // Set Volume (0 to 1.0). control.setGain(0.85);
// Set Pan (-1.0 to 1.0).
            control.setPan(0.0);
            control.play();
        } catch (BasicPlayerException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of javazoom.jlgui.basicplayer.BasicController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.