Thanks both of you! :p I should add it to the SFML projects page, I think it has been there once but under different game(5 years of dev :p)
Here, I believe problem either occured here in setDirection(), not sure how?
Or below on the buffer area?
Problem is I really just renamed stuff , nothing to fancy, like from "SetDirection" to "setDirection" :S and all went to hell with the sound.
Bolded things are what I suspect what caused it while changing it...(I didn't change the values, just adopted the functions)
void Composer::setListenerPosition(const vec3 &aPosition)
{
sf::Listener::setPosition(aPosition.x, 5 /*aPosition.y*/, aPosition.z);
}
int Composer::playSoundInternal( const Res &aSound, const vec3 &aPosition, const bool aUsePosition, const float aVolume, const bool aLoop )
{
sf::Listener::setDirection(0, -1, 0);
//get sound "sound"
sf::SoundBuffer* buffer = sound->getSoundBuffer();
tmp->gSoundPlayer->setBuffer(*buffer);
tmp->gSoundPlayer->setLoop(aLoop);
tmp->gSoundPlayer->setVolume(tmp->gVolume * 100.0f * aVolume);
if (aUsePosition) {
tmp->gSoundPlayer->setPosition(sf::Vector3f(aPosition.x, 0/*aPosition.y*/, aPosition.z));
tmp->gSoundPlayer->setMinDistance(27.f);
tmp->gSoundPlayer->setAttenuation(3.f);
tmp->gSoundPlayer->setRelativeToListener(false);
}
else {
tmp->gSoundPlayer->setRelativeToListener(true);
tmp->gSoundPlayer->setPosition(sf::Vector3f(0, 0, 0));
}
}
Main question would be, did anyone have any similar issues happen to him while doing the change?
I wil try to create a simple example but atm. this is like playing with fire due to very complicated process of how everything was written(very old code which if you touch without proper knowledge everything goes to hell and then nobody is happy)