mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Fix failure to create the audio driver on macOS (#828)
The deprecated Component Manager for hosting Audio Components is not supported when rebuilding against the 11.00 or later SDK. Co-authored-by: Vladimir Davidovich <thy.ringo@gmail.com>
This commit is contained in:
parent
2173fdcab3
commit
30c899973d
2 changed files with 5 additions and 5 deletions
2
AUTHORS
2
AUTHORS
|
@ -150,4 +150,4 @@ Bernat Arlandis i Mañó
|
||||||
Sven Meier
|
Sven Meier
|
||||||
Marcus Weseloh
|
Marcus Weseloh
|
||||||
Jean-jacques Ceresa
|
Jean-jacques Ceresa
|
||||||
|
Vladimir Davidovich
|
||||||
|
|
|
@ -187,14 +187,14 @@ new_fluid_core_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t func
|
||||||
dev->data = data;
|
dev->data = data;
|
||||||
|
|
||||||
// Open the default output unit
|
// Open the default output unit
|
||||||
ComponentDescription desc;
|
AudioComponentDescription desc;
|
||||||
desc.componentType = kAudioUnitType_Output;
|
desc.componentType = kAudioUnitType_Output;
|
||||||
desc.componentSubType = kAudioUnitSubType_HALOutput; //kAudioUnitSubType_DefaultOutput;
|
desc.componentSubType = kAudioUnitSubType_HALOutput; //kAudioUnitSubType_DefaultOutput;
|
||||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||||
desc.componentFlags = 0;
|
desc.componentFlags = 0;
|
||||||
desc.componentFlagsMask = 0;
|
desc.componentFlagsMask = 0;
|
||||||
|
|
||||||
Component comp = FindNextComponent(NULL, &desc);
|
AudioComponent comp = AudioComponentFindNext(NULL, &desc);
|
||||||
|
|
||||||
if(comp == NULL)
|
if(comp == NULL)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ new_fluid_core_audio_driver2(fluid_settings_t *settings, fluid_audio_func_t func
|
||||||
goto error_recovery;
|
goto error_recovery;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = OpenAComponent(comp, &dev->outputUnit);
|
status = AudioComponentInstanceNew(comp, &dev->outputUnit);
|
||||||
|
|
||||||
if(status != noErr)
|
if(status != noErr)
|
||||||
{
|
{
|
||||||
|
@ -372,7 +372,7 @@ delete_fluid_core_audio_driver(fluid_audio_driver_t *p)
|
||||||
fluid_core_audio_driver_t *dev = (fluid_core_audio_driver_t *) p;
|
fluid_core_audio_driver_t *dev = (fluid_core_audio_driver_t *) p;
|
||||||
fluid_return_if_fail(dev != NULL);
|
fluid_return_if_fail(dev != NULL);
|
||||||
|
|
||||||
CloseComponent(dev->outputUnit);
|
AudioComponentInstanceDispose(dev->outputUnit);
|
||||||
|
|
||||||
if(dev->buffers[0])
|
if(dev->buffers[0])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue