예제 #1
0
 public void applyNormalize(bool isApply)
 {
     if (isApply)
     {
         //dspNormalize.setParameter((int) FMOD.DSP_NORMALIZE.FADETIME, 0);
         //dspNormalize.setParameter((int)FMOD.DSP_NORMALIZE.THRESHHOLD, 0.3f);
         if (dspconnectiontemp == null)
         {
             //float gain = 0;
             //channel[PlayerController.MainChannel].getLowPassGain(ref gain);
             //Debug.WriteLine(gain);
             //Debug.WriteLine("normalize");
             dspNormalize.setParameter((int)FMOD.DSP_NORMALIZE.FADETIME, 0);
             dspNormalize.setParameter((int)FMOD.DSP_NORMALIZE.MAXAMP, 1.25f);
             //dspNormalize.setParameter((int)FMOD.DSP_NORMALIZE.THRESHHOLD, 0.1f);
             RESULT result = system.addDSP(dspNormalize, ref dspconnectiontemp);
             checkFMODError(result);
         }
         //RESULT result = system.addDSP(dspNormalize, ref dspconnectiontemp);
         //checkFMODError(result);
     }
     else
     {
         RESULT result = dspNormalize.remove();
         dspconnectiontemp = null;
         checkFMODError(result);
     }
 }
예제 #2
0
        public RESULT getInput(ref DSP input)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = DSPConnection.FMOD_DSPConnection_GetInput(dspconnectionraw, ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (input == null)
                {
                    DSP dSP = new DSP();
                    dSP.setRaw(raw);
                    input = dSP;
                }
                else
                {
                    input.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }
예제 #3
0
        public RESULT addDSP(DSP dsp, ref DSPConnection dspconnection)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = Channel.FMOD_Channel_AddDSP(channelraw, dsp.getRaw(), ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (dspconnection == null)
                {
                    DSPConnection dSPConnection = new DSPConnection();
                    dSPConnection.setRaw(raw);
                    dspconnection = dSPConnection;
                }
                else
                {
                    dspconnection.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }
예제 #4
0
        public RESULT addInput(DSP target, ref DSPConnection dspconnection)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = DSP.FMOD_DSP_AddInput(dspraw, target.getRaw(), ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (dspconnection == null)
                {
                    DSPConnection dSPConnection = new DSPConnection();
                    dSPConnection.setRaw(raw);
                    dspconnection = dSPConnection;
                }
                else
                {
                    dspconnection.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }
예제 #5
0
        public RESULT addDSP(DSP dsp, ref DSPConnection connection)
        {
            RESULT        result           = RESULT.OK;
            IntPtr        dspconnectionraw = new IntPtr();
            DSPConnection dspconnectionnew = null;

            try
            {
                result = FMOD_Channel_AddDSP(channelraw, dsp.getRaw(), ref dspconnectionraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return(result);
            }

            if (connection == null)
            {
                dspconnectionnew = new DSPConnection();
                dspconnectionnew.setRaw(dspconnectionraw);
                connection = dspconnectionnew;
            }
            else
            {
                connection.setRaw(dspconnectionraw);
            }

            return(result);
        }
예제 #6
0
파일: DSP.cs 프로젝트: GameDiffs/TheForest
 public RESULT addInput(DSP target, out DSPConnection connection, DSPCONNECTION_TYPE type)
 {
     connection = null;
     IntPtr raw;
     RESULT result = DSP.FMOD5_DSP_AddInput(this.rawPtr, target.getRaw(), out raw, type);
     connection = new DSPConnection(raw);
     return result;
 }
예제 #7
0
        public RESULT addInput(DSP target, out DSPConnection connection, DSPCONNECTION_TYPE type)
        {
            connection = null;
            IntPtr raw;
            RESULT result = DSP.FMOD5_DSP_AddInput(this.rawPtr, target.getRaw(), out raw, type);

            connection = new DSPConnection(raw);
            return(result);
        }
예제 #8
0
        public RESULT addGroup(ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
        {
            connection = null;
            IntPtr raw;
            RESULT result = ChannelGroup.FMOD5_ChannelGroup_AddGroup(base.getRaw(), group.getRaw(), propagatedspclock, out raw);

            connection = new DSPConnection(raw);
            return(result);
        }
예제 #9
0
        public RESULT getOutput(out DSP output)
        {
            output = null;
            IntPtr raw;
            RESULT result = DSPConnection.FMOD5_DSPConnection_GetOutput(this.rawPtr, out raw);

            output = new DSP(raw);
            return(result);
        }
예제 #10
0
파일: DSP.cs 프로젝트: GameDiffs/TheForest
 public RESULT getInput(int index, out DSP input, out DSPConnection inputconnection)
 {
     input = null;
     inputconnection = null;
     IntPtr raw;
     IntPtr raw2;
     RESULT result = DSP.FMOD5_DSP_GetInput(this.rawPtr, index, out raw, out raw2);
     input = new DSP(raw);
     inputconnection = new DSPConnection(raw2);
     return result;
 }
예제 #11
0
        public RESULT getOutput(int index, out DSP output, out DSPConnection outputconnection)
        {
            output           = null;
            outputconnection = null;
            IntPtr raw;
            IntPtr raw2;
            RESULT result = DSP.FMOD5_DSP_GetOutput(this.rawPtr, index, out raw, out raw2);

            output           = new DSP(raw);
            outputconnection = new DSPConnection(raw2);
            return(result);
        }
예제 #12
0
        public static EqualizerBand GetEqualizerBand(FMOD.System system, bool isActive, float centerValue, float bandwithValue, float gainValue)
        {
            FMOD.DSPConnection dspConnTemp = null;
            FMOD.DSP           dspParamEq  = null;

            if (isActive)
            {
                var result = system.createDSPByType(FMOD.DSP_TYPE.PARAMEQ, ref dspParamEq);
                if (!result.ERRCHECK())
                {
                    return(null);
                }

                result = system.addDSP(dspParamEq, ref dspConnTemp);
                if (!result.ERRCHECK())
                {
                    return(null);
                }

                result = dspParamEq.setParameter((int)FMOD.DSP_PARAMEQ.CENTER, centerValue);
                if (!result.ERRCHECK())
                {
                    return(null);
                }

                result = dspParamEq.setParameter((int)FMOD.DSP_PARAMEQ.BANDWIDTH, bandwithValue);
                if (!result.ERRCHECK())
                {
                    return(null);
                }

                result = dspParamEq.setParameter((int)FMOD.DSP_PARAMEQ.GAIN, gainValue);
                if (!result.ERRCHECK())
                {
                    return(null);
                }

                result = dspParamEq.setActive(true);
                if (!result.ERRCHECK())
                {
                    return(null);
                }
            }

            var band = new EqualizerBand(dspParamEq, centerValue, gainValue, isActive);

            return(band);
        }
예제 #13
0
        public RESULT getOutput(int index, ref DSP output, ref DSPConnection outputconnection)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;
            IntPtr raw2   = IntPtr.Zero;

            try
            {
                rESULT = DSP.FMOD_DSP_GetOutput(dspraw, index, ref raw, ref raw2);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (output == null)
                {
                    DSP dSP = new DSP();
                    dSP.setRaw(raw);
                    output = dSP;
                }
                else
                {
                    output.setRaw(raw);
                }
                if (outputconnection == null)
                {
                    DSPConnection dSPConnection = new DSPConnection();
                    dSPConnection.setRaw(raw2);
                    outputconnection = dSPConnection;
                }
                else
                {
                    outputconnection.setRaw(raw2);
                }
                result = rESULT;
            }
            return(result);
        }
예제 #14
0
 public RESULT getType(out DSPCONNECTION_TYPE type)
 {
     return(DSPConnection.FMOD5_DSPConnection_GetType(this.rawPtr, out type));
 }
예제 #15
0
 public RESULT getMix(out float volume)
 {
     return(DSPConnection.FMOD5_DSPConnection_GetMix(this.rawPtr, out volume));
 }
예제 #16
0
 public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop)
 {
     return(DSPConnection.FMOD5_DSPConnection_GetMixMatrix(this.rawPtr, matrix, out outchannels, out inchannels, inchannel_hop));
 }
예제 #17
0
 public RESULT addInput(DSP target, out DSPConnection connection, DSPCONNECTION_TYPE type)
 {
     return(FMOD5_DSP_AddInput(handle, target.handle, out connection.handle, type));
 }
예제 #18
0
 public RESULT setMix(float volume)
 {
     return(DSPConnection.FMOD5_DSPConnection_SetMix(this.rawPtr, volume));
 }
예제 #19
0
파일: fmod.cs 프로젝트: kendobi/Entropy_V5
        // Nested channel groups.
        public RESULT addGroup               (ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
        {
            connection = null;

            IntPtr connectionRaw;
            RESULT result = FMOD5_ChannelGroup_AddGroup(getRaw(), group.getRaw(), propagatedspclock, out connectionRaw);
            connection = new DSPConnection(connectionRaw);

            return result;

        }
예제 #20
0
        // Connection / disconnection / input and output enumeration.
        public RESULT addInput(DSP target, out DSPConnection connection)
        {
            connection = null;

            IntPtr dspconnectionraw;
            RESULT result = FMOD_DSP_AddInput(rawPtr, target.getRaw(), out dspconnectionraw);
            connection = new DSPConnection(dspconnectionraw);

            return result;
        }
예제 #21
0
파일: fmod.cs 프로젝트: huming2207/ghgame
        public RESULT getOutput(int index, ref DSP output, ref DSPConnection outputconnection)
        {
            RESULT result      = RESULT.OK;
            IntPtr dsprawnew   = new IntPtr();
            DSP    dspnew      = null;
            IntPtr dspconnectionraw = new IntPtr();
            DSPConnection dspconnectionnew = null;

            try
            {
                result = FMOD_DSP_GetOutput(dspraw, index, ref dsprawnew, ref dspconnectionraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (output == null)
            {
                dspnew = new DSP();
                dspnew.setRaw(dsprawnew);
                output = dspnew;
            }
            else
            {
                output.setRaw(dsprawnew);
            }

            if (outputconnection == null)
            {
                dspconnectionnew = new DSPConnection();
                dspconnectionnew.setRaw(dspconnectionraw);
                outputconnection = dspconnectionnew;
            }
            else
            {
                outputconnection.setRaw(dspconnectionraw);
            }

            return result;
        }
예제 #22
0
파일: fmod.cs 프로젝트: whztt07/GameEngine
        public RESULT addDSP                 (DSP dsp, CHANNELCONTROL_DSP_INDEX index, ref DSPConnection connection)
        {
            RESULT result = RESULT.OK;
            IntPtr dspconnectionraw = new IntPtr();
            DSPConnection dspconnectionnew = null;

            try
            {
                result = FMOD_ChannelGroup_AddDSP(channelgroupraw, index, dsp.getRaw(), ref dspconnectionraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (connection == null)
            {
                dspconnectionnew = new DSPConnection();
                dspconnectionnew.setRaw(dspconnectionraw);
                connection = dspconnectionnew;
            }
            else
            {
                connection.setRaw(dspconnectionraw);
            }

            return result;
        }
예제 #23
0
 public RESULT getUserData(ref IntPtr userdata)
 {
     return(DSPConnection.FMOD_DSPConnection_GetUserData(dspconnectionraw, ref userdata));
 }
예제 #24
0
        public RESULT getOutput                 (int index, out DSP output, out DSPConnection outputconnection)
        {
            output = null;
            outputconnection = null;

            IntPtr dspoutputraw;
            IntPtr dspconnectionraw;
            RESULT result = FMOD_DSP_GetOutput(rawPtr, index, out dspoutputraw, out dspconnectionraw);
            output = new DSP(dspoutputraw);
            outputconnection = new DSPConnection(dspconnectionraw);

            return result;
        }
예제 #25
0
 public RESULT disconnectFrom(DSP target, DSPConnection connection)
 {
     return(DSP.FMOD5_DSP_DisconnectFrom(this.rawPtr, target.getRaw(), connection.getRaw()));
 }
예제 #26
0
 public RESULT getOutput(int index, out DSP output, out DSPConnection outputconnection)
 {
     return(FMOD5_DSP_GetOutput(handle, index, out output.handle, out outputconnection.handle));
 }
예제 #27
0
 public RESULT disconnectFrom(DSP target, DSPConnection connection)
 {
     return(FMOD5_DSP_DisconnectFrom(handle, target.handle, connection.handle));
 }
예제 #28
0
 public RESULT setUserData(IntPtr userdata)
 {
     return(DSPConnection.FMOD5_DSPConnection_SetUserData(this.rawPtr, userdata));
 }
예제 #29
0
 public RESULT getLevels(SPEAKER speaker, float[] levels, int numlevels)
 {
     return(DSPConnection.FMOD_DSPConnection_GetLevels(dspconnectionraw, speaker, levels, numlevels));
 }
예제 #30
0
 public RESULT getUserData(out IntPtr userdata)
 {
     return(DSPConnection.FMOD5_DSPConnection_GetUserData(this.rawPtr, out userdata));
 }
예제 #31
0
 public RESULT setUserData(IntPtr userdata)
 {
     return(DSPConnection.FMOD_DSPConnection_SetUserData(dspconnectionraw, userdata));
 }
예제 #32
0
 public RESULT disconnectFrom            (DSP target, DSPConnection connection)
 {
     return FMOD5_DSP_DisconnectFrom(rawPtr, target.getRaw(), connection.getRaw());
 }
예제 #33
0
        public RESULT addDSP(DSP dsp, int index, out DSPConnection connection)
        {
            connection = null;

            IntPtr dspconnectionraw;
            RESULT result = FMOD_ChannelGroup_AddDSP(rawPtr, index, dsp.getRaw(), out dspconnectionraw);
            connection = new DSPConnection(dspconnectionraw);

            return result;
        }
예제 #34
0
        public RESULT getInput                  (int index, out DSP input, out DSPConnection inputconnection)
        {
            input = null;
            inputconnection = null;

            IntPtr dspinputraw;
            IntPtr dspconnectionraw;
            RESULT result = FMOD_DSP_GetInput(rawPtr, index, out dspinputraw, out dspconnectionraw);
            input = new DSP(dspinputraw);
            inputconnection = new DSPConnection(dspconnectionraw);

            return result;
        }
 public RESULT addGroup(ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
 {
     return(FMOD5_ChannelGroup_AddGroup(handle, group.handle, propagatedspclock, out connection.handle));
 }
예제 #36
0
파일: fmod.cs 프로젝트: huming2207/ghgame
        public RESULT addInput(DSP target, ref DSPConnection connection)
        {
            RESULT result = RESULT.OK;
            IntPtr dspconnectionraw = new IntPtr();
            DSPConnection dspconnectionnew = null;

            try
            {
                result = FMOD_DSP_AddInput(dspraw, target.getRaw(), ref dspconnectionraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (connection == null)
            {
                dspconnectionnew = new DSPConnection();
                dspconnectionnew.setRaw(dspconnectionraw);
                connection = dspconnectionnew;
            }
            else
            {
                connection.setRaw(dspconnectionraw);
            }

            return result;
        }
예제 #37
0
 public RESULT setMix(float volume)
 {
     return(DSPConnection.FMOD_DSPConnection_SetMix(dspconnectionraw, volume));
 }
예제 #38
0
파일: fmod.cs 프로젝트: huming2207/ghgame
        public RESULT addDSP(DSP dsp, ref DSPConnection connection)
        {
            RESULT result = RESULT.OK;
            IntPtr dspconnectionraw = new IntPtr();
            DSPConnection dspconnectionnew = null;

            try
            {
                result = FMOD_System_AddDSP(systemraw, dsp.getRaw(), ref dspconnectionraw);
            }
            catch
            {
                result = RESULT.ERR_INVALID_PARAM;
            }
            if (result != RESULT.OK)
            {
                return result;
            }

            if (connection == null)
            {
                dspconnectionnew = new DSPConnection();
                dspconnectionnew.setRaw(dspconnectionraw);
                connection = dspconnectionnew;
            }
            else
            {
                connection.setRaw(dspconnectionraw);
            }

            return result;
        }
예제 #39
0
 public RESULT getMix(ref float volume)
 {
     return(DSPConnection.FMOD_DSPConnection_GetMix(dspconnectionraw, ref volume));
 }