Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
1.0.0:fmodaudio [2023/03/08 12:07] – [Loop sample] admin1.0.0:fmodaudio [2023/03/08 12:08] (current) – [Apply a DSP effect to a channel] admin
Line 262: Line 262:
 /// CAUTION: For applying multiple effects, the AIndex argument has to start at zero and needs /// CAUTION: For applying multiple effects, the AIndex argument has to start at zero and needs
 /// to increase continously without gaps! /// to increase continously without gaps!
-procedure TForm1.AttachEffect(AChannel : IGorillaFMODChannel; AIndex : Integer = 0);+procedure TForm1.AttachEffect(AChannel : IGorillaFMODChannel; AIndex : Integer; AEffect : TFMOD_DSPType);
 var LDSPEffect : IGorillaFMODDSP; var LDSPEffect : IGorillaFMODDSP;
     LWetDryMix : TGorillaFMODWetDryMix;     LWetDryMix : TGorillaFMODWetDryMix;
 begin begin
   // Access the system object of FMOD API   // Access the system object of FMOD API
-  // Let's add some kind of echo +  LDSPEffect := GorillaFMODAudioManager1.SystemObject.CreateDSPByType(AEffect);
-  LDSPEffect := GorillaFMODAudioManager1.SystemObject.CreateDSPByType(FMOD_DSP_TYPE_ECHO);+
      
   // Activate the effect   // Activate the effect
Line 284: Line 283:
   AChannel.AddDSP(AIndex, LDSPEffect);   AChannel.AddDSP(AIndex, LDSPEffect);
 end; end;
 +
 +[...]
 +
 +// Let's add some kind of echo
 +AttachEffect(FChannel, 0, FMOD_DSP_TYPE_ECHO);
 </file> </file>
 ===== Android ===== ===== Android =====