summaryrefslogtreecommitdiff
path: root/engine/xe_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--engine/xe_sound.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/engine/xe_sound.cpp b/engine/xe_sound.cpp
index d315179..09589fa 100644
--- a/engine/xe_sound.cpp
+++ b/engine/xe_sound.cpp
@@ -8,20 +8,8 @@ namespace xe {
XeSound::XeSound(const std::string& filename) {
- // ALvoid *data;
- // ALsizei size, freq;
- // ALenum format;
- // ALboolean loop;
- // char *bufferData;
-
- alutInit(0, NULL);
-
- std::cout << std::hex << alutGetError() << "\n";
-
buffer = alutCreateBufferFromFile(filename.c_str());
- std::cout << std::hex << alutGetError() << "\n";
-
alGenSources(1, &source);
alSourcef(source, AL_GAIN, 1.f);
@@ -30,13 +18,13 @@ XeSound::XeSound(const std::string& filename) {
alSource3f(source, AL_VELOCITY, 0, 0, 0);
alSourcei(source, AL_LOOPING, AL_FALSE);
alSourcei(source, AL_BUFFER, buffer);
+ alSourcef(source, AL_GAIN, 3.f);
}
XeSound::~XeSound() {
alDeleteSources(1, &source);
alDeleteBuffers(1, &buffer);
- alutExit();
}
void XeSound::play() {