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
d3488325
Commit
d3488325
authored
Jan 15, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Jan 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Remove some no-longer-used code.
parent
f4b41eeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
94 deletions
+1
-94
audiounit.c
dlls/winecoreaudio.drv/audiounit.c
+1
-94
No files found.
dlls/winecoreaudio.drv/audiounit.c
View file @
d3488325
...
...
@@ -36,25 +36,8 @@
#include "wine/debug.h"
#ifndef HAVE_AUDIOUNIT_AUDIOCOMPONENT_H
/* Define new AudioComponent Manager functions for compatibility's sake */
typedef
Component
AudioComponent
;
/* Define new AudioComponent Manager types for compatibility's sake */
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
#ifndef HAVE_AUGRAPHADDNODE
...
...
@@ -72,49 +55,6 @@ static inline OSStatus AUGraphNodeInfo(AUGraph graph, AUNode node, AudioComponen
WINE_DEFAULT_DEBUG_CHANNEL
(
wave
);
WINE_DECLARE_DEBUG_CHANNEL
(
midi
);
static
const
char
*
streamDescription
(
const
AudioStreamBasicDescription
*
stream
)
{
return
wine_dbg_sprintf
(
"
\n
mSampleRate : %f
\n
mFormatID : %s
\n
mFormatFlags : %lX
\n
mBytesPerPacket : %lu
\n
mFramesPerPacket : %lu
\n
mBytesPerFrame : %lu
\n
mChannelsPerFrame : %lu
\n
mBitsPerChannel : %lu
\n
"
,
stream
->
mSampleRate
,
wine_dbgstr_fourcc
(
stream
->
mFormatID
),
stream
->
mFormatFlags
,
stream
->
mBytesPerPacket
,
stream
->
mFramesPerPacket
,
stream
->
mBytesPerFrame
,
stream
->
mChannelsPerFrame
,
stream
->
mBitsPerChannel
);
}
int
AudioUnit_CloseAudioUnit
(
AudioUnit
au
)
{
OSStatus
err
=
AudioComponentInstanceDispose
(
au
);
return
(
err
==
noErr
);
}
int
AudioUnit_InitializeWithStreamDescription
(
AudioUnit
au
,
AudioStreamBasicDescription
*
stream
)
{
OSStatus
err
=
noErr
;
TRACE
(
"input format: %s
\n
"
,
streamDescription
(
stream
));
err
=
AudioUnitSetProperty
(
au
,
kAudioUnitProperty_StreamFormat
,
kAudioUnitScope_Input
,
0
,
stream
,
sizeof
(
*
stream
));
if
(
err
!=
noErr
)
{
ERR
(
"AudioUnitSetProperty return an error %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
return
0
;
}
err
=
AudioUnitInitialize
(
au
);
if
(
err
!=
noErr
)
{
ERR
(
"AudioUnitInitialize return an error %s
\n
"
,
wine_dbgstr_fourcc
(
err
));
return
0
;
}
return
1
;
}
int
AudioUnit_SetVolume
(
AudioUnit
au
,
float
left
,
float
right
)
{
OSStatus
err
=
noErr
;
...
...
@@ -150,39 +90,6 @@ int AudioUnit_GetVolume(AudioUnit au, float *left, float *right)
}
/* FIXME: implement sample rate conversion on input */
int
AudioUnit_GetInputDeviceSampleRate
(
void
)
{
AudioDeviceID
defaultInputDevice
;
UInt32
param
;
AudioObjectPropertyAddress
propertyAddress
;
Float64
sampleRate
;
OSStatus
err
;
param
=
sizeof
(
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
);
return
0
;
}
param
=
sizeof
(
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
);
return
0
;
}
return
sampleRate
;
}
/*
* MIDI Synth Unit
*/
...
...
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