| 421 | } |
| 422 | |
| 423 | static void |
| 424 | ReleaseWasapiDevice(_THIS) |
| 425 | { |
| 426 | if (this->hidden->client) { |
| 427 | IAudioClient_Stop(this->hidden->client); |
| 428 | IAudioClient_SetEventHandle(this->hidden->client, NULL); |
| 429 | IAudioClient_Release(this->hidden->client); |
| 430 | this->hidden->client = NULL; |
| 431 | } |
| 432 | |
| 433 | if (this->hidden->render) { |
| 434 | IAudioRenderClient_Release(this->hidden->render); |
| 435 | this->hidden->render = NULL; |
| 436 | } |
| 437 | |
| 438 | if (this->hidden->capture) { |
| 439 | IAudioCaptureClient_Release(this->hidden->capture); |
| 440 | this->hidden->capture = NULL; |
| 441 | } |
| 442 | |
| 443 | if (this->hidden->waveformat) { |
| 444 | CoTaskMemFree(this->hidden->waveformat); |
| 445 | this->hidden->waveformat = NULL; |
| 446 | } |
| 447 | |
| 448 | if (this->hidden->capturestream) { |
| 449 | SDL_FreeAudioStream(this->hidden->capturestream); |
| 450 | this->hidden->capturestream = NULL; |
| 451 | } |
| 452 | |
| 453 | if (this->hidden->activation_handler) { |
| 454 | WASAPI_PlatformDeleteActivationHandler(this->hidden->activation_handler); |
| 455 | this->hidden->activation_handler = NULL; |
| 456 | } |
| 457 | |
| 458 | if (this->hidden->event) { |
| 459 | CloseHandle(this->hidden->event); |
| 460 | this->hidden->event = NULL; |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | static void |
| 465 | WASAPI_CloseDevice(_THIS) |
no test coverage detected