output/wasapi: use "%lu" in log calls

"%lu" is portable - it works with both POSIX and Microsoft flavors.

Fixes a part of https://github.com/MusicPlayerDaemon/MPD/issues/1150
This commit is contained in:
Max Kellermann 2021-05-18 21:47:00 +02:00
parent 28e7be248f
commit 8efa5c7641

View File

@ -607,10 +607,10 @@ WasapiOutput::DoOpen(AudioFormat &audio_format)
throw MakeHResultError(result, "Unable to get device period"); throw MakeHResultError(result, "Unable to get device period");
} }
FormatDebug(wasapi_output_domain, FormatDebug(wasapi_output_domain,
"Default device period: %I64u ns, Minimum device period: " "Default device period: %lu ns, Minimum device period: "
"%I64u ns", "%lu ns",
ns(hundred_ns(default_device_period)).count(), (unsigned long)ns(hundred_ns(default_device_period)).count(),
ns(hundred_ns(min_device_period)).count()); (unsigned long)ns(hundred_ns(min_device_period)).count());
REFERENCE_TIME buffer_duration; REFERENCE_TIME buffer_duration;
if (Exclusive()) { if (Exclusive()) {
@ -619,8 +619,8 @@ WasapiOutput::DoOpen(AudioFormat &audio_format)
const REFERENCE_TIME align = hundred_ns(ms(50)).count(); const REFERENCE_TIME align = hundred_ns(ms(50)).count();
buffer_duration = (align / default_device_period) * default_device_period; buffer_duration = (align / default_device_period) * default_device_period;
} }
FormatDebug(wasapi_output_domain, "Buffer duration: %I64u ns", FormatDebug(wasapi_output_domain, "Buffer duration: %lu ns",
size_t(ns(hundred_ns(buffer_duration)).count())); (unsigned long)ns(hundred_ns(buffer_duration)).count());
if (Exclusive()) { if (Exclusive()) {
if (HRESULT result = client->Initialize( if (HRESULT result = client->Initialize(
@ -639,8 +639,8 @@ WasapiOutput::DoOpen(AudioFormat &audio_format)
SampleRate()); SampleRate());
FormatDebug( FormatDebug(
wasapi_output_domain, wasapi_output_domain,
"Aligned buffer duration: %I64u ns", "Aligned buffer duration: %lu ns",
size_t(ns(hundred_ns(buffer_duration)).count())); (unsigned long)ns(hundred_ns(buffer_duration)).count());
client.reset(); client.reset();
client = Activate<IAudioClient>(*device); client = Activate<IAudioClient>(*device);
result = client->Initialize( result = client->Initialize(