39 lines
No EOL
535 B
C++
39 lines
No EOL
535 B
C++
#pragma once
|
|
|
|
#include <AL/al.h>
|
|
#include <AL/alc.h>
|
|
#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);
|
|
void setVolume(float volume);
|
|
|
|
private:
|
|
ALuint source;
|
|
ALuint buffer;
|
|
ALenum format;
|
|
|
|
};
|
|
|
|
} |