ASIO support? #11
Replies: 4 comments 4 replies
-
|
Hi! Native Portaudio handles ASIO on Windows, native Miniaudio does not. ASIO handling is built into the API. // Use the standard OwnaudioNet API - it will automatically use NativeAudioEngine
AudioConfig config = new AudioConfig()
{
SampleRate = 48000,
Channels = 2,
BufferSize = 512,
HostType = EngineHostType.ASIO
};
// Initialize via OwnaudioNet (internally uses AudioEngineFactory)
// This will first try NativeAudioEngine Portaudio, then Miniaudio, then fall back to platform-specific engines
OwnaudioNet.Initialize(config);If initialization is successful, the audio engine will use ASIO, in all functions! Important warning!A new compilation of native Portaudio has been released recently, I need to check if ASIO is included. Until then, please be patient! |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I checked the Portaudio currently in use! I will make a Portaudio version that includes ASIO today or tomorrow and upload it to the repository. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I added ASIO support to native portaudio. Now ASIO works in the API! When initializing, you need to set it to use the ASIO host, if the initialization is successful, all functions of the API will use it! // Use the standard OwnaudioNet API - it will automatically use NativeAudioEngine
AudioConfig config = new AudioConfig()
{
SampleRate = 48000,
Channels = 2,
BufferSize = 512,
HostType = EngineHostType.ASIO
};
// Initialize via OwnaudioNet (internally uses AudioEngineFactory)
// This will first try NativeAudioEngine Portaudio, then Miniaudio, then fall back to platform-specific engines
OwnaudioNet.Initialize(config);
// Get current audio device information
var outputDevices = OwnaudioNet.Engine?.UnderlyingEngine.GetOutputDevices();
if (outputDevices != null && outputDevices.Count > 0)
{
// Find the current device (either by OutputDeviceId or the default device)
AudioDeviceInfo? currentDevice = null;
if (!string.IsNullOrEmpty(config.OutputDeviceId))
{
currentDevice = outputDevices.FirstOrDefault(d => d.DeviceId == config.OutputDeviceId);
}
else
{
currentDevice = outputDevices.FirstOrDefault(d => d.IsDefault);
}
if (currentDevice != null)
{
Console.WriteLine($" ✓ Audio Engine: {currentDevice.EngineName}");
Console.WriteLine($" ✓ Output Device: {currentDevice.Name}");
}
} |
Beta Was this translation helpful? Give feedback.
-
|
Hello again, I downloaded and referenced your latest commit to my project to test this. When using the Do you think there is still an issue with the API or the included Portaudio library? Or do you have an idea what may still be the problem here? |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hi this project works well so far and I love the idea of a new NAudio competitor,
I felt the documentation was a little behind, but with help of the examples I was able to make a lot of things work.
What I am still a little confused about is the support of ASIO in this project. The documentation makes clear that there is no ASIO support so far. But when looking through the code I saw a few mentions of it, like in the
EngineHostTypeandPaHostApiTypeId. Or this in the AudioDeviceInfo.cs ->So.. am I correct that ASIO is actually supported by using the native engine (PortAudio/miniAudio) but it is not implemented so far that it is ready to use?
If thats the case (or that ASIO is really not supported yet), is it planned to add ASIO support in the near future? This would make things so much easier for some of my use cases 🎉
Best regards,
Dominik
Beta Was this translation helpful? Give feedback.
All reactions