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

Multi-channel output for the CoreAudio driver. #1081

Merged
merged 8 commits into from
Apr 21, 2022

Conversation

mattrtaylor
Copy link
Contributor

Hi, this pull request does two things:

  • Enable the synth.audio-channels and synth.audio-groups settings to work with CoreAudio as they do on other platforms.

    • This required modifying the AudioStreamBasicDescription, which was hardcoded as interleaved stereo. A nice efficiency improvement we can make here is adding the kAudioFormatFlagIsNonInterleaved flag, which allows us to skip the allocation and interleave + copy step and pass the buffers filled by the fluidsynth render callback directly.
  • Adds a audio.coreaudio.channel-map setting to make use of CoreAudio's standard channel mapping facility to arbitrarily route output channels.

As an example of why these changes are helpful, I use them for live performances to route MIDI instruments, samples, and cues to different channels on a digital rack mixer where they can be adjusted by a front-of-house sound engineer as if they were separate instruments.

Copy link
Member

@derselbst derselbst left a comment

Choose a reason for hiding this comment

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

That looks pretty excellent. Thank you! I have some minor comments below. And I'm pinning @pedrolcl as he might be interested in this change as well.

src/drivers/fluid_coreaudio.c Show resolved Hide resolved
doc/fluidsettings.xml Outdated Show resolved Hide resolved
src/drivers/fluid_coreaudio.c Outdated Show resolved Hide resolved
src/drivers/fluid_coreaudio.c Show resolved Hide resolved
@pedrolcl
Copy link
Contributor

I'm pinning @pedrolcl as he might be interested in this change as well.

I don't use macOS anymore. My MBP is useless after the update to Catalina, so I'm planning to install Linux on it. Bye, bye, Apple!

@sonarcloud
Copy link

sonarcloud bot commented Apr 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@derselbst derselbst left a comment

Choose a reason for hiding this comment

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

LGTM, Thank You!

@derselbst derselbst merged commit 486e3f3 into FluidSynth:master Apr 21, 2022
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.

None yet

3 participants