mixSetPostMixCallback function mixer
- Pointer<
MixMixer> mixer, - Pointer<
NativeFunction< cb,MixPostMixCallback> > - Pointer<
NativeType> userdata
Set a callback that fires when all mixing has completed.
After all mixer groups have processed, their buffers are mixed together into a single buffer for the final output, at which point a callback can be fired. This lets an app view the data at the last moment before mixing completes. It can also change the data in any way it pleases during this callback, and the mixer will continue as if this data is the final output.
Each mixer has its own unique callback.
Passing a NULL callback here is legal; it disables this mixer's callback.
\param mixer the mixer to assign this callback to. \param cb the function to call when the mixer mixes. May be NULL. \param userdata an opaque pointer provided to the callback for its own personal use. \returns true on success or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL_mixer 3.0.0.
\sa MIX_PostMixCallback
extern SDL_DECLSPEC bool SDLCALL MIX_SetPostMixCallback(MIX_Mixer *mixer, MIX_PostMixCallback cb, void *userdata)
Implementation
bool mixSetPostMixCallback(
Pointer<MixMixer> mixer,
Pointer<NativeFunction<MixPostMixCallback>> cb,
Pointer<NativeType> userdata,
) {
final mixSetPostMixCallbackLookupFunction = _libMixer
.lookupFunction<
Uint8 Function(
Pointer<MixMixer> mixer,
Pointer<NativeFunction<MixPostMixCallback>> cb,
Pointer<NativeType> userdata,
),
int Function(
Pointer<MixMixer> mixer,
Pointer<NativeFunction<MixPostMixCallback>> cb,
Pointer<NativeType> userdata,
)
>('MIX_SetPostMixCallback');
return mixSetPostMixCallbackLookupFunction(mixer, cb, userdata) == 1;
}