| Summary: | emscripten: assertion about device->hidden on device opening | ||
|---|---|---|---|
| Product: | SDL | Reporter: | beuc |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.8 | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Attachments: | emscripten-audit-assert.patch | ||
The patch also makes SDL2 properly unregister the Emscripten audio hooks when closing audio. |
Created attachment 3250 [details] emscripten-audit-assert.patch This assertion triggers on device opening: /* if your target really doesn't need it, set it to 0x1 or something. */ /* otherwise, close_audio_device() won't call impl.CloseDevice(). */ SDL_assert(device->hidden != NULL); This field was left at NULL following a clean-up: /* Initialize all variables that we clean on shutdown */ #if 0 /* !!! FIXME: currently not used. Can we move some stuff off the SDL2 namespace? --ryan. */ this->hidden = (struct SDL_PrivateAudioData *) The attached patch initializes the field to 0x1 as suggested. No more assertion popup on startup :)