Jump to content

FreeSource


AggrorJorn
 Share

Recommended Posts

I need to know whether Lua handles this the same way as with C++.

I tried both source:Free() as FreeSource(source). FreeSource is not recoqnised as a function. And Free only works returns errors.

 

if KeyHit(KEY_P)==1 then
	source1 = CreateSource(sound1)
	PlaySource(source1)
	source1:Free()
end

Link to comment
Share on other sites

Well this deffinetly stops the sound since the source is empty, but I don't know if it is really gone. Do you think this affects the source being freed?

 

My soundcard seems to have an enormous amount of audio channels and I can't test whether the all audio channels are full.

Link to comment
Share on other sites

this works with models it might work with sounds.

 

Free(source1)

Tools:

AC3D | 3D Canvas(pro) | Texture Maker(pro) | Genetica(basic) | 3D World Studio | Fragmotion |Leadwerks 2 | XNA 4 | Visual Studio 2010 Professional | XCode 5.x |UU3D Pro

 

Programing & Scripting Languages:

C |C++ | C# | Obj-C | LUA | Javascript | PHP | Ruby

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...