This project has moved. For the latest updates, please go here.

AsioOut ret ComException

Mar 6, 2015 at 7:22 AM
Edited Mar 6, 2015 at 7:24 AM
My question is the next.
I use NAudio in my C# console application. When i try to create AsioOut like this:
var asioDevice = new AsioOut(deviceName);
then i've got the error: System.Runtime.InteropServices.COMException: Unable to instantiate ASIO. Check if STAThread is set...

Why? What's the problem?

When i check asio drivers using AsioOut.GetDriverNames() i've got 2 drivers: "ASIO4ALL v2" and "Saffire".
Mar 13, 2015 at 2:48 PM
Hello all, I am also having this problem with the ASIO4ALL v2 driver. Any help would be appreciated!
Mar 13, 2015 at 2:52 PM
WorshipCookies, try to mark Main function as STAThread:
static void Main(string[] args){
Marked as answer by Denchik1989 on 3/13/2015 at 7:53 AM
Mar 13, 2015 at 2:55 PM
Thanks Denchik! Solved the problem :).