winecoreaudio: Don't use Component Manager on Mac OS 10.6.
This commit is contained in:
parent
1f0e9499e5
commit
459d9427a8
|
@ -5764,6 +5764,7 @@ for ac_header in \
|
||||||
ApplicationServices/ApplicationServices.h \
|
ApplicationServices/ApplicationServices.h \
|
||||||
AudioToolbox/AudioConverter.h \
|
AudioToolbox/AudioConverter.h \
|
||||||
AudioUnit/AudioUnit.h \
|
AudioUnit/AudioUnit.h \
|
||||||
|
AudioUnit/AudioComponent.h \
|
||||||
CL/cl.h \
|
CL/cl.h \
|
||||||
Carbon/Carbon.h \
|
Carbon/Carbon.h \
|
||||||
CoreAudio/CoreAudio.h \
|
CoreAudio/CoreAudio.h \
|
||||||
|
@ -6526,8 +6527,14 @@ fi
|
||||||
fi
|
fi
|
||||||
if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
|
if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
|
||||||
then
|
then
|
||||||
COREAUDIO="-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI"
|
if test "$ac_cv_header_AudioUnit_AudioComponent_h" = "yes"
|
||||||
|
then
|
||||||
|
COREAUDIO="-framework CoreFoundation -framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreMIDI"
|
||||||
|
|
||||||
|
else
|
||||||
|
COREAUDIO="-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI"
|
||||||
|
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$ac_cv_header_OpenAL_al_h" = "yes"
|
if test "$ac_cv_header_OpenAL_al_h" = "yes"
|
||||||
then
|
then
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -371,6 +371,7 @@ AC_CHECK_HEADERS(\
|
||||||
ApplicationServices/ApplicationServices.h \
|
ApplicationServices/ApplicationServices.h \
|
||||||
AudioToolbox/AudioConverter.h \
|
AudioToolbox/AudioConverter.h \
|
||||||
AudioUnit/AudioUnit.h \
|
AudioUnit/AudioUnit.h \
|
||||||
|
AudioUnit/AudioComponent.h \
|
||||||
CL/cl.h \
|
CL/cl.h \
|
||||||
Carbon/Carbon.h \
|
Carbon/Carbon.h \
|
||||||
CoreAudio/CoreAudio.h \
|
CoreAudio/CoreAudio.h \
|
||||||
|
@ -711,8 +712,13 @@ case $host_os in
|
||||||
fi
|
fi
|
||||||
if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
|
if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
|
||||||
then
|
then
|
||||||
dnl CoreServices needed by AudioUnit
|
if test "$ac_cv_header_AudioUnit_AudioComponent_h" = "yes"
|
||||||
AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI")
|
then
|
||||||
|
AC_SUBST(COREAUDIO,"-framework CoreFoundation -framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreMIDI")
|
||||||
|
else
|
||||||
|
dnl CoreServices needed by AudioUnit
|
||||||
|
AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$ac_cv_header_OpenAL_al_h" = "yes"
|
if test "$ac_cv_header_OpenAL_al_h" = "yes"
|
||||||
then
|
then
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
|
|
||||||
#define ULONG CoreFoundation_ULONG
|
#define ULONG CoreFoundation_ULONG
|
||||||
#define HRESULT CoreFoundation_HRESULT
|
#define HRESULT CoreFoundation_HRESULT
|
||||||
|
#ifndef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
|
#endif
|
||||||
#include <AudioUnit/AudioUnit.h>
|
#include <AudioUnit/AudioUnit.h>
|
||||||
#include <AudioToolbox/AudioToolbox.h>
|
#include <AudioToolbox/AudioToolbox.h>
|
||||||
#undef ULONG
|
#undef ULONG
|
||||||
|
@ -35,6 +37,28 @@
|
||||||
#include "coreaudio.h"
|
#include "coreaudio.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
|
||||||
|
/* Define new AudioComponent Manager functions for compatibility's sake */
|
||||||
|
typedef Component AudioComponent;
|
||||||
|
typedef ComponentDescription AudioComponentDescription;
|
||||||
|
typedef ComponentInstance AudioComponentInstance;
|
||||||
|
|
||||||
|
static inline AudioComponent AudioComponentFindNext(AudioComponent ac, AudioComponentDescription *desc)
|
||||||
|
{
|
||||||
|
return FindNextComponent(ac, desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline OSStatus AudioComponentInstanceNew(AudioComponent ac, AudioComponentInstance *aci)
|
||||||
|
{
|
||||||
|
return OpenAComponent(ac, aci);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline OSStatus AudioComponentInstanceDispose(AudioComponentInstance aci)
|
||||||
|
{
|
||||||
|
return CloseComponent(aci);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
||||||
WINE_DECLARE_DEBUG_CHANNEL(midi);
|
WINE_DECLARE_DEBUG_CHANNEL(midi);
|
||||||
|
|
||||||
|
@ -68,8 +92,8 @@ extern OSStatus CoreAudio_wiAudioUnitIOProc(void *inRefCon,
|
||||||
int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
|
int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
|
||||||
{
|
{
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
Component comp;
|
AudioComponent comp;
|
||||||
ComponentDescription desc;
|
AudioComponentDescription desc;
|
||||||
AURenderCallbackStruct callbackStruct;
|
AURenderCallbackStruct callbackStruct;
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
@ -80,11 +104,11 @@ int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
|
||||||
desc.componentFlags = 0;
|
desc.componentFlags = 0;
|
||||||
desc.componentFlagsMask = 0;
|
desc.componentFlagsMask = 0;
|
||||||
|
|
||||||
comp = FindNextComponent(NULL, &desc);
|
comp = AudioComponentFindNext(NULL, &desc);
|
||||||
if (comp == NULL)
|
if (comp == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err = OpenAComponent(comp, au);
|
err = AudioComponentInstanceNew(comp, au);
|
||||||
if (err != noErr || *au == NULL)
|
if (err != noErr || *au == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -102,7 +126,7 @@ int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
|
||||||
|
|
||||||
int AudioUnit_CloseAudioUnit(AudioUnit au)
|
int AudioUnit_CloseAudioUnit(AudioUnit au)
|
||||||
{
|
{
|
||||||
OSStatus err = CloseComponent(au);
|
OSStatus err = AudioComponentInstanceDispose(au);
|
||||||
return (err == noErr);
|
return (err == noErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,8 +222,8 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
|
||||||
UInt32* outFrameCount)
|
UInt32* outFrameCount)
|
||||||
{
|
{
|
||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
ComponentDescription description;
|
AudioComponentDescription description;
|
||||||
Component component;
|
AudioComponent component;
|
||||||
AudioUnit au;
|
AudioUnit au;
|
||||||
UInt32 param;
|
UInt32 param;
|
||||||
AURenderCallbackStruct callback;
|
AURenderCallbackStruct callback;
|
||||||
|
@ -220,17 +244,17 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
|
||||||
description.componentFlags = 0;
|
description.componentFlags = 0;
|
||||||
description.componentFlagsMask = 0;
|
description.componentFlagsMask = 0;
|
||||||
|
|
||||||
component = FindNextComponent(NULL, &description);
|
component = AudioComponentFindNext(NULL, &description);
|
||||||
if (!component)
|
if (!component)
|
||||||
{
|
{
|
||||||
ERR("FindNextComponent(kAudioUnitSubType_HALOutput) failed\n");
|
ERR("AudioComponentFindNext(kAudioUnitSubType_HALOutput) failed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = OpenAComponent(component, &au);
|
err = AudioComponentInstanceNew(component, &au);
|
||||||
if (err != noErr || au == NULL)
|
if (err != noErr || au == NULL)
|
||||||
{
|
{
|
||||||
ERR("OpenAComponent failed: %08lx\n", err);
|
ERR("AudioComponentInstanceNew failed: %08lx\n", err);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +367,7 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (au)
|
if (au)
|
||||||
CloseComponent(au);
|
AudioComponentInstanceDispose(au);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +377,7 @@ error:
|
||||||
int SynthUnit_CreateDefaultSynthUnit(AUGraph *graph, AudioUnit *synth)
|
int SynthUnit_CreateDefaultSynthUnit(AUGraph *graph, AudioUnit *synth)
|
||||||
{
|
{
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
ComponentDescription desc;
|
AudioComponentDescription desc;
|
||||||
AUNode synthNode;
|
AUNode synthNode;
|
||||||
AUNode outNode;
|
AUNode outNode;
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
|
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
|
||||||
#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H
|
#undef HAVE_AUDIOTOOLBOX_AUDIOCONVERTER_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <AudioUnit/AudioComponent.h> header file. */
|
||||||
|
#undef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
|
/* Define to 1 if you have the <AudioUnit/AudioUnit.h> header file. */
|
||||||
#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
|
#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue