Update winapi

Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
Peter Atashian 2015-11-09 17:52:43 -05:00
parent bed1efcb5a
commit fc4e3ce823
3 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ keywords = ["audio", "sound"]
[dependencies]
libc = "*"
lazy_static = "0.1"
winapi = "0.2.4"
winapi = "0.2.5"
ole32-sys = "0.1"
[target.i686-unknown-linux-gnu.dependencies.alsa-sys]

View File

@ -69,7 +69,7 @@ impl Default for EndpointsIterator {
unsafe {
let mut collection: *mut winapi::IMMDeviceCollection = mem::uninitialized();
// can fail because of wrong parameters (should never happen) or out of memory
check_result((*ENUMERATOR.0).EnumAudioEndpoints(winapi::EDataFlow::eRender,
check_result((*ENUMERATOR.0).EnumAudioEndpoints(winapi::eRender,
winapi::DEVICE_STATE_ACTIVE,
&mut collection))
.unwrap();
@ -116,8 +116,8 @@ impl Iterator for EndpointsIterator {
pub fn get_default_endpoint() -> Option<Endpoint> {
unsafe {
let mut device = mem::uninitialized();
let hres = (*ENUMERATOR.0).GetDefaultAudioEndpoint(winapi::EDataFlow::eRender,
winapi::ERole::eConsole, &mut device);
let hres = (*ENUMERATOR.0).GetDefaultAudioEndpoint(winapi::eRender,
winapi::eConsole, &mut device);
if let Err(_err) = check_result(hres) {
return None; // TODO: check specifically for `E_NOTFOUND`, and panic otherwise

View File

@ -43,7 +43,7 @@ impl Voice {
// computing the format and initializing the device
let format = {
let format_attempt = try!(format_to_waveformatextensible(format));
let share_mode = winapi::AUDCLNT_SHAREMODE::AUDCLNT_SHAREMODE_SHARED;
let share_mode = winapi::AUDCLNT_SHAREMODE_SHARED;
// `IsFormatSupported` checks whether the format is supported and fills
// a `WAVEFORMATEX`