Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haptic2ahap doesn't support newer Core Haptics versions with split mode #38

Open
2 tasks done
calumptrck opened this issue Feb 4, 2024 · 0 comments
Open
2 tasks done

Comments

@calumptrck
Copy link

Bug report

Checklist

  • I'm using the latest release
  • I've searched for existing issue

Goals

convert a .haptic to .ahap using haptic2ahap in split mode (without -n option)

Steps to Reproduce

  1. Create a .haptic file, I used Meta Haptics Studio
  2. ./haptic2ahap hapticfile.haptic using haptic2ahap-0.2.1 (latest release). Note no -n option
  3. Both hapticfile_transients.ahap and hapticfile_continuous.ahap contain "Version": 0.0.

Expected behavior

I should be able to preview both .ahap files on macOS (tested on Sonoma), and play them on iOS (tested on iOS 17)

Observed behavior

The ahap version is unsupported according to preview, and the haptic does not successfully play on my iPhone

Screenshot 2024-02-04 at 9 29 51 AM

For reference, previewing with fixed version looks like:
Screenshot 2024-02-04 at 9 37 10 AM

Code Samples & Details

According to the docs the top level Version key represents the Core Haptics version supported by the ahap.

I could manually mitigate by changing the version in each file from 0.0 to 1.0. It's not clear to me if the tool actually needs any changes to support current CH (are there even multiple versions), or if the version added to each ahap just needs to be updated to 1.0. With my mitigation I didn't notice any other issues & playback worked fine when played simultaneously.

In non-split mode the version is always set to 1.0 in the builder https://github.com/Lofelt/NiceVibrations/blob/main/core/datamodel/src/ios/v1.rs#L155 but this is skipped for split mode. Since split mode skips over this it's also lacking a filled out Metadata key unlike non-skip. Didn't attempt to set up env to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant