winecoreaudio: Add more debug logging.
diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c
index 0521ff0..90e3baa 100644
--- a/dlls/winecoreaudio.drv/audio.c
+++ b/dlls/winecoreaudio.drv/audio.c
@@ -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 @@
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 @@
*/
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 @@
(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 @@
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)
diff --git a/dlls/winecoreaudio.drv/audiounit.c b/dlls/winecoreaudio.drv/audiounit.c
index 998dbe7..9314ef3 100644
--- a/dlls/winecoreaudio.drv/audiounit.c
+++ b/dlls/winecoreaudio.drv/audiounit.c
@@ -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 @@
Component comp;
ComponentDescription desc;
AURenderCallbackStruct callbackStruct;
+
+ TRACE("\n");
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
@@ -95,6 +110,8 @@
{
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_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_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)