Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <RenderableSource.h>
Public Types | |
enum | UpdateFlags { UPDATE_ALL = 0x0F, UPDATE_LOCATION = 0x01, UPDATE_ATTRIBUTES = 0x02, UPDATE_EFFECTS = 0x04, UPDATE_GAIN = 0x08 } |
Public Member Functions | |
virtual | ~RenderableSource () |
void | startPlaying (Timestamp start=0) throw (Exception) |
void | stopPlaying () throw () |
bool | isPlaying () const throw () |
Timestamp | getPlayingTime () const throw (Exception) |
Source * | getSource () const throw () |
void | seek (Timestamp time) throw (Exception) |
void | update (int flags, const Listener &sceneListener) throw () |
![]() | |
virtual | ~UserData () |
Protected Member Functions | |
RenderableSource (Source *source) throw () | |
virtual void | startPlayingImpl (Timestamp start)=0 throw (Exception) |
virtual void | stopPlayingImpl ()=0 throw (Exception) |
virtual bool | isPlayingImpl () const =0 throw (Exception) |
virtual Timestamp | getPlayingTimeImpl () const =0 throw (Exception) |
virtual void | updateImpl (int flags, const Listener &sceneListener)=0 throw (Exception) |
virtual void | seekImpl (Timestamp time)=0 throw (Exception) |
Renderable Source abstract class
Definition at line 34 of file RenderableSource.h.
Enumerator | |
---|---|
UPDATE_ALL | |
UPDATE_LOCATION | |
UPDATE_ATTRIBUTES | |
UPDATE_EFFECTS | |
UPDATE_GAIN |
Definition at line 46 of file RenderableSource.h.
|
protected |
Internal constructor used by derived classes
Definition at line 11 of file RenderableSource.cpp.
|
virtual |
Definition at line 16 of file RenderableSource.cpp.
Get the playing position of a playing source
Definition at line 57 of file RenderableSource.cpp.
References getPlayingTimeImpl().
|
protectedpure virtual |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.
Referenced by getPlayingTime().
|
inline |
Get the attached source
Definition at line 75 of file RenderableSource.h.
Referenced by Audio::OpenALRenderableSource::attachALBuffers(), Audio::OpenALRenderableStreamingSource::getPlayingTimeImpl(), and Audio::OpenALRenderableStreamingSource::queueALBuffers().
bool Audio::RenderableSource::isPlaying | ( | ) | const | |
throw | ( | |||
) |
Is the source still playing?
Definition at line 45 of file RenderableSource.cpp.
References e, and isPlayingImpl().
Referenced by stopPlaying().
|
protectedpure virtual |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.
Referenced by isPlaying().
Seek to the specified position
EndOfStreamException | if you try to seek past the end |
Definition at line 73 of file RenderableSource.cpp.
|
protectedpure virtual |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.
Play the source from the specified timestamp
start | The starting position. Defaults to the beginning. |
Definition at line 22 of file RenderableSource.cpp.
References start.
|
protectedpure virtual |
start | The starting position. |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.
void Audio::RenderableSource::stopPlaying | ( | ) | ||
throw | ( | |||
) |
Stop a playing source
Definition at line 34 of file RenderableSource.cpp.
References e, isPlaying(), and stopPlayingImpl().
|
protectedpure virtual |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.
Referenced by stopPlaying().
Update the underlying API with dirty attributes
flags | You may specify which attributes to update. Not all attributes are equally costly, so you'll want to ease up on some, pump up some others. You may or-combine flags. |
sceneListener | A reference listener. If it is the root listener attached to the renderer, no special translation is done, but if it is not, coordinates will be first translated to listener-space. |
Definition at line 63 of file RenderableSource.cpp.
References e, fprintf, and Audio::Exception::what().
|
protectedpure virtual |
Implemented in Audio::OpenALRenderableStreamingSource, and Audio::OpenALRenderableSource.