diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index cda6c89dd..4aa76cc63 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -93,10 +93,10 @@ public: OpenAL_SoundStream(DecoderPtr decoder); virtual ~OpenAL_SoundStream(); - void Play(float volume, float pitch); - virtual void Stop(); + void play(float volume, float pitch); + virtual void stop(); virtual bool isPlaying(); - virtual void Update(const float *pos); + virtual void update(const float *pos); }; class OpenAL_Sound : public Sound @@ -108,9 +108,9 @@ public: OpenAL_Sound(ALuint src, ALuint buf); virtual ~OpenAL_Sound(); - virtual void Stop(); + virtual void stop(); virtual bool isPlaying(); - virtual void Update(const float *pos); + virtual void update(const float *pos); }; @@ -159,7 +159,7 @@ OpenAL_SoundStream::~OpenAL_SoundStream() mDecoder->close(); } -void OpenAL_SoundStream::Play(float volume, float pitch) +void OpenAL_SoundStream::play(float volume, float pitch) { std::vector data(sBufferSize); @@ -182,7 +182,7 @@ void OpenAL_SoundStream::Play(float volume, float pitch) throwALerror(); } -void OpenAL_SoundStream::Stop() +void OpenAL_SoundStream::stop() { alSourceStop(mSource); alSourcei(mSource, AL_BUFFER, 0); @@ -234,7 +234,7 @@ bool OpenAL_SoundStream::isPlaying() return true; } -void OpenAL_SoundStream::Update(const float *pos) +void OpenAL_SoundStream::update(const float *pos) { alSource3f(mSource, AL_POSITION, pos[0], pos[2], -pos[1]); alSource3f(mSource, AL_DIRECTION, 0.0f, 0.0f, 0.0f); @@ -254,7 +254,7 @@ OpenAL_Sound::~OpenAL_Sound() alGetError(); } -void OpenAL_Sound::Stop() +void OpenAL_Sound::stop() { alSourceStop(mSource); throwALerror(); @@ -270,7 +270,7 @@ bool OpenAL_Sound::isPlaying() return state==AL_PLAYING; } -void OpenAL_Sound::Update(const float *pos) +void OpenAL_Sound::update(const float *pos) { alSource3f(mSource, AL_POSITION, pos[0], pos[2], -pos[1]); alSource3f(mSource, AL_DIRECTION, 0.0f, 0.0f, 0.0f); @@ -427,7 +427,7 @@ Sound* OpenAL_Output::streamSound(const std::string &fname, float volume, float decoder->open(fname); sound.reset(new OpenAL_SoundStream(decoder)); - sound->Play(volume, pitch); + sound->play(volume, pitch); return sound.release(); } diff --git a/apps/openmw/mwsound/sound.hpp b/apps/openmw/mwsound/sound.hpp index 3b4736fd6..84725464b 100644 --- a/apps/openmw/mwsound/sound.hpp +++ b/apps/openmw/mwsound/sound.hpp @@ -1,17 +1,13 @@ #ifndef GAME_SOUND_SOUND_H #define GAME_SOUND_SOUND_H -#include - -#include "../mwworld/ptr.hpp" - namespace MWSound { class Sound { - virtual void Stop() = 0; + virtual void stop() = 0; virtual bool isPlaying() = 0; - virtual void Update(const float *pos) = 0; + virtual void update(const float *pos) = 0; public: virtual ~Sound() { } diff --git a/apps/openmw/mwsound/soundmanager.cpp b/apps/openmw/mwsound/soundmanager.cpp index c496701c7..5d9a37065 100644 --- a/apps/openmw/mwsound/soundmanager.cpp +++ b/apps/openmw/mwsound/soundmanager.cpp @@ -159,14 +159,14 @@ namespace MWSound void SoundManager::stopMusic() { if(mMusic) - mMusic->Stop(); + mMusic->stop(); setPlaylist(); } void SoundManager::streamMusicFull(const std::string& filename) { if(mMusic) - mMusic->Stop(); + mMusic->stop(); mMusic.reset(mOutput->streamSound(filename, 0.4f, 1.0f)); } @@ -358,7 +358,7 @@ namespace MWSound while(iditer != snditer->second.end()) { const ESM::Position &pos = ptr.getCellRef().pos; - iditer->second->Update(pos.pos); + iditer->second->update(pos.pos); iditer++; } }