Commit b5224703 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

wasapi: write timings to debug log

parent 889b477b
...@@ -213,9 +213,12 @@ static HRESULT Flush(aout_stream_t *s) ...@@ -213,9 +213,12 @@ static HRESULT Flush(aout_stream_t *s)
hr = IAudioClient_Reset(sys->client); hr = IAudioClient_Reset(sys->client);
if (FAILED(hr)) if (FAILED(hr))
msg_Warn(s, "cannot reset stream (error 0x%lx)", hr); {
else msg_Dbg(s, "reset");
sys->written = 0; sys->written = 0;
}
else
msg_Warn(s, "cannot reset stream (error 0x%lx)", hr);
return hr; return hr;
} }
...@@ -380,6 +383,16 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict fmt, ...@@ -380,6 +383,16 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict fmt,
msg_Err(s, "cannot get buffer size (error 0x%lx)", hr); msg_Err(s, "cannot get buffer size (error 0x%lx)", hr);
goto error; goto error;
} }
msg_Dbg(s, "buffer size : %"PRIu32" frames", sys->frames);
REFERENCE_TIME latT, defT, minT;
if (SUCCEEDED(IAudioClient_GetStreamLatency(sys->client, &latT))
&& SUCCEEDED(IAudioClient_GetDevicePeriod(sys->client, &defT, &minT)))
{
msg_Dbg(s, "maximum latency: %"PRIu64"00 ns", latT);
msg_Dbg(s, "default period : %"PRIu64"00 ns", defT);
msg_Dbg(s, "minimum period : %"PRIu64"00 ns", minT);
}
sys->rate = fmt->i_rate; sys->rate = fmt->i_rate;
sys->bytes_per_frame = fmt->i_bytes_per_frame; sys->bytes_per_frame = fmt->i_bytes_per_frame;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment