On Sat, Dec 29, 2012 at 01:24:03AM +0100, Maarten Lankhorst wrote:
- if(!maxq){
/* nothing to do! */
LeaveCriticalSection(&device->mixlock);
}return;
This was removed in 8ba4090fc304993. It breaks starting the device in some situations (write primary mode iirc).
if (native) {
void *buffer = NULL;
hr = IAudioRenderClient_GetBuffer(device->render, maxq / block, (void*)&buffer);
if(FAILED(hr)){
WARN("GetBuffer failed: %08x\n", hr);
LeaveCriticalSection(&device->mixlock);
return;
}
I think this (mixing directly to RenderClient and skipping WaveQueue) could be split into a separate patch.
hres = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST |
AUDCLNT_STREAMFLAGS_EVENTCALLBACK, prebuf_rt, 0, device->pwfx, NULL);
AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 800000, 0, device->pwfx, NULL);
...
frames = (UINT64)device->pwfx->nSamplesPerSec * 800000 / 10000000;
Could you #define the 800000?
Anyway, I gave it a test on ALSA+Pulse and didn't find any issues. I'll test the other backends when you resubmit.
Andrew