use ffi; use std::ffi::CStr; use std::os::raw::c_void; use std::{ptr, str}; use util::opt_bytes; use {
DeviceCollection, DeviceId, DeviceType, InputProcessingParams, Result, Stream, StreamParamsRef,
};
/// # Safety /// /// This function is unsafe because it dereferences the given `data_callback`, `state_callback`, and `user_ptr` pointers. /// The caller should ensure those pointers are valid. #[allow(clippy::too_many_arguments)] pubunsafefn stream_init(
&self,
stream_name: Option<&CStr>,
input_device: DeviceId,
input_stream_params: Option<&StreamParamsRef>,
output_device: DeviceId,
output_stream_params: Option<&StreamParamsRef>,
latency_frames: u32,
data_callback: ffi::cubeb_data_callback,
state_callback: ffi::cubeb_state_callback,
user_ptr: *mut c_void,
) -> Result<Stream> { letmut stm: *mut ffi::cubeb_stream = ptr::null_mut();
let stream_name = as_ptr!(stream_name); let input_stream_params = as_ptr!(input_stream_params); let output_stream_params = as_ptr!(output_stream_params);
/// # Safety /// /// This function is unsafe because it dereferences the given `callback` and `user_ptr` pointers. /// The caller should ensure those pointers are valid. pubunsafefn register_device_collection_changed(
&self,
devtype: DeviceType,
callback: ffi::cubeb_device_collection_changed_callback,
user_ptr: *mut c_void,
) -> Result<()> {
call!(ffi::cubeb_register_device_collection_changed( self.as_ptr(),
devtype.bits(),
callback,
user_ptr
))?;
Ok(())
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-18)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.