public void SetPosition(Channel channel, Vector3 pos)
        {
            FMOD.RESULT result;
            FMOD.VECTOR pos2;
            FMOD.VECTOR vel2 = new FMOD.VECTOR();
            pos2.x = pos.X;
            pos2.y = pos.Y;
            pos2.z = pos.Z;
            FmodChannel c = (FmodChannel)channel;

            result = c.channel.set3DAttributes(ref pos2, ref vel2);
            ERRCHECK(result);
        }
        public Channel Play(Sound sound, Vector3 pos, bool loop)
        {
            FMOD.Channel channel = null;
            FMOD.RESULT  result;

            result = system.playSound(FMOD.CHANNELINDEX.FREE, ((FmodSound)sound).sound, true, ref channel);
            ERRCHECK(result);

            FmodChannel c = new FmodChannel(channel);

            SetPosition(c, pos);
            if (loop)
            {
                channel.setLoopCount(-1);
            }

            channel.setPaused(false);
            return(c);
        }
        public Channel Play(Sound sound, Vector3 pos, bool loop)
        {
            FMOD.Channel channel = null;
            FMOD.RESULT result;

            result = system.playSound(FMOD.CHANNELINDEX.FREE, ((FmodSound)sound).sound, true, ref channel);
            ERRCHECK(result);

            FmodChannel c = new FmodChannel(channel);
            SetPosition(c, pos);
            if (loop)
                channel.setLoopCount(-1);

            channel.setPaused(false);
            return c;
        }