// Decompiled by DJ v2.6.6.51 Copyright 2000 Atanas Neshkov  Date: 6/15/2001 17:42:05
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   com/macromedia/generator/api/Sound

package com.macromedia.generator.api;

import com.macromedia.generator.api.peer.SoundPeer;

// Referenced classes of package com.macromedia.generator.api:
//            GenObject, GeneratorApiRuntimeException

public class Sound extends GenObject
{

    public Sound()
    {
        peer = SoundPeer.New();
        if(peer == 0)
            throw new GeneratorApiRuntimeException("invalid peer");
        else
            return;
    }

    protected Sound(int i)
    {
        peer = i;
        if(peer == 0)
            throw new GeneratorApiRuntimeException("invalid peer");
        else
            return;
    }

    protected void finalize()
        throws Throwable
    {
        if(peer != 0)
            SoundPeer.Release(peer);
        peer = 0;
    }

    public void release()
    {
        if(peer != 0)
            SoundPeer.Release(peer);
        peer = 0;
    }
}