forked from treeman/Rejection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tracks.hpp
51 lines (38 loc) · 773 Bytes
/
Tracks.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef TRACKS_HPP_INCLUDED
#define TRACKS_HPP_INCLUDED
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include "Hge/Hge.hpp"
struct SongInfo {
SongInfo( std::string n, HSTREAM s ) : name(n), stream(s)
{ }
std::string name;
HSTREAM stream;
};
struct Song {
Song( HCHANNEL c, SongInfo i ) : channel(c), info(i)
{ }
HCHANNEL channel;
SongInfo info;
};
class Tracks {
public:
Tracks();
~Tracks();
void Next();
void Prev();
void Play();
void Stop();
bool IsPlaying();
std::string Name();
void Update( float );
private:
typedef std::vector<SongInfo> SongInfos;
SongInfos songinfos;
typedef std::vector<SongInfo>::iterator SongInfoIt;
SongInfoIt songinfo_it;
boost::shared_ptr<Song> curr_song;
HgeObj hge;
};
#endif