Initial commit
[camargo/neiasound.git] / src / nSoundStreamerPlaylist.cpp
1 #include "nSoundStreamerPlaylist.h"
2
3 nSoundStreamerPlaylist::nSoundStreamerPlaylist(QObject *parent) :
4     QObject(parent),
5     m_loopPlaylist(false),
6     m_items(QList<nSoundStreamerItem>())
7 {
8 }
9
10 nSoundStreamerPlaylist::~nSoundStreamerPlaylist()
11 {
12 }
13
14 void nSoundStreamerPlaylist::createItem(nSoundStream * stream, bool loop)
15 {
16     qDebug("Item");
17
18     if(!stream)
19     {
20         qWarning("Attempted to create nSoundStreamerPlaylist item with null stream pointer.");
21         return;
22     }
23
24     nSoundStreamerItem item;
25     item.m_soundStream = stream;
26     item.m_loop = loop;
27     m_items.append(item);
28
29 }
30
31 nSoundStreamerItem nSoundStreamerPlaylist::item(int index)
32 {
33     return m_items[index];
34 }
35
36 void nSoundStreamerPlaylist::clearItems()
37 {
38     m_items.clear();
39 }