forum-msg-id-137745-edit
Original date:2023-03-19 03:09:57 Edited by: Icy_Viking Subject: I think I got Callbacks now?
Hello all,
While I am still trying to work with callbacks. I think I am slowly starting to figure them out or how to wrap them. I just want to make sure that I am doing it right.
[https://github.com/SFML/CSFML/blob/master/include/SFML/Audio/SoundRecorder.h] - for reference
typedef sfBool (*sfSoundRecorderStartCallback)(void*); ///< Type of the callback used when starting a capture typedef sfBool (*sfSoundRecorderProcessCallback)(const sfInt16*, size_t, void*); ///< Type of the callback used to process audio data typedef void (*sfSoundRecorderStopCallback)(void*); ///< Type of the callback used when stopping a capture
public function sfSoundRecorderStartCallback(atom cap) atom id = cap return id end function public constant sfSoundRecorderStartCallback_cb = call_back(routine_id("sfSoundRecorderStartCallback"),{C_POINTER},C_BOOL) public function sfSoundRecorderProcessCallback(atom in16,atom size,atom user) atom id = in16 atom s = size atom u = user return id end function public constant sfSoundRecorderProcessCallback_cb = call_back(routine_id("sfSoundRecorderProcessCallback"),{C_POINTER,C_SIZE_T,C_POINTER},C_BOOL) public function sfSoundRecorderStopCallback(atom user) atom id = user return id end function public constant sfSoundRecorderStopCallback_cb = call_back(routine_id("sfSoundRecorderStopCallback"),{}) constant C_CALLBACK = C_POINTER
Not Categorized, Please Help
|
- history, backlinks
- Last modified 6 days ago by Icy_Viking