filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.19k stars 454 forks source link

How to add support for different hardware APIs #302

Open residuum opened 6 years ago

residuum commented 6 years ago

I would like to implement support for Jack.

Should I include it as a pull request or should I build it as a seperate project, like I did with NAudio?

Mitra-M commented 6 years ago

@residuum , would you please, explain a bit that what we can do with Jack + cscore ?

residuum commented 6 years ago

Jack is an API for low-latency audio with the possibility to use different hardware backends. In addition to programs connecting to hardware, you can also connect ins and outs of programs and string them together, which is useful for audio production, i.e. you can have synths, effects and recording in different programs and use Jack to route the audio.

So with Jack it will be possible to create cross-platform audio production software with cscore.

Mitra-M commented 6 years ago

@residuum Thank you so much ,but I'm sorry, have 2 other questions: 1 - Does your explain mean that Jack+Cscore will support the ASIO driver? (for windows) 2 - With Jack+Cscore , can we connect an output device to an input like virtual audio cable? (for windows)

residuum commented 6 years ago

@Mitra-M Ad 1: Yes, the Jack demon can use ASIO drivers (but the demon must be installed and started separately). Ad 2: This is what Jack is mostly used for, usually with an additional software like QJackCtl (for screenshots see https://qjackctl.sourceforge.io/qjackctl-screenshots.html)

Mitra-M commented 6 years ago

So it's awesome. Thanks a lot.

filoe commented 6 years ago

Since it seems like there is a dependency on another project, I would like to add it as a new project (CSCore.Jack).

residuum commented 6 years ago

An implementation is done including unit tests:

https://github.com/residuum/JackSharp/commit/d6044975988c0ddaf6b53cb721289986b2bc2552

I have tested on Windows 8.1 and Debian sid. For the unit tests to run, you need an already running Jack server.

filoe commented 6 years ago

Great, we could add a sample to the CSCore repo.