Closed delroth closed 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 :)
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.
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).
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...