From afc6591519f6c0a21e9d3f55c76b5f2e491bb8e9 Mon Sep 17 00:00:00 2001 From: John Melas Date: Thu, 26 Nov 2020 13:23:36 +0200 Subject: [PATCH] fix logging warnings --- src/hostapi/coreaudio/pa_mac_core.c | 16 ++++++++-------- src/hostapi/coreaudio/pa_mac_core_utilities.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hostapi/coreaudio/pa_mac_core.c b/src/hostapi/coreaudio/pa_mac_core.c index 1766734..4f66f8c 100644 --- a/src/hostapi/coreaudio/pa_mac_core.c +++ b/src/hostapi/coreaudio/pa_mac_core.c @@ -373,7 +373,7 @@ static PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi) { int i; for( i=0; idevCount; ++i ) - printf( "Device %d\t: %ld\n", i, auhalHostApi->devIds[i] ); + printf( "Device %d\t: %ld\n", i, (long)auhalHostApi->devIds[i] ); } #endif @@ -420,8 +420,8 @@ static PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi) } } - VDBUG( ( "Default in : %ld\n", auhalHostApi->defaultIn ) ); - VDBUG( ( "Default out: %ld\n", auhalHostApi->defaultOut ) ); + VDBUG( ( "Default in : %ld\n", (long)auhalHostApi->defaultIn ) ); + VDBUG( ( "Default out: %ld\n", (long)auhalHostApi->defaultOut ) ); return paNoError; } @@ -1606,15 +1606,15 @@ static PaError OpenAndSetupOneAudioUnit( if( inStreamParams && outStreamParams ) { - VDBUG( ("Opened device %ld for input and output.\n", *audioDevice ) ); + VDBUG( ("Opened device %ld for input and output.\n", (long)*audioDevice ) ); } else if( inStreamParams ) { - VDBUG( ("Opened device %ld for input.\n", *audioDevice ) ); + VDBUG( ("Opened device %ld for input.\n", (long)*audioDevice ) ); } else if( outStreamParams ) { - VDBUG( ("Opened device %ld for output.\n", *audioDevice ) ); + VDBUG( ("Opened device %ld for output.\n", (long)*audioDevice ) ); } return paNoError; #undef ERR_WRAP @@ -1676,7 +1676,7 @@ static UInt32 CalculateOptimalBufferSize( PaMacAUHAL *auhalHostApi, }else{ VDBUG( ("Block Size unspecified. Based on Latency, the user wants a Block Size near: %ld.\n", - resultBufferSizeFrames ) ); + (long)resultBufferSizeFrames ) ); } // Clip to the capabilities of the device. @@ -1691,7 +1691,7 @@ static UInt32 CalculateOptimalBufferSize( PaMacAUHAL *auhalHostApi, ClipToDeviceBufferSize( auhalHostApi->devIds[outputParameters->device], false, resultBufferSizeFrames, &resultBufferSizeFrames ); } - VDBUG(("After querying hardware, setting block size to %ld.\n", resultBufferSizeFrames)); + VDBUG(("After querying hardware, setting block size to %ld.\n", (long)resultBufferSizeFrames)); return resultBufferSizeFrames; } diff --git a/src/hostapi/coreaudio/pa_mac_core_utilities.c b/src/hostapi/coreaudio/pa_mac_core_utilities.c index c6d8605..73c7f8c 100644 --- a/src/hostapi/coreaudio/pa_mac_core_utilities.c +++ b/src/hostapi/coreaudio/pa_mac_core_utilities.c @@ -428,7 +428,7 @@ PaError setBestSampleRateForDevice( const AudioDeviceID device, int i=0; Float64 max = -1; /*the maximum rate available*/ Float64 best = -1; /*the lowest sample rate still greater than desired rate*/ - VDBUG(("Setting sample rate for device %ld to %g.\n",device,(float)desiredSrate)); + VDBUG(("Setting sample rate for device %ld to %g.\n",(long)device,(float)desiredSrate)); /* -- try setting the sample rate -- */ srate = 0; -- 2.43.0