MAKE SOUND FROM MEMBLOCK This command will make a sound from a memblock.
Syntax
    MAKE SOUND FROM MEMBLOCK Sound Number, Memblock Number
Parameters
    Sound Number
Integer The memblock number
    Memblock Number
Integer The sound number
Returns
This command does not return a value.
Description
The specified values must be integer values and the source resource must exist or the command will fail. The memblock stores the data as described in the respective memblock construction command. It is recommended you create 8-bit mono sounds with this command.
Example Code
    rem Load media

    load sound "gun.wav",SoundNumber

    MemblockNumber=1

    MAKE MEMBLOCK FROM SOUND MemblockNumber, 1

    delete sound 1

    MAKE SOUND FROM MEMBLOCK 1, MemblockNumber

    play sound 1

    rem Display data

    cls

    print "MEMBLOCK EXPRESSION DATA"

    print

    if MEMBLOCK EXIST(MemblockNumber)=1

    print "memblock:";MemblockNumber

    print "exist:";MEMBLOCK EXIST(MemblockNumber)

    print "ptr:";GET MEMBLOCK PTR(MemblockNumber)

    print "size:";GET MEMBLOCK SIZE(MemblockNumber)

    endif

    rem Delete memblocks

    if MEMBLOCK EXIST(MemblockNumber)=1 then DELETE MEMBLOCK MemblockNumber

    do

    loop

    end
See also
MEMBLOCKS Commands Menu Index