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

Failed to create the audio driver #803

Closed
jedker999 opened this issue Mar 12, 2021 · 13 comments
Closed

Failed to create the audio driver #803

jedker999 opened this issue Mar 12, 2021 · 13 comments
Labels
Milestone

Comments

@jedker999
Copy link

Im using macOS big sur and have installed fluidsynth v 2.1.7. When I want to start it I get an error:

fluidsynth: error: Error setting the audio callback. Status=-66748
Failed to create the audio driver

any ideas how to fix it?

@jedker999 jedker999 added the bug label Mar 12, 2021
@derselbst
Copy link
Member

Same issue as https://lists.nongnu.org/archive/html/fluid-dev/2021-02/msg00003.html

No idea how to fix it. Pls. verify that when using the portaudio driver fluidsynth -a portaudio it fails as well. If it does fail, it's not a fluidsynth issue.

@jedker999
Copy link
Author

Same issue as https://lists.nongnu.org/archive/html/fluid-dev/2021-02/msg00003.html

No idea how to fix it. Pls. verify that when using the portaudio driver fluidsynth -a portaudio it fails as well. If it does fail, it's not a fluidsynth issue.

unfortunately throws error as well:
||PaMacCore (AUHAL)|| Error on line 1316: err='-66748', msg=Unknown Error
fluidsynth: error: Error opening PortAudio stream: Internal PortAudio error
Failed to create the audio driver

@derselbst
Copy link
Member

This error is printed when the call to AudioUnitSetProperty fails. According to www.osstatus.com the returned error is kAudioComponentErr_NotPermitted. You'll probably be more lucky trying to reach out in a Mac Forum.

@jedker999
Copy link
Author

This error is printed when the call to AudioUnitSetProperty fails. According to www.osstatus.com the returned error is kAudioComponentErr_NotPermitted. You'll probably be more lucky trying to reach out in a Mac Forum.

Thanks for response.

@giona69
Copy link

giona69 commented Mar 27, 2021

@jedker999 any luck on solving this problem? I have it too ...

@mawe42
Copy link
Member

mawe42 commented Mar 27, 2021

Just an idea (coming from somebody who doesn't use Macs): According to this, the kAudioComponentErr_NotPermitted error might point to insufficient privileges:

@constant kAudioComponentErr_NotPermitted
app needs "inter-app-audio" entitlement or host app needs "audio" in its UIBackgroundModes. Or app is trying to register a component not declared in its Info.plist.

Could you try giving fluidsynth more permissions under System Preferences / Security & Privacy / Privacy? The following might be interesting:

  • Microphone
  • Media & Apple Music

But maybe there are even more audio related permissions?

@ringoz
Copy link
Contributor

ringoz commented Apr 7, 2021

@jedker999 can you reopen this issue?

fluidsynth just doesn't work on macOS currently.

@ringoz
Copy link
Contributor

ringoz commented Apr 7, 2021

quote from debug output:

This application, or a library it uses, is using the deprecated Component Manager for hosting Audio Components. This is not supported when rebuilding against the 11.00 or later SDK. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

@derselbst
Copy link
Member

Wow, I would have never guessed that kAudioComponentErr_NotPermitted is due to a deprecated API. @ringoz Thank you very much! Does the debug output you've posted show up automatically, or do you have to set some environment variables or something?

@ringoz
Copy link
Contributor

ringoz commented Apr 7, 2021

Fortunately, this debug output was shown by OS automatically.
It is not stdout or stderr, but NSLog & os_log kind of output.

@derselbst
Copy link
Member

Ok, thanks.

@giona69 @jedker999 I've just applied the fix to master. Pls. let me know if it works for you, so I can backport this to 2.1.x .

@mawe42
Copy link
Member

mawe42 commented Apr 7, 2021

Great that this was fixed! And funny that PortAudio had the exact same problem: PortAudio/portaudio#338

@derselbst derselbst added this to the 2.2 milestone May 1, 2021
@justinpage
Copy link

For those on macOS Big Sur who download fluidsynth via homebrew: you have version 2.1.8 installed.

I was seeing the same issue described in this thread and the following command did the trick:

fluidsynth -g 2 -p fluidsynth -o midi.driver=coremidi -o audio.driver=portaudio \
	-o audio.coreaudio.device=default -o audio.period-size=256 \
	soundfont.sf2

In other words, running audio.driver=portaudio instead of audio.driver=coreaudio worked for me.

Keep in mind that Homebrew has an open pull request to make the latest version number available:
Homebrew/homebrew-core#74428

Hope this helps!

derselbst pushed a commit that referenced this issue Jul 28, 2021
Expands on #803 and closes #946.

Tested on macOS 11.4 as well as 10.4.
pedrolcl pushed a commit to pedrolcl/fluidsynth that referenced this issue Jul 31, 2021
Expands on FluidSynth#803 and closes FluidSynth#946.

Tested on macOS 11.4 as well as 10.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants