(dataFlow _EDataFlow, role _ERole)
| 462 | } |
| 463 | |
| 464 | func (i *_IMMDeviceEnumerator) GetDefaultAudioEndPoint(dataFlow _EDataFlow, role _ERole) (*_IMMDevice, error) { |
| 465 | var endPoint *_IMMDevice |
| 466 | r, _, _ := syscall.Syscall6(i.vtbl.GetDefaultAudioEndpoint, 4, uintptr(unsafe.Pointer(i)), |
| 467 | uintptr(dataFlow), uintptr(role), uintptr(unsafe.Pointer(&endPoint)), 0, 0) |
| 468 | if uint32(r) != uint32(windows.S_OK) { |
| 469 | if isWin32Err(uint32(r)) { |
| 470 | return nil, fmt.Errorf("oto: IMMDeviceEnumerator::GetDefaultAudioEndPoint failed: %w", _E_NOTFOUND) |
| 471 | } |
| 472 | return nil, fmt.Errorf("oto: IMMDeviceEnumerator::GetDefaultAudioEndPoint failed: HRESULT(%d)", uint32(r)) |
| 473 | } |
| 474 | return endPoint, nil |
| 475 | } |
| 476 | |
| 477 | func (i *_IMMDeviceEnumerator) Release() { |
| 478 | syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0) |
no test coverage detected