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
e690d7c8
Commit
e690d7c8
authored
Oct 11, 2009
by
Ken Thomases
Committed by
Alexandre Julliard
Oct 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Add more debug logging.
parent
1b5ca01a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
audio.c
dlls/winecoreaudio.drv/audio.c
+10
-2
audiounit.c
dlls/winecoreaudio.drv/audiounit.c
+19
-0
No files found.
dlls/winecoreaudio.drv/audio.c
View file @
e690d7c8
...
...
@@ -53,12 +53,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wave
);
#if defined(HAVE_COREAUDIO_COREAUDIO_H) && defined(HAVE_AUDIOUNIT_AUDIOUNIT_H)
#include <CoreAudio/CoreAudio.h>
#include <CoreFoundation/CoreFoundation.h>
#include <libkern/OSAtomic.h>
WINE_DECLARE_DEBUG_CHANNEL
(
coreaudio
);
/*
Due to AudioUnit headers conflict define some needed types.
*/
...
...
@@ -528,6 +529,9 @@ BOOL CoreAudio_GetDevCaps (void)
CoreAudio_DefaultDevice
.
out_caps
.
wChannels
=
2
;
CoreAudio_DefaultDevice
.
out_caps
.
dwFormats
|=
WAVE_FORMAT_4S16
;
TRACE_
(
coreaudio
)(
"out dwFormats = %08x, dwSupport = %08x
\n
"
,
CoreAudio_DefaultDevice
.
out_caps
.
dwFormats
,
CoreAudio_DefaultDevice
.
out_caps
.
dwSupport
);
return
TRUE
;
}
...
...
@@ -758,6 +762,8 @@ void CoreAudio_WaveRelease(void)
*/
static
DWORD
wodNotifyClient
(
WINE_WAVEOUT
*
wwo
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE_
(
coreaudio
)(
"wMsg = 0x%04x dwParm1 = %04x dwParam2 = %04x
\n
"
,
wMsg
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
case
WOM_OPEN
:
case
WOM_CLOSE
:
...
...
@@ -767,10 +773,12 @@ static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD
(
HDRVR
)
wwo
->
waveDesc
.
hWave
,
wMsg
,
wwo
->
waveDesc
.
dwInstance
,
dwParam1
,
dwParam2
))
{
ERR
(
"can't notify client !
\n
"
);
return
MMSYSERR_ERROR
;
}
break
;
default:
ERR
(
"Unknown callback message %u
\n
"
,
wMsg
);
return
MMSYSERR_INVALPARAM
;
}
return
MMSYSERR_NOERROR
;
...
...
@@ -1214,7 +1222,7 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
LPWAVEHDR
*
wh
;
WINE_WAVEOUT
*
wwo
;
TRACE
(
"(%u, %p, %
08X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
TRACE
(
"(%u, %p, %
lu, %08X);
\n
"
,
wDevID
,
lpWaveHdr
,
(
unsigned
long
)
lpWaveHdr
->
dwBufferLength
,
dwSize
);
/* first, do the sanity checks... */
if
(
wDevID
>=
MAX_WAVEOUTDRV
)
...
...
dlls/winecoreaudio.drv/audiounit.c
View file @
e690d7c8
...
...
@@ -38,6 +38,19 @@
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
);
}
extern
OSStatus
CoreAudio_woAudioUnitIOProc
(
void
*
inRefCon
,
AudioUnitRenderActionFlags
*
ioActionFlags
,
const
AudioTimeStamp
*
inTimeStamp
,
...
...
@@ -58,6 +71,8 @@ int AudioUnit_CreateDefaultAudioUnit(void *wwo, AudioUnit *au)
Component
comp
;
ComponentDescription
desc
;
AURenderCallbackStruct
callbackStruct
;
TRACE
(
"
\n
"
);
desc
.
componentType
=
kAudioUnitType_Output
;
desc
.
componentSubType
=
kAudioUnitSubType_DefaultOutput
;
...
...
@@ -95,6 +110,8 @@ int AudioUnit_InitializeWithStreamDescription(AudioUnit au, AudioStreamBasicDesc
{
OSStatus
err
=
noErr
;
TRACE
(
"input format: %s
\n
"
,
streamDescription
(
stream
));
err
=
AudioUnitSetProperty
(
au
,
kAudioUnitProperty_StreamFormat
,
kAudioUnitScope_Input
,
0
,
stream
,
sizeof
(
*
stream
));
...
...
@@ -116,6 +133,7 @@ int AudioUnit_InitializeWithStreamDescription(AudioUnit au, AudioStreamBasicDesc
int
AudioUnit_SetVolume
(
AudioUnit
au
,
float
left
,
float
right
)
{
OSStatus
err
=
noErr
;
FIXME
(
"independent left/right volume not implemented (%f, %f)
\n
"
,
left
,
right
);
err
=
AudioUnitSetParameter
(
au
,
kHALOutputParam_Volume
,
kAudioUnitParameterFlag_Output
,
0
,
left
,
0
);
...
...
@@ -130,6 +148,7 @@ int AudioUnit_SetVolume(AudioUnit au, float left, float right)
int
AudioUnit_GetVolume
(
AudioUnit
au
,
float
*
left
,
float
*
right
)
{
OSStatus
err
=
noErr
;
FIXME
(
"independent left/right volume not implemented
\n
"
);
err
=
AudioUnitGetParameter
(
au
,
kHALOutputParam_Volume
,
kAudioUnitParameterFlag_Output
,
0
,
left
);
if
(
err
!=
noErr
)
...
...
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