summaryrefslogtreecommitdiff
path: root/engine/xe_sound.cpp
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-09-22 13:21:30 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-09-22 13:21:30 -0400
commit8d9c74bc4f9652739143163f6861682999fbfbe5 (patch)
treefade1044a4fef66e67c6ca8cf9f1c0e13b4b6a53 /engine/xe_sound.cpp
parentadd alut (diff)
downloadminecraftvulkan-8d9c74bc4f9652739143163f6861682999fbfbe5.tar.gz
minecraftvulkan-8d9c74bc4f9652739143163f6861682999fbfbe5.tar.bz2
minecraftvulkan-8d9c74bc4f9652739143163f6861682999fbfbe5.zip
finish openal and ALUT
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() {