What is the API for SONOS Playbar to Allow third party controlling Volume and Input Selection (Only)? - sonos

I only need to be able to control (over third party control system, Crestron) the volume (up, down, mute), select input (video or music) and ON/OFF for SONOS Playbar, Sub and two Play1 in order to achieve 5.1 surround sound.
I am not interested in controlling any of the other SONOS feature as I will use SONOS App for music services. I just need to ensure that my Crestron system can control volume regardless whether the active source is video (coming from the TV) or audio (coming from SONONS App) and also to be able to switch between audio and video sources.

We don't currently have a public API available for Sonos control. I will take this as input for future consideration back to the team.

Look at the UPnP specifications for RenderingControl, and use the volume/mute calls against the Playbar endpoint. Its easy. Selecting input is trickier: TV is simple, but for "music" you need to do a lot more work as you need to specify exactly what music, and Sonos support a gigantic array of options there.

Related

How do I retrieve the "Audio in" from the api (For example, stereo 2.0, Dolby Digital Plus 5.1)

I'm looking to get some information from the Sonos API but I can't seem to find it.
In the Sonos app on the "About My System" page when you scroll down (And have a device connected to your tv) it shows "Audio in". I want that information from the API. Is that possible?
Hope to hear,
Kind regards,
Namanix
The Audio In field displays the audio format that Sonos home theater speaker is receiving. See Check the audio format in Troubleshooting low audio from surround speakers for details.
The Sonos platform enables the following line-in APIs and capabilities:
Use the loadLineIn command in the playback namespace to change the current group source to the line-in source of a specified player.
View the source type in the container object. Sonos home theater products use the linein.homeTheater type. See container in Playback Objects for details.
Products with line-in capabilities include the LINE_IN capability in the player object. See the groups object for details.
I'm not sure what you're looking for, but the Sonos Play:5 (gen1) has an UPNP service called AudioIn.
If my playbar switches to TV mode (I've turned auto switching on), than the CurrentURI changes to x-sonos-htastream:.......
Instead of building something yourself, you can also check-out this typescript/node library #svrooij/sonos.

NAudio - Detect Audio via Application

Windows Volume Mixer shows audio output for individual applications.
Using NAudio, what is the right way for me to tap into this information? I essentially want to be able to make my application say:
Always record all audio input/output. Unless otherwise specified, only keep a buffer of the last 30 seconds. Throw the test away. (I know how to do this)
When Skype, Vonage, or Ring Central plays audio for more than 5 seconds, ask the user if they want to start saving the audio. (How would I do this?)
If so, save the 30-second buffer to a file and then start recording live. (I know how to do this)
Thanks for the help!
Windows won't let you capture audio from individual applications. You can use NAudio's WasapiLoopbackCapture to capture audio from all applications.
If you just want to see audio output levels for all apps, that can be achieved with the IMMDevice APIs which NAudio has wrappers for. It doesn't come with a specific demo showing that, but there's another open source project, EarTrumpet that you could explore to see how its done.

Create a custom desktop YouTube player

I want to create an application capable to play YouTube video's audios and also save the downloaded content in a local cache, therefore when the user decides to resume or play the video again, then it doesn't have to download part of video again but only download the remaining part (User can decide what to do with the cache then, and how to organize it).
It is also very convenient for mobiles (it is my main focus) but I'd like to create a desktop one too for experimental purposes.
So, my question itself is, does YouTube provide any API for this? I mean, in order to cache the download content I need that my application download the content and not any embed player (also remember that it is a native application). I have a third-party application in my Android system that plays YouTube videos, so I think it's possible unless that the developers use some sort of hack, again this is what I don't know.
Don't confuse with the web gdata info API and the embed API, this is not what I want, what I want is to handle the video transfer.
As far as I know, there is no official API for that. However, you could use libquvi to look up the URLs of the real video data, or you could have a look at how they do it and reimplement it yourself (see here).

Streaming music on your website through custom player / application (iTunes)

I was doing some research to find out ways that would allow me to stream music on my website legally. I came across iTunes partner program which allows to stream music on a website through their embedded players. I was wondering is it possible to stream iTunes music through your own custom player? If that is not possible via iTunes, then what other methods are available?
You could do this with a server software like Icecast, there is some good tutorials on setting this up here: http://www.icecast.org/docs.php
Depending on how many browsers you want to support you might want to setup two streams, one in MP3/OGG and a "backup" stream in Flash. Then add some detection as to what the browser supports and present the correct stream (i.e.: Use the HTML5 <audio> tag for playing MP3/OGG to browsers that support this, and use your flash stream for the rest)
their program allowing playback of music in the iTunes Store is likely only for those with the intention to sell music, without providing a commerce business, you'd be breaking their partner program T&C's.

Application-Bridge for iChat Audio Channels

There is a feature in GarageBand that allows you to record iChat Audio sessions directly into GarageBand. When you are the host of an iChat conference (you called the other party/parties), you can open GarageBand and hit record, and GarageBand will ask you if you wish to record the conference. Say yes, and GarageBand creates distinct tracks for all members of the conference, and records isolated audio from them into their own channel, complete with their username (or real name as determined by Address Book), and Avatar.
I'm interested in finding a way to connect this feature into other software.
First: Is this API documented? (I am not a paid Apple Developer.)
Second: Would it be possible to write a piece of software that would take these iChat audio channels, and create them as sound devices? Ideally this would be similar to the way Soundflower works to create a sound source that is a composite of all sound sources.
In theory, this would enable ANY recording application to take advantage of this iChat feature, as opposed to just GarageBand, without the need for a custom audio channel bridge for every individual piece of recording software.