MCPcopy
hub / github.com/ebitengine/oto / ReleaseBuffer

Method ReleaseBuffer

api_wasapi_windows.go:397–406  ·  view source on GitHub ↗
(numFramesWritten uint32, dwFlags uint32)

Source from the content-addressed store, hash-verified

395}
396
397func (i *_IAudioRenderClient) ReleaseBuffer(numFramesWritten uint32, dwFlags uint32) error {
398 r, _, _ := syscall.Syscall(i.vtbl.ReleaseBuffer, 3, uintptr(unsafe.Pointer(i)), uintptr(numFramesWritten), uintptr(dwFlags))
399 if uint32(r) != uint32(windows.S_OK) {
400 if isAudclntErr(uint32(r)) {
401 return fmt.Errorf("oto: IAudioRenderClient::ReleaseBuffer failed: %w", _AUDCLNT_ERR(r))
402 }
403 return fmt.Errorf("oto: IAudioRenderClient::ReleaseBuffer failed: HRESULT(%d)", uint32(r))
404 }
405 return nil
406}
407
408type _IMMDevice struct {
409 vtbl *_IMMDevice_Vtbl

Callers 1

writeOnRenderThreadMethod · 0.80

Calls 2

isAudclntErrFunction · 0.85
_AUDCLNT_ERRTypeAlias · 0.85

Tested by

no test coverage detected