airplay2-receiver icon indicating copy to clipboard operation
airplay2-receiver copied to clipboard

Docker image, pyalsaaudio, audio device etc.

Open charlesomer opened this issue 3 years ago • 10 comments

Let me know what you think of this PR. Obviously things like the README and GitHub actions would need to be modified but I wasn't sure what they would need to be changed to at the moment.

Now supports pyalsaaudio for devices such as Raspberry Pi instead of PortAudio which wasn't working before. This means volume control now works as well. PortAudio still exists and can be enabled.

Automated docker builds, it takes about 2 hours to build upon a push to master but requires docker hub credentials etc.

charlesomer avatar Apr 19 '21 22:04 charlesomer

Whoa horsie. That's a big un. The problem with this PR as is, is that you've now gone and changed defaults that others hitherto rely on - so you risk confusing or breaking this for others. So if you want to include the new functionality for ALSA, those should be explicitly specified at startup, and the existing pyaudio left as default, until a time that there's consensus that ALSA is a good thing to have (as default). 😄

Isn't there a new kid on the Linux audio manager block?

So e.g.

parser.add_argument("-po", "--use-portaudio", required=False, help="Use port audio (useful for Windows and MacOS).", default=False)

should be

parser.add_argument("-po", "--use-portaudio", required=False, help="Use port audio (useful for Windows and MacOS).", default=True

I'm refining my PR for audio functionality - and this change will break how my PR determines latency. Does ALSA support latency determination?

Other than that, without testing this myself, my comments remain abstract. But it looks like a solid effort.

systemcrash avatar Apr 21 '21 22:04 systemcrash

I think, at a minimum, this commit should be split up into its components (README, ALSA, Docker, etc) and not all squashed into one.

systemcrash avatar Apr 21 '21 23:04 systemcrash

I think it's worth investigating why portaudio wasn't working (before what?) e.g. here

Portaudio is cross-platform, while ALSA is a bunch of technical debt (for other platforms) since there is some code exclusive to it in your PR.

Now supports pyalsaaudio for devices such as Raspberry Pi instead of PortAudio which wasn't working before.

systemcrash avatar Apr 21 '21 23:04 systemcrash

@systemcrash: Time to merge?

Neustradamus avatar Jul 08 '21 14:07 Neustradamus

Apologies for being inactive on this PR, it can be closed if need be :)

charlesomer avatar Jul 08 '21 14:07 charlesomer

@systemcrash: Time to merge?

Some portions of the PR have use - although we should not change the default from portaudio. If @charlesomer undertakes this change, and it does not affect how things currently work after testing, we can consider adding it.

systemcrash avatar Jul 08 '21 15:07 systemcrash

I've made some very quick changes which I haven't tested but should change the default back to PulseAudio :)

It will almost definitely need tidying up at some point!

charlesomer avatar Jul 08 '21 21:07 charlesomer

Just a head’s up: I don’t know if the situation on macOS has changed, but Docker networking in macOS was such a different beast that it actually meant that some docker containers did not work properly.

VMs are probably less hassle for anyone who wants multiple endpoints on the same silicon.

Joshfindit avatar Jul 08 '21 21:07 Joshfindit

Just a head’s up: I don’t know if the situation on macOS has changed, but Docker networking in macOS was such a different beast that it actually meant that some docker containers did not work properly.

@Joshfindit Would you care to give this PR a try? Wondering whether you can verify the docker portion of it.

systemcrash avatar Jul 09 '21 19:07 systemcrash

@charlesomer: Can you rebase your PR?

After, who can test it?

Neustradamus avatar Jul 15 '21 01:07 Neustradamus