Message 5: sf3 library - compilation with MSVC

• Sep 9, 2015 - 22:18


As the developer of the software Polyphone, one user asked me to work on the sf3 support. We exchanged a couple of emails and I'm now convinced of its benefits. By dividing by 10 the size of a soundfont and keeping most of its quality, it makes it easy to embed in a lot of applications (video games, mobile applications, ...). The idea is not new in that the format sf2pack (please note the "2") already exists for example, but it is now an open-source format which is promoted by a well-driven software with a pretty big community. Thus, I added the sf3 import / export.

The background being stated, I have several remarks and interrogations (most of them being technical). This message is part of a series comprising other messages.

Message 5: sf3 library - compilation with MSVC

(GitHub issue created here )

I imported the libray in Polyphone but when I compiled it with MSVC:

  • "char buffer[i];" is not allowed (you can use new char[i] and delete [] instead). This appears at 2 positions in the code.
  • The line "char buffer[1024*1024];" can be compiled but this crashed the software. Using new char[1048576] and delete [] solved the problem.

Do you still have an unanswered question? Please log in first to post your question.