Kiriki-liszt / JS_Inflator

JS Inflator is a copy of Sonox Inflator.
GNU General Public License v3.0
204 stars 24 forks source link

On an M1 Mac under Logic, oversampling > 1x is not working #30

Closed bythesea123 closed 2 months ago

bythesea123 commented 3 months ago

Hi! Thanks for the plugin. However, on an M1 Mac under Logic, any oversampling > 1x is not working and results in a one-time click. On 1.7.0, this at least is reversible by returning to 1x, on 2.0.1, the plugin has to be restarted. Regards

Kiriki-liszt commented 3 months ago

Hello! Thanks for testing out! My mac here is still Intel, so I couldn't regenerate the problem - it works fine here. Right now my guess is in the AU wrapper. After the OS parameter change, it should restart by itself with updated latency. Maybe the wrapper could not handle that restart call properly(but why M-series mac only...?). I'll look into that, but it might take a little bit of time since I don't have any M-series mac.

I'll comment here if some progresses are made.

Have a nice day! =)

bythesea123 commented 3 months ago

Hi! Thanks for your reply. I just created a project, switched the oversampling to 4x, saved it, reloaded it, but it still doesn't work even first time, unless I switch it (1.7.0) back to 1x, but then it works again. So would that agree with your theory? I have a buffer size of 64, an RME interface and a Mac Mini M1 which holds up pretty well with plugins in 2x or 4x oversampling. Regards

Kiriki-liszt commented 3 months ago

Just found out that in AU wrapper in VSTSDK marks the restart section as TODO...

// TODO: finish restartComponent implementation

https://github.com/steinbergmedia/vst3_public_sdk/blob/3f20bcbf36283b1e5c450e088571be6226cd4e64/source/vst/auwrapper/auwrapper.mm#L2123

'll see if it's the problem for that.

bythesea123 commented 3 months ago

Thanks!

Kiriki-liszt commented 3 months ago

After some time debugging, I found out that AUv2(either VSTSDK wrapper or Apple's SDK) is not working as expected.

When oversampling modes are changed, the plugin should restart. During the restart process, it should start from something called 'setupProcessing' - where initializing and memory resizing happens.

However, that 'setupProcessing' is not called in restart process of AUv2 version. VST3 version does.

Attached is a demo build with only difference in setupProcessing. If it's not working, then it's probably time to ditch AUv2 and build AUv3.

+) What happens in oversampling mode of 'Max'? is it same?

JS Inflator macOS v2.0.1.1.zip

bythesea123 commented 3 months ago

Hi, and thanks for the quick update.

Regarding 2.0.1.1: On 'Max', the plugin continues to work with 2x, 4x, 8x, and the latency gets quite noticeable. On 1x, there appears to be less latency.

However, on 'Min', when switching from 1x to 2x, 4x, 8x, it still makes that one click and then outputs no sound. However, switching back to 1x restores the functionality, and like in 1.7.0, I don't have to restart the whole plugin again.

(BTW, I always have to sign with 'sudo xattr -r -d com.apple.quarantine /Library/Audio/Plug-Ins/Components/JS_Inflator.component' and 'sudo codesign --force --sign - /Library/Audio/Plug-Ins/Components/JS_Inflator.component', but I guess that's normal.)

One more, totally unconnected thing: The little lines left and right next to the faders aren't totally aligned, i.e. they are a little lower on the right. I guess this was done to enhance the pseudo 3d effect, but for me it leads to not knowing when the fader is on for example exactly zero.

Hope this helps

Kiriki-liszt commented 3 months ago

Thanks for sharing!! If plugin works in 'Max' setting, that's a big clue! The plugin's oversampling uses library from others, and one of it might not work well with M-series... I'll work on it furthermore, and upload new beta here!

Kiriki-liszt commented 3 months ago

I think I just I found out why! When I build plugin in DEBUG mode, and ran it through MacBook Air M1 2020 I just borrowed, everything works as expected. That means, something in RELEASE setting is keep getting M-series code not working. I'm using steinberg standard setting, have to figure out what is doing that behavior. It's really one step away from the fix!

bythesea123 commented 3 months ago

Thanks for keeping me updated! Keeping my fingers crossed you get it working.

Kiriki-liszt commented 3 months ago

Hi! Though I figured out what part was causing the problem, but unable to debug it because, I'm on Intel mac. Also I had to return that borrowed Macbook Air, so I just ordered the latest iMac! It will take about two to three weeks to ship.

I'll keep updating the status of this problem if any new progresses are made, I might be able to borrow that Macbook again =)

Have another nice day!

bythesea123 commented 3 months ago

Hi there!

Thanks again for keeping me updated. Best of success to you.

Regards

Kiriki-liszt commented 2 months ago

Thanks for long waiting!! Finally, the error is fixed in latest release v2.0.3! Just tested on new iMac M3 and works well, and should work well with all Apple Silicon. If it's not bugging in your system too, then it will be ready to close this issue.

Have a great day!! =)

bythesea123 commented 2 months ago

Hi there!

It seems to work! All modes 1x, 2x, 4x, 8x in min and max no dropouts.

Thanks for your efforts! Regards