Patch for bindgen update in ASIO backend
This commit is contained in:
parent
6fbb701826
commit
01425b4b80
|
@ -319,9 +319,7 @@ impl Asio {
|
||||||
// Make owned CString to send to load driver
|
// Make owned CString to send to load driver
|
||||||
let driver_name_cstring = CString::new(driver_name)
|
let driver_name_cstring = CString::new(driver_name)
|
||||||
.expect("failed to create `CString` from driver name");
|
.expect("failed to create `CString` from driver name");
|
||||||
let mut driver_info = ai::ASIODriverInfo {
|
let mut driver_info = std::mem::MaybeUninit::<ai::ASIODriverInfo>::uninit();
|
||||||
_bindgen_opaque_blob: [0u32; 43],
|
|
||||||
};
|
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
// TODO: Check that a driver of the same name does not already exist?
|
// TODO: Check that a driver of the same name does not already exist?
|
||||||
|
@ -329,7 +327,8 @@ impl Asio {
|
||||||
false => Err(LoadDriverError::LoadDriverFailed),
|
false => Err(LoadDriverError::LoadDriverFailed),
|
||||||
true => {
|
true => {
|
||||||
// Initialize ASIO.
|
// Initialize ASIO.
|
||||||
asio_result!(ai::ASIOInit(&mut driver_info))?;
|
asio_result!(ai::ASIOInit(driver_info.as_mut_ptr()))?;
|
||||||
|
let _driver_info = driver_info.assume_init();
|
||||||
let state = Mutex::new(DriverState::Initialized);
|
let state = Mutex::new(DriverState::Initialized);
|
||||||
let name = driver_name.to_string();
|
let name = driver_name.to_string();
|
||||||
let destroyed = false;
|
let destroyed = false;
|
||||||
|
|
Loading…
Reference in New Issue