Hi, Hoping someone can help point me in the right direction with this. I'm attempting to add a volume envelope onto a channel. I've used BassFX recently to add a compressor to something else and that worked fine in the end so I'm aware of calling BassFx.GetVersion() etc, and I've checked that bass_fx.dll is present in the working directory. In fact, when I swap out the call to the volume envelope to the compressor for example, it works perfectly.
I'm receiving the error "Typelib export: Type library is not registered" right at the point where I call Bass.BASS_FXSetParameters(fxHandle, params).
I figure the issue is just my implementation and potentially something I'm missing, but I seem to have everything.
----
Framework: .Net 6.0
Architecture: x64
BASS Nuget Package: radio42.Bass.Net.core (2.4.17.4)
BASS_FX Version: 2.4.12.1 (is the mismatched versioning a problem? I can't seem to find a later version)
----
var envelopeTimings = "[{\"Time\":0.0,\"Volume\":1.0},{\"Time\":212.0,\"Volume\":1.0},{\"Time\":213.5,\"Volume\":0.5},{\"Time\":217.0,\"Volume\":0.5}]";
Bass.BASS_PluginLoadDirectory(AppDomain.CurrentDomain.BaseDirectory);
var fileHandle = Bass.BASS_StreamCreateFile("f:\\temp\\input.mp3", 0, 0, BASSFlag.BASS_DEFAULT);
BassFx.BASS_FX_GetVersion();
var envParams = JsonConvert.DeserializeObject<List<Envelope>>(envelopeTimings).OrderBy(a=> a.Time).Select(env => new BASS_BFX_ENV_NODE(env.Time, (float)env.Volume)).ToArray();
var fxParams = new BASS_BFX_VOLUME_ENV(envParams);
var fxHandle = Bass.BASS_ChannelSetFX(fileHandle, BASSFXType.BASS_FX_BFX_VOLUME_ENV, 0);
Bass.BASS_FXSetParameters(fxHandle, fxParams); // EX: System.Runtime.InteropServices.COMException: 'Typelib export: Type library is not registered. (0x80131165)'
Bass.BASS_ChannelPlay(fileHandle, false);
I've highlighted in the code where the error is thrown and the contents of the exception message. Any pointers as to where I should be looking?
Thanks,
Dave