Remove redundant field names
This commit is contained in:
parent
7765e941ed
commit
d12d9f479b
|
@ -336,7 +336,7 @@ unsafe fn format_from_waveformatex_ptr(
|
||||||
let format = Format {
|
let format = Format {
|
||||||
channels: (*waveformatex_ptr).nChannels as _,
|
channels: (*waveformatex_ptr).nChannels as _,
|
||||||
sample_rate: SampleRate((*waveformatex_ptr).nSamplesPerSec),
|
sample_rate: SampleRate((*waveformatex_ptr).nSamplesPerSec),
|
||||||
data_type: data_type,
|
data_type,
|
||||||
};
|
};
|
||||||
Some(format)
|
Some(format)
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ impl Device {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_immdevice(device: *mut IMMDevice) -> Self {
|
fn from_immdevice(device: *mut IMMDevice) -> Self {
|
||||||
Device {
|
Device {
|
||||||
device: device,
|
device,
|
||||||
future_audio_client: Arc::new(Mutex::new(None)),
|
future_audio_client: Arc::new(Mutex::new(None)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -763,15 +763,15 @@ impl Device {
|
||||||
// `run()` method and added to the `RunContext`.
|
// `run()` method and added to the `RunContext`.
|
||||||
{
|
{
|
||||||
let client_flow = AudioClientFlow::Capture {
|
let client_flow = AudioClientFlow::Capture {
|
||||||
capture_client: capture_client,
|
capture_client,
|
||||||
};
|
};
|
||||||
let inner = StreamInner {
|
let inner = StreamInner {
|
||||||
id: new_stream_id.clone(),
|
id: new_stream_id.clone(),
|
||||||
audio_client: audio_client,
|
audio_client,
|
||||||
client_flow: client_flow,
|
client_flow,
|
||||||
event: event,
|
event,
|
||||||
playing: false,
|
playing: false,
|
||||||
max_frames_in_buffer: max_frames_in_buffer,
|
max_frames_in_buffer,
|
||||||
bytes_per_frame: waveformatex.nBlockAlign,
|
bytes_per_frame: waveformatex.nBlockAlign,
|
||||||
sample_format: format.data_type,
|
sample_format: format.data_type,
|
||||||
};
|
};
|
||||||
|
@ -924,15 +924,15 @@ impl Device {
|
||||||
// `run()` method and added to the `RunContext`.
|
// `run()` method and added to the `RunContext`.
|
||||||
{
|
{
|
||||||
let client_flow = AudioClientFlow::Render {
|
let client_flow = AudioClientFlow::Render {
|
||||||
render_client: render_client,
|
render_client,
|
||||||
};
|
};
|
||||||
let inner = StreamInner {
|
let inner = StreamInner {
|
||||||
id: new_stream_id.clone(),
|
id: new_stream_id.clone(),
|
||||||
audio_client: audio_client,
|
audio_client,
|
||||||
client_flow: client_flow,
|
client_flow,
|
||||||
event: event,
|
event,
|
||||||
playing: false,
|
playing: false,
|
||||||
max_frames_in_buffer: max_frames_in_buffer,
|
max_frames_in_buffer,
|
||||||
bytes_per_frame: waveformatex.nBlockAlign,
|
bytes_per_frame: waveformatex.nBlockAlign,
|
||||||
sample_format: format.data_type,
|
sample_format: format.data_type,
|
||||||
};
|
};
|
||||||
|
@ -1039,7 +1039,7 @@ impl From<*const IMMDevice> for Endpoint {
|
||||||
fn from(device: *const IMMDevice) -> Self {
|
fn from(device: *const IMMDevice) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
let endpoint = immendpoint_from_immdevice(device);
|
let endpoint = immendpoint_from_immdevice(device);
|
||||||
Endpoint { endpoint: endpoint }
|
Endpoint { endpoint }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1118,7 +1118,7 @@ impl Devices {
|
||||||
check_result_backend_specific((*collection).GetCount(&mut count))?;
|
check_result_backend_specific((*collection).GetCount(&mut count))?;
|
||||||
|
|
||||||
Ok(Devices {
|
Ok(Devices {
|
||||||
collection: collection,
|
collection,
|
||||||
total_count: count,
|
total_count: count,
|
||||||
next_item: 0,
|
next_item: 0,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue