Page 1 of 1

output "Line in" sound

Posted: Sat Dec 22, 2018 5:31 pm
by jtsmart
hello, I'm trying to output "line in" sound if nothing is playing on shairport. if anyone has any thought about how i could get this to work please let me know. Thanks in advance

Re: output "Line in" sound

Posted: Sat Dec 22, 2018 5:56 pm
by epoch1970
I assume you mean shairplay, not shairpoint?
Please explain where that line in signal comes from?
It is not possible to input audio to a Pi via the built-in audio connector; it only works as output.

If you're meaning some digital audio coming from other sources, try exiting the shairplay program and see if you can get some sound out.

Re: output "Line in" sound

Posted: Sat Dec 22, 2018 6:00 pm
by thagrol
The first step would be to add a sound device with a line in. No Pi model has one as standard.

Beyond that, more info on your hardware and software setup is likely to be needed.

If you're using shairport-sync, it can be configured to run a command both before play begins and after play ends. You could use this functionality to stop and start playback of audio from a line in source. You'd need a sound device that supports line in (see above) and a suitable audio player program.

Actual details of how to configure this depends very much on your choice of hardware, player software and system level sound software (ALSA, Pulse audio, etc).

Re: output "Line in" sound

Posted: Wed Dec 26, 2018 5:08 pm
by jtsmart
thank you very much for the quick responds, i bought a external sound card with a line in and outputs. I'm trying to use the line in from an iPad that will take priority meaning that if the iPad is playing sound i want it to come through and if it's not playing then sound from shairport-sync will be able to come through. i don't know the exact chip set but its compatible alsa sound by default (but heres the link if that helps ... B00Q4WQ7XW). i would like to use alsa sound just because i have the sound card working with alsa sound right now but i'm very willing to switch to another solution if needed. i really need the basics on how to handle line in. is there some python classes that i can just import to allow me to tunnel the line in to the line out? also for whatever solution if there a way to check is line is active or can i only check whether shairport-sync is playing? and a thought for a little down the road, does anyone know of a shairport-sync metadata decoder that is compatible with ios 12, it seems once i updated to ios 12 the decoder that is linked in their github gets much more warning flags than after about 20 secs stops. i think this is due to airplay being updated to airplay 2 or something to allow for stereo airplay devices. thanks again