Hi,
I prepaired brief documentation for these keywords here:
TBASS_SampleLoad
TBASS_MusicLoad
I am sure Eros will put it in help file soon.
Petr
In the meantime I came to add sounds to my game, but there I've got some problems to figure out how to set up the parameters/arguments for
TBASS_SampleLoad(unknown, PointsToSoundInMemory, unknown, LengthOfSound, unknown, unknownEquates)
same issue for TBASS_MusicLoad()
The helpfile just tells: Topic to be finish... and the samples do not tell anything about the meaning of arguments there.
especially the equate to play a sound just once would be of interest to me.
Also do I want to know, how it works to play more than one sound at the time.
Can anybody help?
Hi,
I prepaired brief documentation for these keywords here:
TBASS_SampleLoad
TBASS_MusicLoad
I am sure Eros will put it in help file soon.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
You might be interested in sound wrapper I created in the past. It is called simply Sound3D, I attach it to this post.
To use it in your script, just place this to your code:
It should play side by side (new sound should not interrupt the current one)%Sound3D_WantDebug= 0 %Sound3D_WantTBGL = 0 #INCLUDE "unit_Sound3d.tBasicU" ' -- before program starts Sound3D_Create() ' -- Use some sounds you have on your PC DWord sndCrash = Sound3D_ChannelLoad(APP_SourcePath + "SoundEffects\crash.wav") DWord sndScratch = Sound3D_ChannelLoad(APP_SourcePath + "SoundEffects\scratch.wav") Sound3D_ChannelPlay(sndCrash) MsgBox 0, "First sound" Sound3D_ChannelPlay(sndScratch) MsgBox 0, "Second sound" ' -- before program ends Sound3D_Destroy()
Petr
Last edited by Petr Schreiber; 23-10-2012 at 12:00.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thank you Petr, the thread I've found already in the meantime. Also the small link to BASS and I already tried, but didn't get a "beep" out of that thing. I'll use the unit_Sound3D.tbasicu now.
It works! Great!
But why does that Console-alike-Window open? Can I avoid that somehow?
Last edited by ReneMiner; 23-10-2012 at 16:46.
Hello,
I attach for you updated version from today
It does not use Console anymore to report debug messages.
If you want debug/error messages use:
%Sound3D_WantDebug= 1 ... MsgBox 0, Sound3D_DebugGetErrorLog() ' -- To get info about possible problems, function returns string
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
you might move or close this thread, we're far off topic - does not have anything to do with TBASS any more![]()
Last edited by ReneMiner; 25-10-2012 at 19:08.
Hi Rene,
I moved the posts here: http://www.thinbasic.com/community/s...ect-consulting
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks