Naughty Alien Posted January 25, 2010 Share Posted January 25, 2010 hi guys..here is simple one..I would like to know, if I do this: Sound_01=LoadSound("MySound.ogg") Sound_02=LoadSound("MySound.ogg") Im wondering how file MySound.ogg going to be loaded?? Twice or it will be automatically reused for Sound_02 since its previously loaded already?? Quote Link to comment Share on other sites More sharing options...
Niosop Posted January 25, 2010 Share Posted January 25, 2010 According to the wiki: This command loads a sound from an audio file. The formats that the engine can load are OGG and WAV. The LoadSound function will return a handle to any previously loaded sound from the same file to avoid loading assets twice. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Josh Posted January 25, 2010 Share Posted January 25, 2010 It will load a second instance of the sound from the loaded reference. In pragmatic terms, this simply means you'll increase memory usage by about 12 bytes and have no loading from the hard drive. When both instances are deleted, the reference will be deleted, which is where the real sound data is stored. So go ahead and do it if you want. Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.