1 #ifndef MSP_DEMOSCENE_DEMO_H_
2 #define MSP_DEMOSCENE_DEMO_H_
4 #include <sigc++/signal.h>
5 #include <msp/al/sounddecoder.h>
6 #include <msp/al/source.h>
7 #include <msp/al/streamer.h>
8 #include <msp/datafile/collection.h>
9 #include <msp/gl/windowview.h>
10 #include "sequencer.h"
15 sigc::signal<void> signal_finished;
19 Msp::DataFile::Collection &resources;
20 Msp::GL::WindowView view;
21 Msp::AL::Source *music_source;
22 Msp::AL::Streamer *streamer;
23 Msp::IO::Seekable *music_io;
24 Msp::AL::SoundDecoder *music_decoder;
25 Msp::Time::TimeDelta frame_interval;
26 Msp::Time::TimeStamp last_tick;
27 Msp::Time::TimeStamp next_frame;
29 Demo(Msp::Graphics::Window &, Msp::Graphics::GLContext &, Msp::DataFile::Collection &);
33 void set_fixed_framerate(float);
34 const Msp::Time::TimeStamp &get_next_frame_time() const { return next_frame; }
36 void play_music(const std::string &);
38 void seek(const Msp::Time::TimeDelta &);