swami / libinstpatch

Instrument file software library.
Other
20 stars 6 forks source link

Bug in IpatchSF2GenSampleModes enum. #28

Closed jjceresa closed 4 years ago

jjceresa commented 4 years ago

This PR fixes issue https://github.com/swami/swami/issues/12

derselbst commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

derselbst commented 4 years ago

Ok, thanks.