]> git.tdb.fi Git - libs/al.git/blobdiff - source/jukebox.h
Split Sound into SoundDecoder and Waveform parts
[libs/al.git] / source / jukebox.h
index 2b4e0cdf7c6d1667db823b1973a521535d082321..fe17f2e4a58f456338eff200046f577e80f61498 100644 (file)
@@ -1,29 +1,26 @@
-/* $Id$
-
-This file is part of libmspal
-Copyright © 2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_AL_JUKEBOX_H_
 #define MSP_AL_JUKEBOX_H_
 
 #include <list>
 #include <string>
+#include <sigc++/signal.h>
 #include "source.h"
 #include "streamer.h"
 
 namespace Msp {
 namespace AL {
 
-class Sound;
+class SoundDecoder;
 
 class Jukebox
 {
+public:
+       sigc::signal<void, const std::string &> signal_track_changed;
+
 private:
        Source source;
        Streamer streamer;
-       Sound *sound;
+       SoundDecoder *decoder;
        std::list<std::string> tracks;
        std::list<std::string>::iterator current_track;
        bool shuffle;
@@ -36,10 +33,12 @@ public:
        void add_track(const std::string &);
        void remove_track(const std::string &);
        void clear_tracks();
+       const std::string &get_current_track() const;
        void set_shuffle(bool);
 
        void play();
        void next();
+       void previous();
        void stop();
        void tick();
 };