Guest Red Ocktober Posted June 28, 2010 Share Posted June 28, 2010 i'm having a lil problem understanding the volume and range of a sound produced with EmitSound()... i did a search for any anomolies, and verified that i was using the function correctly (range is the 3rd argument, volume the fourth)... question... does the sound volume get lower the farther you are away from the sound emitter, or do you have to control the volume manually... question... is playsound() a better alternative... thx in advance... --Mike Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 28, 2010 Share Posted June 28, 2010 The volume gets gradually lower until it reaches 0 at the distance which is set with the range parameter. You must use mono sounds, since stereo sounds are only 0D (they are always hearable, no matter where you are), mono sounds are 3D and 4D. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Flexman Posted June 28, 2010 Share Posted June 28, 2010 Indeed, use mono audio files only. EmitSound returns a TSource. You might want to store that to adjust volume and pitch. Here's some code from my CH47 model... class.soundcompressor = LoadSound("abstract::ch47_compressor_loop.ogg") ... ... object.source_compressor = object.model:EmitSound(class.soundcompressor,75,1,1) SetSourceVolume(object.source_compressor,0.5); That should be all there is to it. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 28, 2010 Share Posted June 28, 2010 thanks for the info guys... checking stuff now... [edit] that darn squeak sound used in the windmill was stereo... thx again for that really helpfull piece of info about the stereo sound not fading... --Mike 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.