Ejemplo n.º 1
0
        public SoundSource(FMOD.System system, FMOD.Sound sound, int posx, int posy)
        {
            FMOD.RESULT result;

            mPos.x = posx;
            mPos.y = posy;
            mPos.z = 0;

            mVel.x = 0;
            mVel.y = 0;
            mVel.z = 0;

            mSystem = system;

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

            SetPosition(mPos.x, mPos.y);

            Random r = new Random(posx);

            result = mChannel.setFrequency(r.Next(22050, 44100));
            VirtualVoices.ERRCHECK(result);

            result = mChannel.setPaused(false);
            VirtualVoices.ERRCHECK(result);

            mBrushBlue = new SolidBrush(Color.Blue);
            mBrushRed  = new SolidBrush(Color.Red);
        }
Ejemplo n.º 2
0
        public void SetPosition(float posx, float posy)
        {
            FMOD.RESULT result;

            mListenerPos.x = posx;
            mListenerPos.y = posy;
            mListenerPos.z = 0;

            result = mSystem.set3DListenerAttributes(0, ref mListenerPos, ref mVel, ref mForward, ref mUp);
            VirtualVoices.ERRCHECK(result);
        }
Ejemplo n.º 3
0
        public void SetPosition(float posx, float posy)
        {
            FMOD.RESULT result;

            mPos.x = posx;
            mPos.y = posy;
            mPos.z = 0;

            result = mChannel.set3DAttributes(ref mPos, ref mVel);
            VirtualVoices.ERRCHECK(result);
        }