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

Method GetBuffer

api_wasapi_windows.go:380–390  ·  view source on GitHub ↗
(numFramesRequested uint32)

Source from the content-addressed store, hash-verified

378}
379
380func (i *_IAudioRenderClient) GetBuffer(numFramesRequested uint32) (*byte, error) {
381 var data *byte
382 r, _, _ := syscall.Syscall(i.vtbl.GetBuffer, 3, uintptr(unsafe.Pointer(i)), uintptr(numFramesRequested), uintptr(unsafe.Pointer(&data)))
383 if uint32(r) != uint32(windows.S_OK) {
384 if isAudclntErr(uint32(r)) {
385 return nil, fmt.Errorf("oto: IAudioRenderClient::GetBuffer failed: %w", _AUDCLNT_ERR(r))
386 }
387 return nil, fmt.Errorf("oto: IAudioRenderClient::GetBuffer failed: HRESULT(%d)", uint32(r))
388 }
389 return data, nil
390}
391
392func (i *_IAudioRenderClient) Release() uint32 {
393 r, _, _ := syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0)

Callers 1

writeOnRenderThreadMethod · 0.80

Calls 2

isAudclntErrFunction · 0.85
_AUDCLNT_ERRTypeAlias · 0.85

Tested by

no test coverage detected