Closed yoshinorisano closed 1 year ago
Hey @yoshinorisano I've added a new API for setting defaults with ObsString
- let me know how you go 👍🏻
You should be able to do something like this (you might need to .clone()
)
settings.set_default::<ObsString>(obs_string!("filter_type"), DEFAULT_FILTER_TYPE);
@bennetthardwick Thank you so much! I've written a test code that uses the latest API and checked it works perfectly!
Awesome, great to hear it 🙏🏻
Hi, I have a question on the newly added set_default API. I want to use that API for loading a string default value. But, it is very complicated for me...
I wrote code like this: https://github.com/yoshinorisano/obs-biquad-filter-plugin/commit/7d658d94a92ca3a92e2e1fc36460b9df454454f8#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R170
It works. But, it is not optimal. I want to use the following const to remove the code duplication, but I cannot find how to do that.
@bennetthardwick If you have some good idea, could you please let me know...?