1) Call pa_stream_new_extended() with two possible format, one IEC61937-based and one PCM. 2) Call pa_stream_connect_playback() on the resulting stream with PA_STREAM_FIX_RATE flag. If PulseAudio selects the IEC format, it will fail with EINVAL. Thus there is no way to request fixed rate for the PCM format. Basically, we would need separate sets of flags for the different formats. See also https://trac.videolan.org/vlc/ticket/9309
I want to get this sorted out before 5.0, so I'm marking this as a release blocker.
There are two ways to make this work: allow and ignore the FIX_* flags for non-PCM formats, or treat missing rate/format/channels information in a PCM format info struct as if FIX_* flags were set for for that format info only. We could implement both, they don't conflict with each other. I think the more correct way is the latter, because as Remi said, we should have separate sets of flags for the different formats, and this is a way to implement that. I plan to implement this solution (not today, but "soon").
I started working on this.
FWIW, I agree that this approach makes sense.
Fix sent to the mailing list: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/19062
Fix pushed to master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.