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

update FluidSynth.cpp to APIv10.1, fixed segfault in FluidSynth-play.ck example #98

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

kellycochran
Copy link
Contributor

This commit:

  1. Updates FluidSynth.cpp so that it is compatible with the API version 10.1
  2. Updates the makefile.mac to point to a FluidSynth installation (required to build this chugin)
  3. Fixes a segfault in FluidSynth-play.ck by moving the FluidSynth initialization outside of a function

{
bool allChans = false;
if (chan < 0) {
allChans = true;
chan = 0;
}
fluid_synth_activate_octave_tuning(m_synth, 0, chan, "", &tuning->m_vector[0], false);
fluid_synth_activate_octave_tuning(m_synth, 0, chan, "", (double *) tuning, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to extract all of the values from the tuning Array and then pass that vector

fluid_synth_tune_notes(m_synth, 0, chan, pitches->size(),
noteNumArr, &pitches->m_vector[0], false);
fluid_synth_tune_notes(m_synth, 0, chan, api->object->array_float_size(pitches),
noteNumArr, (double *) pitches, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to copy pitches to a new vector


FLAGS+=-mmacosx-version-min=10.9 -I$(CK_SRC_PATH) $(ARCHOPTS) -I$(FLUIDSYNTH_PREFIX)/include
LDFLAGS+=-mmacosx-version-min=10.9 -shared -lc++ $(ARCHOPTS) -L$(FLUIDSYNTH_PREFIX)/lib
# construct compiler option string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ask ge @gewang

@kellycochran kellycochran merged commit f152568 into main Apr 15, 2024
6 checks passed
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