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

Bug in IpatchSF2GenSampleModes enum. #28

Merged
merged 3 commits into from
Nov 17, 2019
Merged

Bug in IpatchSF2GenSampleModes enum. #28

merged 3 commits into from
Nov 17, 2019

Conversation

jjceresa
Copy link
Contributor

This PR fixes issue swami/swami#12

  • IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value that must be 3 (instead of 2).

  • Also, enum IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value must be added
    (set to 2) because it should be interpreted as "loop none".

    (sfspec24.pdf - p 36 - generator sampleModes (54)).

 - IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value that must be 3 (instead of 2).
 - Also, enum IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value must be added
   (set to 2) because it should be interpreted as "loop none".

   (sfspec24.pdf - p 36 - generator sampleModes (54)).
@derselbst
Copy link
Member

derselbst commented Nov 16, 2019

Thanks for the fix. Unfortunately enum IpatchSF2GenSampleModes is public... like everything else in libinstpatch. Adding a new value in between breaks ABI and requires a SOVERSION bump. We just had one :(

Do you see a (simple) way to fix this bug internally? I.e. without adding a new value to that enum? In case not, it's ok, I'll take it, just let me know pls.

@jjceresa
Copy link
Contributor Author

Do you see a (simple) way to fix this bug internally? I.e. without adding a new value to that enum?

Avoiding adding a new value IPATCH_SF2_GEN_SAMPLE_MODE_UNUSED (2) public is possible, but in this case we need to define this enum value internally. (ofc , we must avoid using an internal hard-coded value 2 ) .

In all case it is required that IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value must be changed from the wrong value (2) to the correct value 3. (which will break ABI too).
This enum correspond to the values specified in SF specs, and actually any application that use the wrong value IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE (2) shouldn't work very well !.

jjceresa added 2 commits November 17, 2019 01:44
 - IPATCH_SF2_GEN_SAMPLE_MODE_LOOP_RELEASE value that must be 3 (instead of 2).
 - Also, enum IPATCH_SF2_GEN_SAMPLE_MODE_UNUSED value must be added
   (set to 2) because it should be interpreted as "loop none".

   (sfspec24.pdf - p 36 - generator sampleModes (54)).
@jjceresa
Copy link
Contributor Author

Last commits (6780600, 556d5ae) are only a change in commit message.

@derselbst
Copy link
Member

Ok, thanks.

@derselbst derselbst merged commit a427ef5 into master Nov 17, 2019
@derselbst derselbst deleted the loop-type branch November 17, 2019 17:08
derselbst added a commit that referenced this pull request Dec 1, 2019
derselbst added a commit that referenced this pull request Dec 1, 2019
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

Successfully merging this pull request may close these issues.

2 participants