Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
459d9427
Commit
459d9427
authored
Jan 29, 2011
by
Charles Davis
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Don't use Component Manager on Mac OS 10.6.
parent
1f0e9499
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
16 deletions
+56
-16
configure
configure
+8
-1
configure.ac
configure.ac
+8
-2
audiounit.c
dlls/winecoreaudio.drv/audiounit.c
+37
-13
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
459d9427
...
...
@@ -5764,6 +5764,7 @@ for ac_header in \
ApplicationServices/ApplicationServices.h
\
AudioToolbox/AudioConverter.h
\
AudioUnit/AudioUnit.h
\
AudioUnit/AudioComponent.h
\
CL/cl.h
\
Carbon/Carbon.h
\
CoreAudio/CoreAudio.h
\
...
...
@@ -6526,8 +6527,14 @@ fi
fi
if
test
"
$ac_cv_header_CoreAudio_CoreAudio_h
"
=
"yes"
-a
"
$ac_cv_header_AudioUnit_AudioUnit_h
"
=
"yes"
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
if
test
"
$ac_cv_header_OpenAL_al_h
"
=
"yes"
then
...
...
configure.ac
View file @
459d9427
...
...
@@ -371,6 +371,7 @@ AC_CHECK_HEADERS(\
ApplicationServices/ApplicationServices.h \
AudioToolbox/AudioConverter.h \
AudioUnit/AudioUnit.h \
AudioUnit/AudioComponent.h \
CL/cl.h \
Carbon/Carbon.h \
CoreAudio/CoreAudio.h \
...
...
@@ -711,8 +712,13 @@ case $host_os in
fi
if test "$ac_cv_header_CoreAudio_CoreAudio_h" = "yes" -a "$ac_cv_header_AudioUnit_AudioUnit_h" = "yes"
then
dnl CoreServices needed by AudioUnit
AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI")
if test "$ac_cv_header_AudioUnit_AudioComponent_h" = "yes"
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
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
...
...
dlls/winecoreaudio.drv/audiounit.c
View file @
459d9427
...
...
@@ -24,7 +24,9 @@
#define ULONG CoreFoundation_ULONG
#define HRESULT CoreFoundation_HRESULT
#ifndef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
#include <CoreServices/CoreServices.h>
#endif
#include <AudioUnit/AudioUnit.h>
#include <AudioToolbox/AudioToolbox.h>
#undef ULONG
...
...
@@ -35,6 +37,28 @@
#include "coreaudio.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_DECLARE_DEBUG_CHANNEL
(
midi
);
...
...
@@ -68,8 +92,8 @@ extern OSStatus CoreAudio_wiAudioUnitIOProc(void *inRefCon,
int
AudioUnit_CreateDefaultAudioUnit
(
void
*
wwo
,
AudioUnit
*
au
)
{
OSStatus
err
;
Component
comp
;
ComponentDescription
desc
;
Audio
Component
comp
;
Audio
ComponentDescription
desc
;
AURenderCallbackStruct
callbackStruct
;
TRACE
(
"
\n
"
);
...
...
@@ -80,11 +104,11 @@ int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
desc
.
componentFlags
=
0
;
desc
.
componentFlagsMask
=
0
;
comp
=
FindNextComponen
t
(
NULL
,
&
desc
);
comp
=
AudioComponentFindNex
t
(
NULL
,
&
desc
);
if
(
comp
==
NULL
)
return
0
;
err
=
OpenAComponent
(
comp
,
au
);
err
=
AudioComponentInstanceNew
(
comp
,
au
);
if
(
err
!=
noErr
||
*
au
==
NULL
)
return
0
;
...
...
@@ -102,7 +126,7 @@ int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
int
AudioUnit_CloseAudioUnit
(
AudioUnit
au
)
{
OSStatus
err
=
CloseComponent
(
au
);
OSStatus
err
=
AudioComponentInstanceDispose
(
au
);
return
(
err
==
noErr
);
}
...
...
@@ -198,8 +222,8 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
UInt32
*
outFrameCount
)
{
OSStatus
err
=
noErr
;
ComponentDescription
description
;
Component
component
;
AudioComponentDescription
description
;
AudioComponent
component
;
AudioUnit
au
;
UInt32
param
;
AURenderCallbackStruct
callback
;
...
...
@@ -220,17 +244,17 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
description
.
componentFlags
=
0
;
description
.
componentFlagsMask
=
0
;
component
=
FindNextComponen
t
(
NULL
,
&
description
);
component
=
AudioComponentFindNex
t
(
NULL
,
&
description
);
if
(
!
component
)
{
ERR
(
"
FindNextComponen
t(kAudioUnitSubType_HALOutput) failed
\n
"
);
ERR
(
"
AudioComponentFindNex
t(kAudioUnitSubType_HALOutput) failed
\n
"
);
return
0
;
}
err
=
OpenAComponent
(
component
,
&
au
);
err
=
AudioComponentInstanceNew
(
component
,
&
au
);
if
(
err
!=
noErr
||
au
==
NULL
)
{
ERR
(
"
OpenAComponent
failed: %08lx
\n
"
,
err
);
ERR
(
"
AudioComponentInstanceNew
failed: %08lx
\n
"
,
err
);
return
0
;
}
...
...
@@ -343,7 +367,7 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
error:
if
(
au
)
CloseComponent
(
au
);
AudioComponentInstanceDispose
(
au
);
return
0
;
}
...
...
@@ -353,7 +377,7 @@ error:
int
SynthUnit_CreateDefaultSynthUnit
(
AUGraph
*
graph
,
AudioUnit
*
synth
)
{
OSStatus
err
;
ComponentDescription
desc
;
Audio
ComponentDescription
desc
;
AUNode
synthNode
;
AUNode
outNode
;
...
...
include/config.h.in
View file @
459d9427
...
...
@@ -40,6 +40,9 @@
/* Define to 1 if you have the <AudioToolbox/AudioConverter.h> header file. */
#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. */
#undef HAVE_AUDIOUNIT_AUDIOUNIT_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment