2022-09-22 15:14:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AL/al.h>
|
2022-09-22 15:29:32 +00:00
|
|
|
#include <AL/alc.h>
|
2022-09-22 15:14:00 +00:00
|
|
|
#include <AL/alut.h>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#define GLM_FORCE_RADIANS
|
|
|
|
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
|
|
|
|
namespace xe {
|
|
|
|
|
|
|
|
class XeSound {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
XeSound(const std::string& filename);
|
|
|
|
~XeSound();
|
|
|
|
|
|
|
|
void play();
|
|
|
|
void stop();
|
|
|
|
void pause();
|
|
|
|
void resume();
|
|
|
|
|
|
|
|
bool isPlaying();
|
|
|
|
|
|
|
|
void setPosition(glm::vec3 position);
|
|
|
|
void setLooping(bool looping);
|
2022-09-22 17:36:03 +00:00
|
|
|
void setVolume(float volume);
|
2022-09-22 15:14:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
ALuint source;
|
|
|
|
ALuint buffer;
|
|
|
|
ALenum format;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|