[][src]Constant libpulse_binding::stream::flags::FIX_FORMAT

pub const FIX_FORMAT: FlagSet

Use the sample format of the sink/device this stream is being connected to, and possibly ignore the format the sample spec contains -- but you still have to pass a valid value in it as a hint to PulseAudio what would suit your stream best. If this is used you should query the used sample format after creating the stream by using Stream::get_sample_spec. Also, if you specified manual buffer metrics it is recommended to update them with Stream::set_buffer_attr to compensate for the changed frame sizes.

When creating streams with Stream::new_extended, this flag has no effect. If you specify a format with PCM encoding, and you want the server to choose the sample format, then you should leave the sample format unspecified in the ::format::Info object. This also means that you can’t use ::format::Info::new_from_sample_spec, because that function always sets the sample format.