I just put up a useful new tool on the Marketplace under Scripts & Tools this afternoon… some of you might find it handy! It’s a simple entity that plays looping audio, with positional updating (so the sound can move about in space), and sound volume control. Set Visible to false after you position it, so you don’t have to see the pink speaker cone.
Just rez this entity into your domain, open it up in the edit window, and specify a few parameters:
- soundURL - An URL to a 48k 16bit PCM wav file
- soundVolume - Between 0 (mute) and 1 (full blast). So, 0.5 is half volume.
- refreshInterval - How many milliseconds between updating the sound’s position in space?
RefreshInterval is really only useful if your sound emitter needs to move, like the buzzing sound that follows a bee. If your sound emitter doesn’t move very often, just set it to 1000ms (1 second). If it’s important that the sound keep precisely up with the changes of position, you can set it as low as 10ms.