MartinW
MartinW

Reputation: 1

VB.NET / C#: Launch ASIO control panel

Almost every DAW I've ever used has a button "open control panel" which opens the control panel of the ASIO driver:

enter image description here

How would I go about launching that from VB / C#? Maybe some kind of shell command?

I've downloaded an asioconfig.exe which does exactly that (so it must be possible), but before the latency setup window (shown above) launches there's another window where I select the ASIO driver:

enter image description here

I'd like to specify driver from my code and go directly to the configuration. Does anyone know how I can do that?

Upvotes: 0

Views: 1421

Answers (3)

Mark Heath
Mark Heath

Reputation: 49522

You can do this with NAudio. Just call the ShowControlPanel method on the AsioOut class. The NAudio Demo application shows this in action (in the Audio Playback Demo, and the ASIO recording demo).

Upvotes: 1

Bob Bryan
Bob Bryan

Reputation: 3847

In answer to your question about how to talk to the ASIO API from .NET code written in C# or VB:

ASIO is written in C++. So, you could use a platform invoke (P/I) which is also known as P/Invoke to access methods from C# to a VC++ dll. To go the other direction and call a C# method from a VC++ dll, you can use a reverse P/I which means setting up a callback method (or delegate) to the C# code, which would require passing the delegate to a VC++ method upon intialization. This is what I do in my code and it works well.

Upvotes: 0

Han
Han

Reputation: 2037

The ASIO API defines the following call on the ASIO driver:

ASIOError ASIOControlPanel(void);

Use this to show the control panel.

Upvotes: 0

Related Questions