Hi Pascal, As of now the lib doesn't support mp3's, only MODS and wavs. And there is a way to load sounds quickly as long as your files are numbered. Check out this code:
'Add a Speaker object named Speaker using Tools - Add Object after making a reference to HSSNETDesktop or HSSNETDevice.dll
Sub Globals
End Sub
Sub App_Start
speaker.New1
speaker.open(44100, 16, true, 0, 16)
'And now let's get the sounds we want.
for i = 1 to 99
AddObject("sound" & i, "Sound")
'Without the optimized compiler:
control("Sound" & i).New1
'With the optimized compiler maybe:
control("Sound" & i,Sound).New1
AddObject("Channel" & i, "Channel1")
'Without the optimized compiler:
control("Channel" & i).New1
'With the optimized compiler maybe:
controll("Channel" & i,Channel1).New1
'Then load the sound.
'Without the optimized compiler:
control("Sound" & i).load("File" & i & ".wav")
'with the optimize compiler maybe:
control("Sound" & i,Sound).load("filename" & i & ".wav")
next
'Now you can play whatever sound you like! Here is code that'll play a random sound for you, and assign the channel to it in case you want to mod it while the sound plays.
a = rnd(1, 100)
'Without the optimized compiler code:
control("Channel" & a).Value = speaker.channel(speaker.playSound(control("Sound" & a).Value))
'With the optimized compiler you might have to code:
control("channel" & a,Channel1).Value = speaker.channel(speaker.playSound(control("Sound" & a,Sound).value))
'If you want to modify the sound, use any of the methods in the Channel1 class to do so.
'Don't forget to add a close event to the form that calls speaker.close before your app ends!
End Sub
Please note: Hekkus loads and compresses sounds into memory so they'll play as soon as you call speaker.PlaySound(). Because you have 99 sounds loading, this may take about 30 seconds or less depending on how big the files are, and how fast your device is. The desktop loads files wihin seconds so there is no delay there because of how fast the processors are. If you have more questions please let me know. HTH.