Remove uninitalized from coreaudio backend

uninitialized is being deprecated in favour of
MaybeUninit and friends.

In fact, using mem::zeroed() here is the
initialization method that apple docs recommend.

https://developer.apple.com/documentation/coreaudiotypes/audiostreambasicdescription
This commit is contained in:
est31 2019-08-10 15:10:43 +02:00
parent 268ea6cfbf
commit 14c1258a57
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ impl Device {
};
unsafe {
let asbd: AudioStreamBasicDescription = mem::uninitialized();
let asbd: AudioStreamBasicDescription = mem::zeroed();
let data_size = mem::size_of::<AudioStreamBasicDescription>() as u32;
let status = AudioObjectGetPropertyData(
self.audio_device_id,