createDSP() public méthode

public createDSP ( DSP_DESCRIPTION &description, DSP &dsp ) : RESULT
description DSP_DESCRIPTION
dsp DSP
Résultat RESULT
        protected internal override void BeginRecording(RecordingSession session)
        {
            var dspName = "RecordSessionVideo(Audio)".ToCharArray();

            Array.Resize(ref dspName, 32);
            dspCallback = DspReadCallback;
            var dspDescription = new DSP_DESCRIPTION
            {
                version          = 0x00010000,
                name             = dspName,
                numinputbuffers  = 1,
                numoutputbuffers = 1,
                read             = dspCallback,
                numparameters    = 0
            };

            FMOD.System system = RuntimeManager.CoreSystem;
            CheckError(system.getMasterChannelGroup(out ChannelGroup masterGroup));
            CheckError(masterGroup.getDSP(CHANNELCONTROL_DSP_INDEX.TAIL, out DSP masterDspTail));
            CheckError(masterDspTail.getChannelFormat(out CHANNELMASK channelMask, out int numChannels,
                                                      out SPEAKERMODE sourceSpeakerMode));

            if (RecorderOptions.VerboseMode)
            {
                Debug.Log(
                    $"(UnityRecorder) Listening to FMOD Audio. Setting DSP to [{channelMask}] [{numChannels}] [{sourceSpeakerMode}]");
            }

            // Create a new DSP with the format of the existing master group.
            CheckError(system.createDSP(ref dspDescription, out dsp));
            CheckError(dsp.setChannelFormat(channelMask, numChannels, sourceSpeakerMode));
            CheckError(masterGroup.addDSP(CHANNELCONTROL_DSP_INDEX.TAIL, dsp));

            // Fill in some basic information for the Unity audio encoder.
            mChannelCount = (ushort)numChannels;
            CheckError(system.getDriver(out int driverId));
            CheckError(system.getDriverInfo(driverId, out Guid _, out int systemRate, out SPEAKERMODE _, out int _));
            mSampleRate = systemRate;

            if (RecorderOptions.VerboseMode)
            {
                Debug.Log($"FmodAudioInput.BeginRecording for capture frame rate {Time.captureFramerate}");
            }

            if (audioSettings.PreserveAudio)
            {
                AudioRenderer.Start();
            }
        }
 public static RESULT CreateDSP(ref DSP_DESCRIPTION dspDescription, out DSP dsp)
 {
     return(m_FMODSystem.createDSP(ref dspDescription, out dsp));
 }