dungeon_crawler

view prototype/src/audio/source.h @ 51:d57df51f6b50

- fixed audio panning (listener direction) - particles had no fog - sound sources were not destroyed properly
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 18 Sep 2012 09:40:56 +0300
parents aa9e28670ae2
children
line source
1 #ifndef SOURCE_H_
2 #define SOURCE_H_
4 #include "vmath/vmath.h"
5 #include "sample.h"
7 class AudioSource {
8 private:
9 unsigned int alsrc;
10 const AudioSample *sample;
12 public:
13 AudioSource();
14 ~AudioSource();
16 void set_sample(const AudioSample *sample);
17 const AudioSample *get_sample() const;
19 void set_position(const Vector3 &pos, bool viewspace = false);
20 Vector3 get_position() const;
22 void set_volume(float vol);
23 float get_volume() const;
25 void set_reference_dist(float rdist);
26 float get_reference_dist() const;
28 bool is_playing() const;
29 void play();
30 void stop();
31 };
33 #endif // SOURCE_H_