Returns an array of strings representing the available program names.
Namespace:
Un4seen.Bass.AddOn.Vst
Assembly:
Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
public string[] GetProgramNames()
Public Function GetProgramNames As String()
Return Value
Type:
StringAn array of strings representing the available program names.
Retrieving a program name other than the current one enforces to change the current program inernally.
So this method first retrieves the current program number, then changes the program in order to get that name and afterwards restores the currect selected program.
But since changing the program is enforced even for a short period of time, calling this method on a channel based VST effect might produce some sound disturbance.
So it is a good idea to either call this method on a non-channel vstHandle (
BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32) called with chan=0) or make sure the channel is currently not playing.
Calling on a non-channel vstHandle:
vstHandle = BassVst.BASS_VST_ChannelSetDSP(0,
"C:\\VstPlugins\\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0);
BASS_VST_INFO vstInfo = new BASS_VST_INFO();
if (BassVst.BASS_VST_GetInfo(vstHandle, vstInfo))
{
if (vstInfo.aeffect != IntPtr.Zero)
{
string[] progs = aeffect.GetProgramNames();
if (progs != null)
{
for (int i = 0; i < progs.Length; i++)
Console.WriteLine(String.Format( "{0}: {1}", i, progs[i]));
}
}
}
vstHandle = BassVst.BASS_VST_ChannelSetDSP(0,
"C:\VstPlugins\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0)
Dim vstInfo As New BASS_VST_INFO()
If BassVst.BASS_VST_GetInfo(vstHandle, vstInfo) Then
If vstInfo.aeffect <> IntPtr.Zero Then
Dim progs As String() = aeffect.GetProgramNames()
If Not (progs Is Nothing) Then
Dim i As Integer
For i = 0 To progs.Length - 1
Console.WriteLine([String].Format("{0}: {1}", i, progs(i)))
Next i
End If
End If
End If
Reference