sound_pool object
This method will destroy an active sound in the sound pool.
bool destroy_sound(int slot)
Parameters:
slot
The slot of the sound to destroy.
Return value:
true on success, false on failure.
Remarks:
This is useful if the character or object linked with the sound in question has died, for instance.
Please note: When dealing with sound slots, be sure that you set the persistent flag to true for all non-looping sounds when you first create them. If you fail to do this, manipulating a sound in any way by use of its slot number can have unpredictable results. This is because the sound pool automatically cleans up any sound that has finished playing and that is not set to be persistent, with the result that the slot that was returned on creation is no longer invalid and may, in the worst case scenario, refer to a completely different sound.
Example:

    #include "sound_pool.bgt"

    sound_pool sounds;

    void main()
    {
    sounds.max_distance=70;
    int slot=sounds.play_stationary("sounds/ambience.wav", true);
    wait(5000);
    sounds.destroy_sound(slot);
    }