davy7125/polyphone

[BUG] Polyphone determines sf3 soundfonts via the filename, not the soundfont version

Closed this issue · 1 comments

The issue

Polyphone decompresses the soundfont only if the filename extension is sf3. It doesn't check ifil like it should. (Or check sample type). This causes soundfont3 soundfonts saved with a .sf2 extension to be broken.

SoundFont3 Format

How to reproduce

  1. Grab this sf2 file and open it
  2. Navigate to samples
  3. Audio is completely broken
  4. Rename extension to "sf3"
  5. Reopen and navigate to samples
  6. Audio is fixed

Expected behavior

Polyphone should check if ifil is 3 instead of filename extension. That or check if (sampleType & 0x10) > 1

Version tested

2.3.1 (Flatpak)

I close this ticket since it be part of the job done in #204