Stereo Tool
https://forums.stereotool.com/

call back for particular settings changing
https://forums.stereotool.com/viewtopic.php?t=34159
Page 1 of 1

Author:  ccsystems [ Fri Jun 28, 2024 10:27 am ]
Post subject:  call back for particular settings changing

im using DLL and .so for cross compiled project, is there a way to get specific callbacks when settings change? like a subscribtion or something? for example i have the ability to bypass the processor from within my application however if a user logs into the web-interface and re-enables i want to be able to receive an event rather then poll.

is this possible? i do see this

// stereoTool_SetCallback
// Sets up a callback for specific situations.
// Customer specific. Ask if you need us to add a callback for some situation.

Author:  hvz [ Sat Jun 29, 2024 11:41 pm ]
Post subject:  Re: call back for particular settings changing

Hm. Not yet.... You could periodically poll the values that you're interested in, but there's no callback (yet).

What are you planning to do with it? Convince us that this is useful and we'll add it :)

Author:  ccsystems [ Sun Jun 30, 2024 8:08 am ]
Post subject:  Re: call back for particular settings changing

thanks hans

given i'm only looking for two parameters (bypass and valid licence) I've opted for a poll.

Next question, I need a way to inform the user to save the preset so when if my application restarts i can load the correct preset.

the current workflow is
1. user adds encoder instance to our application
2. user can add stereo tool processing, it initially starts without licence.
3. user applies licence through our web interface and the object is recreated with the licence
4. user can access stereotool webinterface from within an iframe or direct via new a tab.

its at this point where i need to way to detect that the user has changed the processing parameters and save the preset.

any thoughts on how i might achieve this? i was thinking i can just save the preset on a periodic timer, but would don't really want to.

is there a parameter i can read which says that the processing parameters have changed? or that the webinterface is currently being accessed? i could atleast assume that if the web interface is being accessed then i should save the preset every X seconds.

thanks

Author:  hvz [ Mon Jul 01, 2024 4:21 pm ]
Post subject:  Re: call back for particular settings changing

We actually do something like that internally: If settings are changed, a flag is set, and after 30 seconds the preset is saved (to avoid saving all the time). The save is done to the .ini file; the .ini file name is the name of the DLL with .dll replaced by .ini (or .so or .dylib replaced by .rc, on Linux or Mac). If you make sure that each instance loads a differently named .dll, then each instance will have its own .ini file.

There's currently no indicator that settings have been changed. A workaround for now (if you want to save the settings yourself as well) would be to check if the .ini file date/time changes. But that's of course pretty hacky....

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/