We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e55295 commit 9ce2b3fCopy full SHA for 9ce2b3f
pulse-binding/src/format.rs
@@ -577,9 +577,11 @@ impl Info {
577
/// Note for PCM: If the channel count is left unspecified in the `Info` object, then the server
578
/// will select the stream channel count. In that case the stream channel count will most likely
579
/// match the device channel count, meaning that up/downmixing will be avoided.
580
+ ///
581
+ /// Panics if `channels` is larger than can be submitted to the C function.
582
#[inline]
583
pub fn set_channels(&mut self, channels: u32) {
- debug_assert!(channels <= std::i32::MAX as u32);
584
+ assert!(channels <= std::i32::MAX as u32);
585
unsafe { capi::pa_format_info_set_channels(self.ptr as *mut capi::pa_format_info,
586
channels as i32) }
587
}
0 commit comments