Issues im having with 3D SOUND
BlitzMax Forums/MiniB3D Module/Issues im having with 3D SOUND
| ||
| Hey guys, I'm moving to Blitzmax + MiniB3D for my future hobby coding but the sound is not working the way I expected it to. I am trying to convert my mesh based particle library, and it works great aside from the sounds not releasing and freeing as they do in B3D. I cant seem to locate my error. if anyone has time and would like to help, please download the zip here, it is all source code and media. no binaries. http://www.empowergames.com/rifraf_meshparticles.zip What is has is a folder with Blitzmax, and B3D code tests.. to show how it works on B3D vs MAX In max you will notice looped sounds never end.. I think the fix could be installed in the function KILLEMITTER, but I cant seem to figure it out. Thanks so much. Im frazzled, however on a brighter note once I "Get it" on this part ill be feeling pretty good about minib3d as a valid alternative for me. Last edited 2012 |
| ||
well now i feel silly. I found my problem. If you wanted to know , I had the sound removal in the "child" condition , when it should have been outside of that check. The KILLEMITTER function should look like this
';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
';;; F U N C T I O N ;;;
';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function KillEmitter(ee:bbemitter)
If ee:bbemitter=Null Then Return
DebugLog "starting kill"
Local Eks:bbEmitterkillsound
Local Dirtp:bbdirtparent
DebugLog "checking end sound"
If EmitterSnd2(EE.EmitterID)<>-1 Then
EKS:bbEMITTERKILLSOUND=New bbEMITTERKILLSOUND
eks.channel=EmitSound(part_sound(EmitterSnd2(ee.EmitterID)),ee.ent)
EndIf
DebugLog "removing parent"
EntityParent ee.ent,Null
ee.parent=0
DebugLog "checking kill link"
If EmitterKillLink$(EE.EmitterID)<>"" Then
SpawnEmitterFast(EmitterKillLink$(EE.EmitterID),EntityX(ee.Ent),EntityY(ee.ent),EntityZ(ee.ent),ee.parent,ee.superparent)
EndIf
'check to see if a path exists for this emitter, and kill it.
DebugLog "removing path"
killpath ee.ent
'thought this would help fix things in minib3d 3d sound.. but it causes crashes
DebugLog "about to check soundchannel, repeater"
If ee.soundchannel<>Null And EmitterSoundRepeat(EE.EmitterID)>0 Then
EE.soundchannel.free()
ee.soundchannel=Null
EndIf
DebugLog "checking children in killer"
If CountChildren(ee.ent) Then
dirtp:bbdirtparent=New bbdirtparent
dirtp.ent=ee.ent
Else
FreeEntity ee.ent
EndIf
DebugLog "removing"
ee.Remove()
End Function
Last edited 2012 |