Hekkus Sound System wrapper

Louis

Active Member
Licensed User
Hi. Would someone who knows about dll building for Basic4ppc convert this .NET library from Sean Cross, Intuitex.com into one that works for us Basic4ppc game programmers who want multisounds and to control them in realtime? It allows 3 mods and 64 waves to be played from within your app simultaneously, on whatever speaker or speakers you want, at whatever volume you want. Lots of Basic4ppc programmers will benefit from it, especially us Pocket PC users. I am struggling with dll building at the moment but am determined to learn.
Thanks.
 

Erel

Administrator
Staff member
Licensed User
I've done a small modification to the Hekkus .Net wrapper and you can now use it.
The change I did was to add a Value property for Music / Sound objects.
There is a small example inside that should help you get started.
I know very little about the Hekkus Sound System so I won't be able to help too much.
This is their site: http://www.shlzero.com/modules.php?name=Content&pa=showpage&pid=1
Make sure to read the product license there.

There are four important files in the zip file:
hssNetDesktop.dll - Add this file using the Components dialog, to the desktop.
hssNetDevice.dll - Add this file using the Components dialog, to the device.
hssDesktop.d - The native dll file, should be located on the same folder as your source code (desktop only).
hssDevice.d - Should be copied to Basic4ppc folder: \Program Files\Basic4ppc (device only).
 

Attachments

taximania

Well-Known Member
Licensed User
Where do you find the time to do all the work you do Erel.
Have you got a team of designers behind you ?

:sign0188:
 

Louis

Active Member
Licensed User
Hi Erel, Nice job!
Are you going to include this wrapper in upcoming Basic4ppc versions?

Also, for users of this library who are stuck, I attached the class references so you can have some direction in what each class is and what all the functions in the class do. HTH.
 

Attachments

Last edited:

Louis

Active Member
Licensed User
I want to ask one thing: did this library support .mp3 file?
Hi. It only supports .mod and .wav. There are free software programs that convert .mp3 to .wav quite nicely. One I know of is called "ABC Audio Converter" from "Process TextGroup". HTH.
 

conf

Member
Thank Louis, but .wav file is much larger then .mp3 file. And do you know any software to convert .mp3 to .mod ?
 

agraham

Expert
Licensed User
And do you know any software to convert .mp3 to .mod ?
Sorry but I don't think that this is possible. A mod file is essentially a description of synthesized intruments and an associated score rather than being an actual audio file. So you could "play" a mod file into any audio format (wav, mp3 ogg etc..) but you can't go the other way.

However the FMOD library included with B4PPC that interfaces to the Firelight Technologies FMOD libraries can play mp3 and ogg so why don't you try that?
 

Louis

Active Member
Licensed User
Hi Agraham, The reason why i recommended this library in the first place is because the FMOD library does NOT play multiple sounds at once, but if it did yes it would be my first recommendation; even if you have 2 objects created of the FMOD type class using Basic4ppc. HTH.
Sorry but I don't think that this is possible. A mod file is essentially a description of synthesized intruments and an associated score rather than being an actual audio file. So you could "play" a mod file into any audio format (wav, mp3 ogg etc..) but you can't go the other way.

However the FMOD library included with B4PPC that interfaces to the Firelight Technologies FMOD libraries can play mp3 and ogg so why don't you try that?
 

Louis

Active Member
Licensed User
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!
 
Top