commit
57cf0f16f4
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Reference in New Issue