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

allow to set distribution-specific set of default soundfonts #200

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

allow to set distribution-specific set of default soundfonts #200

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2015-07-10 18:16:48 +0000, Fabian Greffrath wrote:

Created attachment 2217
no sf2 sound fonts loaded by default

Hi there,

it is possible for quite some time to render music with fluidsynth using sf2 soundfonts, and actually, this should always be preferred to rendering with timidity and freepats. However, for this to work you have to either set the actual path to the sf2 soundfont file with Mix_SetSoundFonts() in-game or specify some paths in the SDL_SOUNDFONTS environment variable and additionally enforce their usage with the SDL_FORCE_SOUNDFONTS variable.

However, in Debian we have packaged two separate sf2 soundfonts that can be used with fluidsynth and that actually should be used if they are found installed - even without the need to specify two environment variables. My attached patch allows to specify the path to the soundfont files at build time by means of a #defines.

Second, if there is more than one soundfont path specified in the soundfont_paths variable, the Mix_EachSoundFont() function currently errors out when the first one in the list cannot be found. For my approach, however, it should return success if at least one of the specified soundfonts is found. This is because we know we could have two soundfonts installed on the system, but we don't know which one or if both.

We have applied this patch successfully since SDL_mixer 1.2.12-6 (11 Jul 2013) and it works flawlessly, i.e. music is rendered with fluidsynth if at least one of the two soundfonts specified at build time are found at runtime.

Thank you for considering!

  • Fabian

On 2015-07-10 18:18:55 +0000, Fabian Greffrath wrote:

This is th part in debian/rules that sets the paths to the soundfont files:

export DEB_CPPFLAGS_MAINT_APPEND := -DMIX_INIT_SOUNDFONT_PATHS="/usr/share/sounds/sf2/TimGM6mb.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2"

The soundfonts can be found in the musescore-soundfont-gm and fluid-soundfont-gm packages, respectively.

On 2017-10-13 06:05:35 +0000, Sam Lantinga wrote:

Patch is added, thanks!
https://hg.libsdl.org/SDL_mixer/rev/6c6adcc85536

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