(shareMode _AUDCLNT_SHAREMODE, pFormat *_WAVEFORMATEXTENSIBLE)
| 293 | } |
| 294 | |
| 295 | func (i *_IAudioClient2) IsFormatSupported(shareMode _AUDCLNT_SHAREMODE, pFormat *_WAVEFORMATEXTENSIBLE) (*_WAVEFORMATEXTENSIBLE, error) { |
| 296 | var closestMatch *_WAVEFORMATEXTENSIBLE |
| 297 | r, _, _ := syscall.Syscall6(i.vtbl.IsFormatSupported, 4, uintptr(unsafe.Pointer(i)), |
| 298 | uintptr(shareMode), uintptr(unsafe.Pointer(pFormat)), uintptr(unsafe.Pointer(&closestMatch)), |
| 299 | 0, 0) |
| 300 | if uint32(r) != uint32(windows.S_OK) { |
| 301 | if uint32(r) == uint32(windows.S_FALSE) { |
| 302 | var r _WAVEFORMATEXTENSIBLE |
| 303 | if closestMatch != nil { |
| 304 | r = *closestMatch |
| 305 | windows.CoTaskMemFree(unsafe.Pointer(closestMatch)) |
| 306 | } |
| 307 | return &r, nil |
| 308 | } |
| 309 | if isAudclntErr(uint32(r)) { |
| 310 | return nil, fmt.Errorf("oto: IAudioClient2::IsFormatSupported failed: %w", _AUDCLNT_ERR(r)) |
| 311 | } |
| 312 | return nil, fmt.Errorf("oto: IAudioClient2::IsFormatSupported failed: HRESULT(%d)", uint32(r)) |
| 313 | } |
| 314 | return nil, nil |
| 315 | } |
| 316 | |
| 317 | func (i *_IAudioClient2) Release() uint32 { |
| 318 | r, _, _ := syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0) |
nothing calls this directly
no test coverage detected