diff options
author | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-24 21:16:13 -0400 |
---|---|---|
committer | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-24 21:16:13 -0400 |
commit | f81d611f0e298baffad68d83f208e2306fe38739 (patch) | |
tree | f42732149fe2bfb7d28e26ed36067d24fb21b30c /engine/xe_sound.cpp | |
parent | delete old files (diff) | |
download | minecraftvulkan-f81d611f0e298baffad68d83f208e2306fe38739.tar.gz minecraftvulkan-f81d611f0e298baffad68d83f208e2306fe38739.tar.bz2 minecraftvulkan-f81d611f0e298baffad68d83f208e2306fe38739.zip |
remove Xe From engine class names
Diffstat (limited to 'engine/xe_sound.cpp')
-rw-r--r-- | engine/xe_sound.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engine/xe_sound.cpp b/engine/xe_sound.cpp index 07d8e7b..e458356 100644 --- a/engine/xe_sound.cpp +++ b/engine/xe_sound.cpp @@ -6,7 +6,7 @@ namespace xe { -XeSound::XeSound(const std::string& filename) { +Sound::Sound(const std::string& filename) { buffer = alutCreateBufferFromFile(filename.c_str()); @@ -21,43 +21,43 @@ XeSound::XeSound(const std::string& filename) { } -XeSound::~XeSound() { +Sound::~Sound() { alDeleteSources(1, &source); alDeleteBuffers(1, &buffer); } -void XeSound::play() { +void Sound::play() { stop(); alSourcePlay(source); }; -void XeSound::stop() { +void Sound::stop() { alSourceStop(source); }; -void XeSound::pause() { +void Sound::pause() { alSourcePause(source); }; -void XeSound::resume() { +void Sound::resume() { alSourcePlay(source); }; -bool XeSound::isPlaying() { +bool Sound::isPlaying() { ALint playing; alGetSourcei(source, AL_SOURCE_STATE, &playing); return playing == AL_PLAYING; }; -void XeSound::setPosition(glm::vec3 position) { +void Sound::setPosition(glm::vec3 position) { alSource3f(source, AL_POSITION, position.x, position.y, position.z); }; -void XeSound::setLooping(bool looping) { +void Sound::setLooping(bool looping) { alSourcei(source, AL_LOOPING, looping ? 1 : 0); }; -void XeSound::setVolume(float volume) { +void Sound::setVolume(float volume) { alSourcef(source, AL_GAIN, volume); } |