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
OpenALRenderableStreamingSource.h
Go to the documentation of this file.
1 //
2 // C++ Interface: Audio::OpenALRenderableSource
3 //
4 #ifndef __AUDIO_OPENALRENDERABLESTREAMINGSOURCE_H__INCLUDED__
5 #define __AUDIO_OPENALRENDERABLESTREAMINGSOURCE_H__INCLUDED__
6 
7 #include "al.h"
8 
9 #include "../../RenderableSource.h"
10 
11 #include "../../Exceptions.h"
12 #include "../../Types.h"
13 
14 namespace Audio {
15 
24  {
25  ALuint alSource;
26  bool atEos;
27  bool shouldPlay;
28  bool buffering;
29 
30  public:
32 
34 
41  bool shouldBePlaying() const { return shouldPlay && !atEos; }
42 
43  protected:
45  virtual void startPlayingImpl(Timestamp start) throw(Exception);
46 
48  virtual void stopPlayingImpl() throw(Exception);
49 
51  virtual bool isPlayingImpl() const throw(Exception);
52 
54  virtual Timestamp getPlayingTimeImpl() const throw(Exception);
55 
57  virtual void updateImpl(int flags, const Listener& sceneListener) throw(Exception);
58 
60  virtual void seekImpl(Timestamp time) throw(Exception);
61 
63  ALuint getALSource() const { return alSource; }
64 
70  void queueALBuffers() throw(Exception);
71  };
72 
73 };
74 
75 #endif//__AUDIO_OPENALRENDERABLESTREAMINGSOURCE_H__INCLUDED__