'Twas brillig, and Arun Raghavan at 16/02/11 21:24 did gyre and gimble: > On Wed, 2011-02-16 at 10:39 -0600, pl bossart wrote: >>>> - I am not sure I understand how/when the query would be used. Seems >>>> to me like a notification with the formats exposed by the sink >>>> currently selected would be more usable. And if a change in routing >>>> happens (new accessory, audio policy, etc), the client is informed and >>>> can reconfigure to PCM if need be. >>> >>> In this scheme, how would the client first determine what formats are >>> available? The notification will also be required - we can either >>> piggyback in sink, sink-input and card change notifications, or >>> introduce a new one for a change in available formats (I prefer the >>> latter). >> >> The problem is that you don't know on what sink you will play until >> you have actually created the pa_stream. The audio policy and routing >> rules may kick in and if you query before you connect you would end-up >> with a broken configuration. > > But the query API includes all the information that we can provide at > stream creation/connect time, so things would only break if the query > and connect are done with different parameters, or if the sink changed > in the period between the two calls. It should be possible for clients > to gracefully handle this and renegotiate. Just as a "future proofing" comment, what if the routing rules used the fact the stream was compressed in it's decision making as to which sink to route it to... ? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]