29 #ifndef _BaseSound_H__ 30 #define _BaseSound_H__ 36 #include <OgreDataStream.h> 52 virtual void play() { this->doPlay(); }
53 virtual bool stop() {
return this->doStop(); }
54 virtual void pause() { this->doPause(); }
56 bool isPlaying()
const {
return this->state_ == State::Playing; }
57 bool isPaused()
const {
return this->state_ == State::Paused; }
58 bool isStopped()
const {
return this->state_ == State::Stopped; }
62 {
return this->source_; }
64 void setVolume(
float vol);
66 {
return this->volume_; }
70 {
return this->bLooping_; }
71 void setLooping(
bool val);
74 {
return this->pitch_; }
75 void setPitch(
float pitch);
93 { this->setPitch(this->pitch_); }
95 { this->setLooping(this->bLooping_); }
97 { this->setVolume(this->volume_); }
99 { this->setSource(this->source_); }
102 virtual void initialiseSource();
103 ALint getSourceState()
const;
105 virtual float getRealVolume() = 0;
void pitchChanged()
Definition: BaseSound.h:92
void source(const std::string &filename)
Reads the content of a file and executes the commands in it line by line.
Definition: ConsoleCommandCompilation.cc:167
bool getLooping() const
Definition: BaseSound.h:69
State
Definition: BaseSound.h:78
Listable stores the entries of all object lists pointing to this instance.
Definition: Listable.h:50
virtual bool stop()
Definition: BaseSound.h:53
::std::string string
Definition: gtest-port.h:756
float getPitch() const
Definition: BaseSound.h:73
The BaseSound class is the base class for all sound file loader classes.
Definition: BaseSound.h:45
float pitch_
Definition: BaseSound.h:114
bool bLooping_
Definition: BaseSound.h:112
xmlelement
Definition: Super.h:519
bool bPooling_
Definition: BaseSound.h:108
void sourceChanged()
Definition: BaseSound.h:98
DataStreamPtr dataStream_
Definition: BaseSound.h:117
SharedPtr< DataStream > DataStreamPtr
Definition: CorePrereqs.h:365
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
float getVolume() const
Definition: BaseSound.h:65
bool isStopped() const
Definition: BaseSound.h:58
void volumeChanged()
Definition: BaseSound.h:96
Shared library macros, enums, constants and forward declarations for the orxonox library ...
std::string source_
Definition: BaseSound.h:110
bool isPaused() const
Definition: BaseSound.h:57
virtual void play()
Definition: BaseSound.h:52
Declaration of Listable, the base of all classes whose instances can be stored in object lists...
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
ALuint audioSource_
Definition: BaseSound.h:107
virtual void pause()
Definition: BaseSound.h:54
void loopingChanged()
Definition: BaseSound.h:94
std::shared_ptr< SoundBuffer > soundBuffer_
Definition: BaseSound.h:109
int ALint
Definition: OrxonoxPrereqs.h:223
unsigned int ALuint
Definition: OrxonoxPrereqs.h:222
virtual const std::string & getSource() const
Definition: BaseSound.h:61
bool isPlaying() const
Definition: BaseSound.h:56
State state_
Definition: BaseSound.h:113
float volume_
Definition: BaseSound.h:111