static extern int BASS_VST_ChannelSetDSP(int Channels, string DllFile, BassVstDsp Flags, int Priority);
/// <summary> /// Assigns a VST effects (defined by a DLL file name) to any BASS channels. /// <para>This overload implements the Unicode overload for the dllFile name, so the BASS_UNICODE flag will automatically be added if not already set.</para> /// </summary> /// <param name="Channels">The channel handle... a HSTREAM, HMUSIC, or HRECORD. Or 0, if you want to test, if the dll is a valid VST plugin.</param> /// <param name="DllFile">The fully qualified path and file name to the VST effect plugin (a DLL file name).</param> /// <param name="Flags">A combination of <see cref="BassVstDsp"/></param> /// <param name="Priority">Same meaning as for <see cref="Bass.ChannelSetDSP" /> - DSPs with higher priority are called before those with lower.</param> /// <returns>On success, the method returns the new vstHandle that must be given to all the other functions, else 0 is returned. Use <see cref="Bass.LastError" /> to get the error code.</returns> /// <remarks> /// The VST plugin is implemented via a DSP callback on the channel. /// That means when you play the channel (or call <see cref="Bass.ChannelGetData(int,IntPtr,int)" /> if it's a decoding channel), the sample data will be sent to the VST effect at the same time. /// If the channel is freed all DSPs are removed automatically, also all VST DSPs are removed as well. /// If you want or need to free the VST DSP manually you can call <see cref="ChannelRemoveDSP" />. /// <para>For testing if a DLL is a valid VST effect, you can set Channels to 0 - however, do not forget to call <see cref="ChannelRemoveDSP" /> even in this case.</para> /// <para> /// You may safely assign the same DLL to different channels at the same time - the library makes sure, every channel is processed indepeningly. /// But take care to use the correct vstHandles in this case. /// </para> /// <para> /// Finally, you can use any number of VST effects on a channel. /// They are processed alongside with all other BASS DSPs in the order of it's priority. /// </para> /// <para> /// To set or get the parameters of a VST effect you might use <see cref="GetParamCount" /> alongside with <see cref="GetParam" /> and <see cref="SetParam" /> to enumerate over the total number of effect parameters. /// To retrieve details about an individual parameter you might use <see cref="GetParamInfo(int,int,out BassVstParamInfo)" />. /// If the VST effect supports an embedded editor you might also invoke this one with <see cref="EmbedEditor" />. /// If the embedded editor also supports localization you might set the language in advance with <see cref="SetLanguage" />. /// </para> /// <para>If you need to temporarily bypass the VST effect you might call <see cref="SetBypass" /> - <see cref="GetBypass" /> will tell you the current bypass status though.</para> /// <para>Use <see cref="GetInfo" /> to get even more details about a loaded VST plugin.</para> /// </remarks> public static int ChannelSetDSP(int Channels, string DllFile, BassVstDsp Flags, int Priority) { return(BASS_VST_ChannelSetDSP(Channels, DllFile, Flags | BassVstDsp.Unicode, Priority)); }