Open tonetechnician opened 5 years ago
Hi,
There isn't a current plan to add ASIO support. I'd be very happy to look at a pull request if you decide to dive in. The fork you mention looks like a good reference but note that it predates a quite significant refactor that added bidirectional port support. I hope that you will be able to add ASIO support as some new creation options that control portaudio initialisation and that the majority of the code will not need modification. Good luck!
I would build on what the re-factored code mentioned by @scriptorian that adds bidirectional port support. My branch (still) has a bug where it can arbitrarily stop after several minutes of operation. I suspect there is a subtle race condition in the code that has proven difficult to ferret out when audio frames are being flung around in real-time. Hopefully the re-factored code does not suffer this same issue. Perhaps take some inspiration from my ASIO specific implementation when porting it to the re-factored code. Unfortunately, I don't have the bandwidth to attempt this at the moment.
Thanks so much for the feedback guys!! Definitely helps to get me on the right track with how to think about it.
I hope that you will be able to add ASIO support as some new creation options that control portaudio initialisation and that the majority of the code will not need modification.
I will do my best to make the addition as seamless as possible. Plan to have it based off the driver's host API. If it's ASIO, it sets up ASIO. Something along those lines - if not, then to use creation options.
My branch (still) has a bug where it can arbitrarily stop after several minutes of operation. Hopefully the re-factored code does not suffer this same issue. Perhaps take some inspiration from my ASIO specific implementation when porting it to the re-factored code. Unfortunately, I don't have the bandwidth to attempt this at the moment.
This is good to know. Definitely will heed the advice. Going to be reading up more on portaudio, with focus on the ASIO. Particularly how exactly writing the stream to port audio works with the ASIO callbacks. Time to get my c++ hat on.
Thanks again! Hopefully I can make a pull request in the not too distant future.
If you end up implementing ASIO support in the refactored baseline then please consider fully supporting the ASIO host-specific features/APIs such as channel selectors and retrieving channel names. I did that in my implementation and these APIs are invaluable when you're dealing with ASIO input/outputs with 8 or more available channels and only need access to a subset of those channels. It's easy to forget these ASIO specific APIs. Good luck with your implementation . . . I'd love to see it properly integrated into the baseline!
Cool, I would definitely like to include this. Will see how it can all fit in. Thanks a lot! Will keep things updated on this issue
Hey guys
Just wanted to point you both in the direction of this.
There is already quite a neat implementation of portaudio bindings with support for ASIO. An important difference is the implementation does rely on NAN so doesn't have ABI stability. I will try chat to the maintainer about having this implemented.
Otherwise, I've tested and confirmed that multichannel playback via ASIO does work :)
Currently, this option is fine for my purposes and don't think I'll be needing to jumping into ASIO supported version of naudiodon.
Thanks in any case for the help. I will leave the issue open as it hasn't exactly been resolved. I do not mind if a maintainer closes it though.
Hey there,
Just wondering if there are plans in the project's roadmap to implement ASIO compatibility? I know that there is a fork that has implemented this successfully. I have tried and tested and it indeed works.
Otherwise, if no one is planning on doing it I'm thinking I could dive into it using the mentioned fork as a start off. Would need to check exactly what the differences are. As far as I can tell, @gschmottlach-xse has used NAN, so I guess the first thing would be to switch it over to NAPI. Then try figure out a way of getting the correct driver to start according to the ASIO host API when an ASIO driver is specified.
I particularly think ASIO support is important when wanting to stream multichannel audio that is higher than the 8 channel limitation put on by windows drivers. I have an application that is required to stream 24 channels to my interface which I can't currently do with the 8 channel limitations.