marcan / blitzloop

Open source karaoke software
GNU General Public License v2.0
207 stars 31 forks source link

Allow using Blitzloop with !JACK audio backends #2

Closed delroth closed 8 years ago

delroth commented 8 years ago

Heavily refactor _audio.pyx to isolate audio backend specific methods behind a common interface. The interface is designed around the current feature set of JACK, but in practice making other systems fit isn't too hard.

Add a PortAudio backend following this new interface. There is some haxx going on with the timing because PortAudio -> ALSA -> Pulse -> ALSA loses some of the timing information on its way (Pulse devs say it's because of ALSA's plugin interface), but it seems to work decently enough...

delroth commented 8 years ago

As a note, I haven't tested the JACK backend with these changes (because JACK refuses to startup on my system...). I don't anticipate breakage since the code is mostly the same, but you might want to tell me if I broke it :)

delroth commented 8 years ago

Just putting the review comments from IRC here to remember: the portaudio part should be made optional to avoid adding dependencies (which will break some existing setups that are auto-updating). I'll need to figure out how to do that properly with setuptools.

marcan commented 8 years ago

Closing this because it's hopelessly outdated given recent changes.

For what it's worth, _audio.pyx now only does microphone echo effect duties and is much simpler. My plan is to make it modular, to allow plugging in modules that e.g. have different audio backends, or even just send commands to an external processing box. It's also optional, everything else will work without it (as long as mpv supports your audio system).