| Line | |
|---|
| 1 | #ifndef AUDIOOBJECT_H_ |
|---|
| 2 | #define AUDIOOBJECT_H_ |
|---|
| 3 | |
|---|
| 4 | #include <iostream> |
|---|
| 5 | #include "../../include/AL/al.h" |
|---|
| 6 | #include "../../include/AL/alc.h" |
|---|
| 7 | #include "../../include/AL/alut.h" |
|---|
| 8 | |
|---|
| 9 | namespace audio |
|---|
| 10 | { |
|---|
| 11 | class AudioObject |
|---|
| 12 | { |
|---|
| 13 | public: |
|---|
| 14 | AudioObject(std::string audioFile); |
|---|
| 15 | ~AudioObject(); |
|---|
| 16 | |
|---|
| 17 | void play(); |
|---|
| 18 | void pause(); |
|---|
| 19 | void stop(); |
|---|
| 20 | |
|---|
| 21 | private: |
|---|
| 22 | ALboolean LoadALData(); |
|---|
| 23 | void SetListenerValues(); |
|---|
| 24 | void KillALData(); |
|---|
| 25 | |
|---|
| 26 | std::string audioFile_; |
|---|
| 27 | |
|---|
| 28 | ALuint Buffer; |
|---|
| 29 | ALuint Source; |
|---|
| 30 | ALfloat SourcePos[3]; |
|---|
| 31 | ALfloat SourceVel[3]; |
|---|
| 32 | ALfloat ListenerPos[3]; |
|---|
| 33 | ALfloat ListenerVel[3]; |
|---|
| 34 | ALfloat ListenerOri[6]; |
|---|
| 35 | }; |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | #endif /*AUDIOOBJECT_H_*/ |
|---|
Note: See
TracBrowser
for help on using the repository browser.