MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / WASAPI_UnrefDevice

Function WASAPI_UnrefDevice

deps/SDL2/src/audio/wasapi/SDL_wasapi.c:476–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void
477WASAPI_UnrefDevice(_THIS)
478{
479 if (!SDL_AtomicDecRef(&this->hidden->refcount)) {
480 return;
481 }
482
483 /* actual closing happens here. */
484
485 /* don't touch this->hidden->task in here; it has to be reverted from
486 our callback thread. We do that in WASAPI_ThreadDeinit().
487 (likewise for this->hidden->coinitialized). */
488 ReleaseWasapiDevice(this);
489 SDL_free(this->hidden->devid);
490 SDL_free(this->hidden);
491}
492
493/* This is called once a device is activated, possibly asynchronously. */
494int

Callers 3

WASAPI_CloseDeviceFunction · 0.85
ActivateCompletedMethod · 0.85
WASAPI_ActivateDeviceFunction · 0.85

Calls 2

ReleaseWasapiDeviceFunction · 0.85
SDL_freeFunction · 0.85

Tested by

no test coverage detected