X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fjukebox.h;h=ea19723451649aa8ad0374b4ad19515318fba065;hb=HEAD;hp=2b4e0cdf7c6d1667db823b1973a521535d082321;hpb=abef5eab53c6c75cd602fdabdec94259d1523858;p=libs%2Fal.git diff --git a/source/jukebox.h b/source/jukebox.h index 2b4e0cd..ea19723 100644 --- a/source/jukebox.h +++ b/source/jukebox.h @@ -1,45 +1,44 @@ -/* $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 #include +#include +#include #include "source.h" #include "streamer.h" namespace Msp { namespace AL { -class Sound; +class Playlist; +class SoundDecoder; class Jukebox { +public: + sigc::signal signal_track_changed; + private: Source source; Streamer streamer; - Sound *sound; - std::list tracks; - std::list::iterator current_track; - bool shuffle; + IO::Seekable *in; + SoundDecoder *decoder; + const Playlist *playlist; + unsigned current; public: Jukebox(); ~Jukebox(); Source &get_source() { return source; } - void add_track(const std::string &); - void remove_track(const std::string &); - void clear_tracks(); - void set_shuffle(bool); + void set_playlist(const Playlist *); + const Playlist *get_playlist() const { return playlist; } + unsigned get_current_track() const { return current; } void play(); void next(); + void previous(); void stop(); void tick(); };