unsafe extern "C" fn rate_listener(
                    device_id: AudioObjectID,
                    _n_addresses: u32,
                    _properties: *const AudioObjectPropertyAddress,
                    rate_ptr: *mut ::std::os::raw::c_void,
                ) -> OSStatus {
                    let rate_ptr: *const f64 = rate_ptr as *const _;
                    let data_size = mem::size_of::<f64>();
                    let property_address = AudioObjectPropertyAddress {
                        mSelector: kAudioDevicePropertyNominalSampleRate,
                        mScope: kAudioObjectPropertyScopeGlobal,
                        mElement: kAudioObjectPropertyElementMaster,
                    };
                    AudioObjectGetPropertyData(
                        device_id,
                        &property_address as *const _,
                        0,
                        null(),
                        &data_size as *const _ as *mut _,
                        rate_ptr as *const _ as *mut _,
                    )
                }
// Setting the sample rate of a device is an asynchronous process in coreaudio.
//
// Thus, we are required to set a `listener` so that we may be notified when the
// change occurs.
Setting the sample rate of a device is an asynchronous process in coreaudio.
Thus, we are required to set a `listener` so that we may be notified when the
change occurs.
Setting the sample rate of a device is an asynchronous process in coreaudio . Thus we are required to set a ` listener ` so that we may be notified when the change occurs .
unsafe extern "C" fn rate_listener(
                    device_id: AudioObjectID,
                    _n_addresses: u32,
                    _properties: *const AudioObjectPropertyAddress,
                    rate_ptr: *mut ::std::os::raw::c_void,
                ) -> OSStatus {
                    let rate_ptr: *const f64 = rate_ptr as *const _;
                    let data_size = mem::size_of::<f64>();
                    let property_address = AudioObjectPropertyAddress {
                        mSelector: kAudioDevicePropertyNominalSampleRate,
                        mScope: kAudioObjectPropertyScopeGlobal,
                        mElement: kAudioObjectPropertyElementMaster,
                    };
                    AudioObjectGetPropertyData(
                        device_id,
                        &property_address as *const _,
                        0,
                        null(),
                        &data_size as *const _ as *mut _,
                        rate_ptr as *const _ as *mut _,
                    )
                }
unsafe extern " " fn rate_listener ( device_id : AudioObjectID , _n_addresses : u32 , _properties : * const AudioObjectPropertyAddress , rate_ptr : * mut :: std :: os :: raw :: c_void , ) -> OSStatus { let rate_ptr : * const f64 = rate_ptr as * const _ ; let data_size = mem :: size_of :: < f64 > ( ) ; let property_address = AudioObjectPropertyAddress { mSelector : kAudioDevicePropertyNominalSampleRate , mScope : kAudioObjectPropertyScopeGlobal , mElement : kAudioObjectPropertyElementMaster , } ; AudioObjectGetPropertyData ( device_id , & property_address as * const _ , 0 , null ( ) , & data_size as * const _ as * mut _ , rate_ptr as * const _ as * mut _ , ) }
Setting the sample rate of a device is an asynchronous process in coreaudio.
Setting the sample rate of a device is an asynchronous process in coreaudio .
device_id
AudioObjectID
_n_addresses
u32
_properties
*const AudioObjectPropertyAddress
rate_ptr
*mut ::std::os::raw::c_void
device_id
AudioObjectID
_n_addresses
u32
_properties
*const AudioObjectPropertyAddress
rate_ptr
*mut ::std::os::raw::c_void