| 474 | } |
| 475 | |
| 476 | void |
| 477 | WASAPI_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. */ |
| 494 | int |
no test coverage detected