martyj Posted March 28, 2016 Share Posted March 28, 2016 I am having trouble getting 3d sound to work. Setting up a listener at the player position Player* player = this; Listener* playerLIstener; this->playerListener->SetPosition(player ->GetPosition(), true); this->playerListener->SetRotation(player ->GetRotation(), true); Setting up the playing source testSound = Sound::Load("Sound/Npc/walking.wav"); source = Source::Create(); source->SetSound(testSound); source->SetPosition(Vec3(0.0, 2.0, 0.0)); source->SetLoopMode(true); The audio file in question is Mono. http://i.imgur.com/Xh1EuSO.png Playing of the audio: if (window->KeyHit(Key:)) { if (source->GetState() == Source::Playing) { source->Stop(); } else { source->Play(); } } The audio is playing in both speakers, but the audio doesn't change volume as the distance grows. Any ideas why the volume isn't changing relative to distance? Quote Link to comment Share on other sites More sharing options...
macklebee Posted March 28, 2016 Share Posted March 28, 2016 Sounds like the bug report i posted almost a year ago: http://www.leadwerks.com/werkspace/topic/12542-source-setrange-issue/#entry90447 Along with an issue with the SetRange(), I also found at the time that you have to position the source after it is played. If you position the source then play it, then it appears to not be positioned and will play the source at full volume. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
martyj Posted March 29, 2016 Author Share Posted March 29, 2016 @Macklebee you were 100% right. As far as Range goes, is 1.0 one meter? I found that I couldn't hear anything if the range was about 10.0. Quote Link to comment Share on other sites More sharing options...
macklebee Posted March 29, 2016 Share Posted March 29, 2016 As far as Range goes, is 1.0 one meter? I found that I couldn't hear anything if the range was about 10.0. The SetRange() or source issue seems to be resolved since that bug was posted. What used to happen was the source could be heard when the range was set to less than 1 meter no matter the distance between the source and the listener. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.