nick.ace Posted May 30, 2015 Share Posted May 30, 2015 I have two questions regarding sound: 1. What are listeners? I can't find any documentation on what they actually are or are supposed to do. 2. Has anyone tried the firepit workshop item? It uses a source object in the code, but the farther you get away from it the volume stays the same and sounds the same no matter your position towards it (and there is no stereo effect, like if one ear is closer to the sound than the other, although this might not be implemented). I checked that it's a mono sound, so this behavior seems odd to me since the sound gets positioned at a certain point (so it should be 3D sound). Basically, it sounds like an ambient sound. What are 3D positioned sounds supposed to do? Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 30, 2015 Share Posted May 30, 2015 I found listener via a search under API Reference. http://www.leadwerks.com/werkspace/page/api-reference/_/listener/listener-r482 Quote Link to comment Share on other sites More sharing options...
nick.ace Posted May 30, 2015 Author Share Posted May 30, 2015 Yeah but that's so vague. How is it different than a source and what is it supposed to be used for? Only one argument and no examples doesn't really help. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 30, 2015 Share Posted May 30, 2015 This has an example of a listener http://www.leadwerks.com/werkspace/page/documentation/_/source/sourcesetposition-r323 I really would encourage using the search function under API Reference and in the forums Quote Link to comment Share on other sites More sharing options...
nick.ace Posted May 30, 2015 Author Share Posted May 30, 2015 What does it do though? btw, I saw that example. That example doesn't help or explain anything at all for listeners! Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 30, 2015 Share Posted May 30, 2015 It "sounds" like one of the problems I reported about sources here: http://www.leadwerks.com/werkspace/topic/12542-source-setrange-issue/#entry90449 thats been buried under tutorial reports (Josh really should have made a separate category from engine related bugs for that). 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...
nick.ace Posted May 30, 2015 Author Share Posted May 30, 2015 It "sounds" like one of the problems I reported about sources here: http://www.leadwerks.com/werkspace/topic/12542-source-setrange-issue/#entry90449 thats been buried under tutorial reports (Josh really should have made a separate category from engine related bugs for that). I was reading that bug report, and the ordering I can confirm makes a difference. I started testing stuff out and the ordering matters, but there are other problems I see as well. My test: I opened up tutorial map 7, which is the big industrial map with the crawlers and stuff. I placed the firepit right in front of the big door under the stairs. I started the game, but the sound gets softer the closer you move towards the pit (which shouldn't happen since the listener is parented to the camera, and the source is positioned at the global position of what it is attached to). This also happens in a map I'm working on for a game right now. The volume is inverted. After digging in the code for the FPS template, it seems that the listener gets attached to the camera, not really sure why there ever would be a need for a listener away from the camera (maybe more clarification on this design decision would help). Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 30, 2015 Share Posted May 30, 2015 You might want to try restarting your pc because something is definitely not right there, I just downloaded the firepit and it appears to work properly - louder the closer you get / silent when more than 5 meters from it using the fpsplayer. I really miss the LE2 version of entity:EmitSound() as it would inherently take care of the source position and allow you to use source commands on it. The LE3 version of sources seems to have some issues when it comes to ranges, setting the position before playing, and location/creation of listeners seems to have no effect (sometimes). 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...
nick.ace Posted May 30, 2015 Author Share Posted May 30, 2015 Ok thanks, I'll try again tomorrow. Edit: figured it out, there was another SetPosition() somewhere else Quote 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.