Results 1 to 7 of 7

Thread: TBASS_SampleLoad()+MusicLoad()- what parameters to set up?

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,544
    Rep Power
    172

    TBASS_SampleLoad()+MusicLoad()- what parameters to set up?

    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?

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732
    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

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732
    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:
    %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()
    
    It should play side by side (new sound should not interrupt the current one)


    Petr
    Attached Files Attached Files
    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

  4. #4
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,544
    Rep Power
    172
    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.

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732
    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
    Attached Files Attached Files
    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

  6. #6
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,544
    Rep Power
    172
    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.

  7. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732
    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

Similar Threads

  1. Help file: TBASS_SampleLoad
    By Petr Schreiber in forum Fixed or cleared errors in help material
    Replies: 1
    Last Post: 14-12-2020, 22:34
  2. List Parameters
    By danbaron in forum Science
    Replies: 0
    Last Post: 28-05-2011, 06:51
  3. Do you know: Passing UDT parameters
    By dcromley in forum Do you know ...
    Replies: 1
    Last Post: 28-04-2009, 22:09

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •