Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b149d7bc
Commit
b149d7bc
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: Fix deprecation warnings in audiounit.c.
parent
459d9427
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
9 deletions
+53
-9
configure
configure
+14
-0
configure.ac
configure.ac
+5
-0
audiounit.c
dlls/winecoreaudio.drv/audiounit.c
+31
-9
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
b149d7bc
...
...
@@ -6535,6 +6535,20 @@ fi
COREAUDIO
=
"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI"
fi
ac_save_LIBS
=
"
$LIBS
"
LIBS
=
"
$LIBS
$COREAUDIO
"
for
ac_func
in
AUGraphAddNode
do
:
ac_fn_c_check_func
"
$LINENO
"
"AUGraphAddNode"
"ac_cv_func_AUGraphAddNode"
if
test
"x
$ac_cv_func_AUGraphAddNode
"
=
x
""
yes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_AUGRAPHADDNODE 1
_ACEOF
fi
done
LIBS
=
"
$ac_save_LIBS
"
fi
if
test
"
$ac_cv_header_OpenAL_al_h
"
=
"yes"
then
...
...
configure.ac
View file @
b149d7bc
...
...
@@ -719,6 +719,11 @@ case $host_os in
dnl CoreServices needed by AudioUnit
AC_SUBST(COREAUDIO,"-framework CoreAudio -framework AudioUnit -framework CoreServices -framework AudioToolbox -framework CoreMIDI")
fi
dnl Check for the AUGraphAddNode function
ac_save_LIBS="$LIBS"
LIBS="$LIBS $COREAUDIO"
AC_CHECK_FUNCS(AUGraphAddNode)
LIBS="$ac_save_LIBS"
fi
if test "$ac_cv_header_OpenAL_al_h" = "yes"
then
...
...
dlls/winecoreaudio.drv/audiounit.c
View file @
b149d7bc
...
...
@@ -59,6 +59,18 @@ static inline OSStatus AudioComponentInstanceDispose(AudioComponentInstance aci)
}
#endif
#ifndef HAVE_AUGRAPHADDNODE
static
inline
OSStatus
AUGraphAddNode
(
AUGraph
graph
,
const
AudioComponentDescription
*
desc
,
AUNode
*
node
)
{
return
AUGraphNewNode
(
graph
,
desc
,
0
,
NULL
,
node
);
}
static
inline
OSStatus
AUGraphNodeInfo
(
AUGraph
graph
,
AUNode
node
,
AudioComponentDescription
*
desc
,
AudioUnit
*
au
)
{
return
AUGraphGetNodeInfo
(
graph
,
node
,
desc
,
0
,
NULL
,
au
);
}
#endif
WINE_DEFAULT_DEBUG_CHANNEL
(
wave
);
WINE_DECLARE_DEBUG_CHANNEL
(
midi
);
...
...
@@ -194,11 +206,15 @@ int AudioUnit_GetInputDeviceSampleRate(void)
{
AudioDeviceID
defaultInputDevice
;
UInt32
param
;
AudioObjectPropertyAddress
propertyAddress
;
Float64
sampleRate
;
OSStatus
err
;
param
=
sizeof
(
defaultInputDevice
);
err
=
AudioHardwareGetProperty
(
kAudioHardwarePropertyDefaultInputDevice
,
&
param
,
&
defaultInputDevice
);
propertyAddress
.
mSelector
=
kAudioHardwarePropertyDefaultInputDevice
;
propertyAddress
.
mScope
=
kAudioObjectPropertyScopeGlobal
;
propertyAddress
.
mElement
=
kAudioObjectPropertyElementMaster
;
err
=
AudioObjectGetPropertyData
(
kAudioObjectSystemObject
,
&
propertyAddress
,
0
,
NULL
,
&
param
,
&
defaultInputDevice
);
if
(
err
!=
noErr
||
defaultInputDevice
==
kAudioDeviceUnknown
)
{
ERR
(
"Couldn't get the default audio input device ID: %08lx
\n
"
,
err
);
...
...
@@ -206,7 +222,9 @@ int AudioUnit_GetInputDeviceSampleRate(void)
}
param
=
sizeof
(
sampleRate
);
err
=
AudioDeviceGetProperty
(
defaultInputDevice
,
0
,
1
,
kAudioDevicePropertyNominalSampleRate
,
&
param
,
&
sampleRate
);
propertyAddress
.
mSelector
=
kAudioDevicePropertyNominalSampleRate
;
propertyAddress
.
mScope
=
kAudioDevicePropertyScopeInput
;
err
=
AudioObjectGetPropertyData
(
defaultInputDevice
,
&
propertyAddress
,
0
,
NULL
,
&
param
,
&
sampleRate
);
if
(
err
!=
noErr
)
{
ERR
(
"Couldn't get the device sample rate: %08lx
\n
"
,
err
);
...
...
@@ -226,6 +244,7 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
AudioComponent
component
;
AudioUnit
au
;
UInt32
param
;
AudioObjectPropertyAddress
propertyAddress
;
AURenderCallbackStruct
callback
;
AudioDeviceID
defaultInputDevice
;
AudioStreamBasicDescription
desiredFormat
;
...
...
@@ -291,7 +310,10 @@ int AudioUnit_CreateInputUnit(void* wwi, AudioUnit* out_au,
/* Find the default input device */
param
=
sizeof
(
defaultInputDevice
);
err
=
AudioHardwareGetProperty
(
kAudioHardwarePropertyDefaultInputDevice
,
&
param
,
&
defaultInputDevice
);
propertyAddress
.
mSelector
=
kAudioHardwarePropertyDefaultInputDevice
;
propertyAddress
.
mScope
=
kAudioObjectPropertyScopeGlobal
;
propertyAddress
.
mElement
=
kAudioObjectPropertyElementMaster
;
err
=
AudioObjectGetPropertyData
(
kAudioObjectSystemObject
,
&
propertyAddress
,
0
,
NULL
,
&
param
,
&
defaultInputDevice
);
if
(
err
!=
noErr
||
defaultInputDevice
==
kAudioDeviceUnknown
)
{
ERR
(
"Couldn't get the default audio device ID: %08lx
\n
"
,
err
);
...
...
@@ -396,10 +418,10 @@ int SynthUnit_CreateDefaultSynthUnit(AUGraph *graph, AudioUnit *synth)
desc
.
componentType
=
kAudioUnitType_MusicDevice
;
desc
.
componentSubType
=
kAudioUnitSubType_DLSSynth
;
err
=
AUGraph
NewNode
(
*
graph
,
&
desc
,
0
,
NULL
,
&
synthNode
);
err
=
AUGraph
AddNode
(
*
graph
,
&
desc
,
&
synthNode
);
if
(
err
!=
noErr
)
{
ERR_
(
midi
)(
"AUGraph
New
Node cannot create synthNode : %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
ERR_
(
midi
)(
"AUGraph
Add
Node cannot create synthNode : %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
return
0
;
}
...
...
@@ -407,10 +429,10 @@ int SynthUnit_CreateDefaultSynthUnit(AUGraph *graph, AudioUnit *synth)
desc
.
componentType
=
kAudioUnitType_Output
;
desc
.
componentSubType
=
kAudioUnitSubType_DefaultOutput
;
err
=
AUGraph
NewNode
(
*
graph
,
&
desc
,
0
,
NULL
,
&
outNode
);
err
=
AUGraph
AddNode
(
*
graph
,
&
desc
,
&
outNode
);
if
(
err
!=
noErr
)
{
ERR_
(
midi
)(
"AUGraph
New
Node cannot create outNode %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
ERR_
(
midi
)(
"AUGraph
Add
Node cannot create outNode %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
return
0
;
}
...
...
@@ -430,10 +452,10 @@ int SynthUnit_CreateDefaultSynthUnit(AUGraph *graph, AudioUnit *synth)
}
/* Get the synth unit */
err
=
AUGraph
GetNodeInfo
(
*
graph
,
synthNode
,
0
,
0
,
0
,
synth
);
err
=
AUGraph
NodeInfo
(
*
graph
,
synthNode
,
0
,
synth
);
if
(
err
!=
noErr
)
{
ERR_
(
midi
)(
"AUGraph
Get
NodeInfo return %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
ERR_
(
midi
)(
"AUGraphNodeInfo return %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
return
0
;
}
...
...
include/config.h.in
View file @
b149d7bc
...
...
@@ -52,6 +52,9 @@
/* Define to 1 if you have the <audio/soundlib.h> header file. */
#undef HAVE_AUDIO_SOUNDLIB_H
/* Define to 1 if you have the `AUGraphAddNode' function. */
#undef HAVE_AUGRAPHADDNODE
/* Define to 1 if you have the <capi20.h> header file. */
#undef HAVE_CAPI20_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