Start Bass with UWP


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


        _handle = Bass.CreateStream(filePath, 0, 0, BassFlags.AutoFree | BassFlags.Float);

        var length = Bass.ChannelBytes2Seconds(_handle, Bass.ChannelGetLength(_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!

asked on Stack Overflow May 10, 2019 by pasq

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0