Hi Erel, Thanks so much for your help in this matter. There is one last question and actually this library would be completely wrapped for b4ppc. There is a channels class, however the new1 method you call needs the memory pointer, which is a intPTR typed variable so that each object you create can manipulate the sounds at runtime. I tried this code and got the following error:
'Create an object of type sound called sound1, another one called speaker of type speaker, another one of type const called constant, and one more of type channel called channel1.
Sub Globals
End Sub
Sub App_Start
form1.show
sound1.new1
speaker.new1
constant.new1
speaker.Open(44100, 16, true, 0, 16)
sound1.load("jet.wav", constant.HSS_PlayFree)
c = speaker.PlaySound(sound1.value) 'Returns the channel the current playing file is located on.
d = speaker.channel(c) 'Returns a pointer to the channel currently specified by PlaySound and/or PlayMusic.
channel1.new1(d)
channel1.position(200)
End Sub
Sub form1_close
speaker.close
End Sub
Basic4ppc Error
Input string was NOT in a correct format.
The line it is commenting on which you will see is channel1.new1(d). Is there a way to pass pointers in Visual Basic maybe have another value property for the speaker and constant objects that can accept any type of value so Basic4ppc's conversion won't get in the way of this, and that speaker.value and/or constant.value can be passed to the channel object? E.G.
Sub App_Start
speaker.new1
constant.new1
speaker.open(44100, 16, true, 0, 16)
sound1.new1
sound1.load("jet.wav", constant.HSS_Play_Free)
constant.value = speaker.PlaySound(sound1.value)
speaker.value = speaker.channel(constant.value))
channel1.new1(speaker.value)
channel1.position(200)
End Sub
...
? You have done a good job. And this library will be 100% complete if we can somehow get this error out of the way. Thanks again, and Erel and everyone keep up the great work!