Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleSource.h
Go to the documentation of this file.
1 //
2 // C++ Interface: Audio::SimpleSource
3 //
4 #ifndef __AUDIO_SIMPLESOURCE_H__INCLUDED__
5 #define __AUDIO_SIMPLESOURCE_H__INCLUDED__
6 
7 #include "Exceptions.h"
8 #include "Types.h"
9 #include "Format.h"
10 
11 #include "Source.h"
12 #include "SimpleScene.h"
13 
14 namespace Audio {
15 
26  class SimpleSource : public Source, public SharedFromThis<SimpleSource>
27  {
28  private:
29  bool playing;
30  SimpleScene *scene;
31 
32  public:
33  virtual ~SimpleSource();
34 
36  SimpleSource(SharedPtr<Sound> sound, bool looping = false) throw();
37 
39  void notifySceneAttached(SimpleScene *scene) throw();
40 
42  SimpleScene* getScene() const throw();
43 
44  // The following section contains all the virtual functions that need be implemented
45  // by a concrete Sound class. All are protected, so the stream interface is independent
46  // of implementations.
47  protected:
48 
50  virtual void startPlayingImpl(Timestamp start) throw(Exception);
51 
53  virtual void stopPlayingImpl() throw(Exception);
54 
56  virtual bool isPlayingImpl() const throw(Exception);
57  };
58 
59 };
60 
61 #endif//__AUDIO_SIMPLESOURCE_H__INCLUDED__