mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Remove the unused streamSound3D method
This commit is contained in:
parent
c33349a774
commit
fefc8f86ab
3 changed files with 0 additions and 49 deletions
|
@ -709,50 +709,6 @@ SoundPtr OpenAL_Output::streamSound(const std::string &fname, float volume, floa
|
|||
return sound;
|
||||
}
|
||||
|
||||
SoundPtr OpenAL_Output::streamSound3D(const std::string &fname, const float *pos, float volume, float pitch,
|
||||
float min, float max)
|
||||
{
|
||||
throwALerror();
|
||||
|
||||
boost::shared_ptr<OpenAL_SoundStream> sound;
|
||||
ALuint src;
|
||||
|
||||
if(mFreeSources.empty())
|
||||
fail("No free sources");
|
||||
src = mFreeSources.front();
|
||||
mFreeSources.pop_front();
|
||||
|
||||
try
|
||||
{
|
||||
DecoderPtr decoder = mManager.getDecoder();
|
||||
decoder->open(fname);
|
||||
sound.reset(new OpenAL_SoundStream(*this, src, decoder));
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
mFreeSources.push_back(src);
|
||||
throw;
|
||||
}
|
||||
|
||||
alSource3f(src, AL_POSITION, pos[0], pos[2], -pos[1]);
|
||||
alSource3f(src, AL_DIRECTION, 0.0f, 0.0f, 0.0f);
|
||||
alSource3f(src, AL_VELOCITY, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
alSourcef(src, AL_REFERENCE_DISTANCE, min);
|
||||
alSourcef(src, AL_MAX_DISTANCE, max);
|
||||
alSourcef(src, AL_ROLLOFF_FACTOR, 1.0f);
|
||||
|
||||
alSourcef(src, AL_GAIN, volume);
|
||||
alSourcef(src, AL_PITCH, pitch);
|
||||
|
||||
alSourcei(src, AL_SOURCE_RELATIVE, AL_FALSE);
|
||||
alSourcei(src, AL_LOOPING, AL_FALSE);
|
||||
throwALerror();
|
||||
|
||||
sound->play();
|
||||
return sound;
|
||||
}
|
||||
|
||||
|
||||
void OpenAL_Output::updateListener(const float *pos, const float *atdir, const float *updir)
|
||||
{
|
||||
|
|
|
@ -43,10 +43,7 @@ namespace MWSound
|
|||
virtual SoundPtr playSound(const std::string &fname, float volume, float pitch, bool loop);
|
||||
virtual SoundPtr playSound3D(const std::string &fname, const float *pos, float volume, float pitch,
|
||||
float min, float max, bool loop);
|
||||
|
||||
virtual SoundPtr streamSound(const std::string &fname, float volume, float pitch);
|
||||
virtual SoundPtr streamSound3D(const std::string &fname, const float *pos, float volume, float pitch,
|
||||
float min, float max);
|
||||
|
||||
virtual void updateListener(const float *pos, const float *atdir, const float *updir);
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ namespace MWSound
|
|||
virtual SoundPtr playSound3D(const std::string &fname, const float *pos, float volume, float pitch,
|
||||
float min, float max, bool loop) = 0;
|
||||
virtual SoundPtr streamSound(const std::string &fname, float volume, float pitch) = 0;
|
||||
virtual SoundPtr streamSound3D(const std::string &fname, const float *pos, float volume, float pitch,
|
||||
float min, float max) = 0;
|
||||
|
||||
virtual void updateListener(const float *pos, const float *atdir, const float *updir) = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue