Jump to content

Recommended Posts

Posted

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??

 

Posted

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Posted

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.

My job is to make tools you love, with the features you want, and performance you can't live without.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...