Skip to content

Commit 65b3b11

Browse files
committed
wasapi: Fix log format warnings.
1 parent 7687783 commit 65b3b11

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/cubeb_wasapi.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ class wasapi_endpoint_notification_client : public IMMNotificationClient {
765765
LPCWSTR device_id)
766766
{
767767
LOG("endpoint: Audio device default changed flow=%d role=%d "
768-
"new_device_id=%ws.",
768+
"new_device_id=%S.",
769769
flow, role, device_id);
770770

771771
/* we only support a single stream type for now. */
@@ -776,7 +776,7 @@ class wasapi_endpoint_notification_client : public IMMNotificationClient {
776776
DWORD last_change_ms = timeGetTime() - last_device_change;
777777
bool same_device = default_device_id && device_id &&
778778
wcscmp(default_device_id.get(), device_id) == 0;
779-
LOG("endpoint: Audio device default changed last_change=%u same_device=%d",
779+
LOG("endpoint: Audio device default changed last_change=%lu same_device=%d",
780780
last_change_ms, same_device);
781781
if (last_change_ms > DEVICE_CHANGE_DEBOUNCE_MS || !same_device) {
782782
if (device_id) {
@@ -968,7 +968,7 @@ refill(cubeb_stream * stm, void * input_buffer, long input_frames_count,
968968
cubeb_resampler_fill(stm->resampler.get(), input_buffer,
969969
&input_frames_count, dest, output_frames_needed);
970970
if (out_frames < 0) {
971-
ALOGV("Callback refill error: %d", out_frames);
971+
ALOGV("Callback refill error: %ld", out_frames);
972972
wasapi_state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
973973
return out_frames;
974974
}
@@ -1281,9 +1281,11 @@ refill_callback_duplex(cubeb_stream * stm)
12811281

12821282
stm->total_output_frames += output_frames;
12831283

1284-
ALOGV("in: %zu, out: %zu, missing: %ld, ratio: %f", stm->total_input_frames,
1285-
stm->total_output_frames,
1286-
static_cast<long>(stm->total_output_frames) - stm->total_input_frames,
1284+
ALOGV("in: %llu, out: %llu, missing: %ld, ratio: %f",
1285+
(unsigned long long)stm->total_input_frames,
1286+
(unsigned long long)stm->total_output_frames,
1287+
static_cast<long long>(stm->total_output_frames) -
1288+
static_cast<long long>(stm->total_input_frames),
12871289
static_cast<float>(stm->total_output_frames) / stm->total_input_frames);
12881290

12891291
long got;
@@ -1396,7 +1398,8 @@ refill_callback_output(cubeb_stream * stm)
13961398
void
13971399
wasapi_stream_destroy(cubeb_stream * stm);
13981400

1399-
static unsigned int __stdcall wasapi_stream_render_loop(LPVOID stream)
1401+
static unsigned int __stdcall
1402+
wasapi_stream_render_loop(LPVOID stream)
14001403
{
14011404
AutoRegisterThread raii("cubeb rendering thread");
14021405
cubeb_stream * stm = static_cast<cubeb_stream *>(stream);
@@ -2936,7 +2939,7 @@ wasapi_stream_add_ref(cubeb_stream * stm)
29362939
{
29372940
XASSERT(stm);
29382941
LONG result = InterlockedIncrement(&stm->ref_count);
2939-
LOGV("Stream ref count incremented = %i (%p)", result, stm);
2942+
LOGV("Stream ref count incremented = %ld (%p)", result, stm);
29402943
return result;
29412944
}
29422945

@@ -2946,7 +2949,7 @@ wasapi_stream_release(cubeb_stream * stm)
29462949
XASSERT(stm);
29472950

29482951
LONG result = InterlockedDecrement(&stm->ref_count);
2949-
LOGV("Stream ref count decremented = %i (%p)", result, stm);
2952+
LOGV("Stream ref count decremented = %ld (%p)", result, stm);
29502953
if (result == 0) {
29512954
LOG("Stream ref count hit zero, destroying (%p)", stm);
29522955

0 commit comments

Comments
 (0)