kyleneideck / BackgroundMusic

Background Music, a macOS audio utility: automatically pause your music, set individual apps' volumes and record system audio.
GNU General Public License v2.0
16.22k stars 675 forks source link

Support output to AirPlay devices #370

Open DavideVito opened 4 years ago

DavideVito commented 4 years ago

Hi,

I'm currently on macOS Catalina, and I've installed this software from the release panel and not from homebrew.

Yesterday I've tried it using headphones, and it worked like a charm, then I've decided to use my AirPlay server so I can listen to music using external speakers, and suddenly it stop working.

I've chosen then, from System Preferences, to chose background audio as a default output device, but it doesn't work, I can't change the volume of Safari (yesterday I could), and from the menu, my AirPlay server is not listed.

Here it doesn't work (as I think it should)

Schermata 2020-10-14 alle 20 12 18 Schermata 2020-10-14 alle 20 12 27

Here it should work

Schermata 2020-10-14 alle 20 12 34

But it doesn't and also the AirPlay server is not listed.

Schermata 2020-10-14 alle 20 12 45

At least, choosing the AirPlay server as a default output audio device it doesn't work

Schermata 2020-10-14 alle 20 13 03

But now the AirPlay server is shown, but if I choose Internal Speaker or Raspberrypi nothing changes (the audio still comes out from the raspberry)

Schermata 2020-10-14 alle 20 13 10

So i was wondering, how? how can I make it work? am I doing something wrong?

Swearie commented 4 years ago

Same issue

kyleneideck commented 4 years ago

Yesterday I've tried it using headphones, and it worked like a charm, then I've decided to use my AirPlay server so I can listen to music using external speakers, and suddenly it stop working.

But it never worked with your AirPlay server, right? I just tested it out and the same thing happens for me. The AirPlay device is only shown in Background Music's list when it's selected as the default device in macOS.

Background Music can only work if the "Background Music" device is selected as the default device in macOS, so there's currently no way to use Background Music with AirPlay.

It used to work a long time ago, but then later versions of macOS stopped handling AirPlay devices like normal audio devices and now Background Music can't see them at all.

On the plus side, it looks like Apple has added public APIs for playing to AirPlay devices since the last time I looked into this, so maybe it's possible to add AirPlay support to Background Music now: https://stackoverflow.com/q/61629249. It looks a bit complicated and seems to be designed for apps playing media files rather than continuous audio, but I think it's at least worth looking in to it.