jpcima / ysfx

Hosting library for JSFX
Apache License 2.0
172 stars 28 forks source link

srate is not in sync with the VST host #43

Closed frank1119 closed 2 years ago

frank1119 commented 2 years ago

The sample rate of e.g. Reaper is not reflected in the system variable 'srate' in jsxf. When the sample rate is altered srate does also not reflect this change (not surprisingly).

Tested with GigPerformer 4.0 and Reaper 6.43. ysfx Plugin build was the developer build of Jan 5th, 2022.

BTW, amazing plugin. Is knew jsfx for use within Reaper and ReaJS for other VST host. The environment is Reaper is very nice, but proprietary, ReaJS is useful with other VST hosts, but rather limited (maximum of 2 audio channels, at least with GigPerformer) and kind of deprecated. All this is solved Ysfx. Thank you.

jpcima commented 2 years ago

I have a precise idea what's going on, so I made a quick change, not tested. Can you pick up latest for a test after it builds? https://github.com/jpcima/ysfx/actions/runs/1672461254

frank1119 commented 2 years ago

That looks a lot better. I will check it out tomorrow (I should be sleeping by now, but sometimes, I'm having too much fun with coding etc. :-)). It's a shame I didn't ask sooner: I spent a whole day deriving the right sample rate myself.

I keep you informed and many thanks.

frank1119 commented 2 years ago

I can confirm that srate now is in sync with the host. Thanks