gotwalt / sonos

Control Sonos speakers with Ruby
MIT License
383 stars 77 forks source link

Add line in support #29

Closed pfeffed closed 10 years ago

pfeffed commented 10 years ago

Sam,

This adds basic line-in support in the format "@playing_speaker.line_in(@source_speaker)". Note, this only changes the input and does not play sound. To play sound, this needs to be followed by @playing_speaker.play since the default is for the input to be stopped.

I haven't yet figured out how Sonos filters the list of speakers to the ones with something connected to the line_in input.

Regards,

soffes commented 10 years ago

Awesome! What's the purpose of the master speaker stuff?

soffes commented 10 years ago

Oh I see, this PR contains all of your other ones :(

Next time, it would be awesome if you use a different branch for PR so that doesn't happen.

pfeffed commented 10 years ago

Sorry, I thought I fixed that before submitting the PRs. I accidentally crossed two branches at one point. I'd be happy to look into it and resubmit in a bit. On Feb 4, 2014 8:00 AM, "Sam Soffes" notifications@github.com wrote:

Oh I see, this PR contains all of your other ones :(

Next time, it would be awesome if you use a different branch for PR so that doesn't happen.

Reply to this email directly or view it on GitHubhttps://github.com/soffes/sonos/pull/29#issuecomment-34074232 .

soffes commented 10 years ago

It's all good. Going through them now.

soffes commented 10 years ago

I don't have any with line in so I can't test this, but it looks alright to me :)

pfeffed commented 10 years ago

Ahh, I think I remember now. I think the reason they were mixed was due to a dependency between those two commits. I had to fix the group_master issue so the line in could be controlled reliably in certain edge cases. I didn't want commit #29 to happen without #28 being in place to support it, hence why I kept those two together. Would you like me to handle that in a different way going forward?

David Maurice Pfeffer 652 Melville Avenue | Palo Alto, CA 94301 | USA H: +1.650.331.0059 | M: +1.202.329.3557 | E: david@pfeffer.org

On Tue, Feb 4, 2014 at 8:05 AM, Sam Soffes notifications@github.com wrote:

Merged #29 https://github.com/soffes/sonos/pull/29.

Reply to this email directly or view it on GitHubhttps://github.com/soffes/sonos/pull/29 .

soffes commented 10 years ago

It’s not a big deal. In the future if they can be separate, separate them. If not, keep them together and explain why.

Thanks again!

On Feb 4, 2014, at 8:14 AM, David Pfeffer notifications@github.com wrote:

Ahh, I think I remember now. I think the reason they were mixed was due to a dependency between those two commits. I had to fix the group_master issue so the line in could be controlled reliably in certain edge cases. I didn't want commit #29 to happen without #28 being in place to support it, hence why I kept those two together. Would you like me to handle that in a different way going forward?

David Maurice Pfeffer 652 Melville Avenue | Palo Alto, CA 94301 | USA H: +1.650.331.0059 | M: +1.202.329.3557 | E: david@pfeffer.org

On Tue, Feb 4, 2014 at 8:05 AM, Sam Soffes notifications@github.com wrote:

Merged #29 https://github.com/soffes/sonos/pull/29.

Reply to this email directly or view it on GitHubhttps://github.com/soffes/sonos/pull/29 .

— Reply to this email directly or view it on GitHub.

pfeffed commented 10 years ago

Okay, will do.

Thanks,

David Maurice Pfeffer 652 Melville Avenue | Palo Alto, CA 94301 | USA H: +1.650.331.0059 | M: +1.202.329.3557 | E: david@pfeffer.org

On Tue, Feb 4, 2014 at 8:16 AM, Sam Soffes notifications@github.com wrote:

It's not a big deal. In the future if they can be separate, separate them. If not, keep them together and explain why.

Thanks again!

On Feb 4, 2014, at 8:14 AM, David Pfeffer notifications@github.com wrote:

Ahh, I think I remember now. I think the reason they were mixed was due to a dependency between those two commits. I had to fix the group_master issue so the line in could be controlled reliably in certain edge cases. I didn't want commit #29 to happen without #28 being in place to support it, hence why I kept those two together. Would you like me to handle that in a different way going forward?

David Maurice Pfeffer 652 Melville Avenue | Palo Alto, CA 94301 | USA H: +1.650.331.0059 | M: +1.202.329.3557 | E: david@pfeffer.org

On Tue, Feb 4, 2014 at 8:05 AM, Sam Soffes notifications@github.com wrote:

Merged #29 https://github.com/soffes/sonos/pull/29.

Reply to this email directly or view it on GitHub< https://github.com/soffes/sonos/pull/29> .

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com/soffes/sonos/pull/29#issuecomment-34076095 .