| Summary: | Audio callback change in recent changeset causes call to NULL | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Simon Hug <chli.hug> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
| Attachments: | Fixes the userdata pointer in SDL_CaptureAudio which should not be NULL when the queue callbacks are used. | ||
|
Description
Simon Hug
2017-04-18 06:22:27 UTC
This issue was partially addressed with changeset 602806fdeba6, though SDL calls NULL in another place now. The function SDL_CaptureAudio still expects the callback and userdata in the old spec.callback and spec.userdata members [1]. I'm guessing this also breaks functions SDL_QueueAudio, SDL_DequeueAudio, and SDL_GetQueuedAudioSize because they check for the queue callback functions in spec.callback. [1] https://hg.libsdl.org/SDL/file/602806fdeba6/src/audio/SDL_audio.c#l735 The queue functions were fixed with changeset b14856808a3a. SDL_CaptureAudio still calls NULL. This last NULL pointer is fixed in https://hg.libsdl.org/SDL/rev/0992354a77aa, tbanks! --ryan. Not just yet. The userdata in SDL_CaptureAudio [1] also needs to come from callbackspec or it's going to be NULL. The queue functions object to that with a visit to the zero page. [1] https://hg.libsdl.org/SDL/file/0992354a77aa/src/audio/SDL_audio.c#l735 Created attachment 2731 [details]
Fixes the userdata pointer in SDL_CaptureAudio which should not be NULL when the queue callbacks are used.
I've read that a release of SDL 2.0.6 might be close. Would be a shame if it shipped with the queued audio capture broken. Attached is a patch that fixes the issue I'm still experiencing.
(In reply to Simon Hug from comment #5) > Created attachment 2731 [details] > Fixes the userdata pointer in SDL_CaptureAudio which should not be NULL when > the queue callbacks are used. This patch is now https://hg.libsdl.org/SDL/rev/c923c6eac264, thanks! --ryan. |