I found an example of UWP visualizer in this link but after I choose the audio file from the FilePicker and the Bass should start it returns an error: Attempt to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B), when Bass should start.
public async Task Play()
{
if (CurrentPlayingFile == null) return;
//CurrentPlayingFile = selectedFile;
var filePath = CurrentPlayingFile.Path;
await Task.Run(() =>
{
Bass.Start(); // Returns the error
Bass.Init();
_handle = Bass.CreateStream(filePath, 0, 0, BassFlags.AutoFree | BassFlags.Float);
var length = Bass.ChannelBytes2Seconds(_handle, Bass.ChannelGetLength(_handle));
Bass.ChannelPlay(_handle);
IsPlaying = true;
});
}
I created the folders: Visualizer-master\Visualizer.UI\Assets\lib\x64 and Visualizer-master\Visualizer.UI\Assets\lib\x86, with bass.dll and bass_fx.dll inside (because they didn't exist)
How can I start this by fixing the error?
Thanks for your help!
User contributions licensed under CC BY-SA 3.0