]> Repos - portaudio/commitdiff
fix logging warnings
authorJohn Melas <john@jmelas.gr>
Thu, 26 Nov 2020 11:23:36 +0000 (13:23 +0200)
committerPhil Burk <philburk@mobileer.com>
Thu, 21 Jan 2021 02:21:30 +0000 (18:21 -0800)
src/hostapi/coreaudio/pa_mac_core.c
src/hostapi/coreaudio/pa_mac_core_utilities.c

index 17667348ab8dab9cca5b84f074ebb8daef228563..4f66f8cc7e38da5308e6ee8b4784160a5eb7bae0 100644 (file)
@@ -373,7 +373,7 @@ static PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi)
     {
        int i;
        for( i=0; i<auhalHostApi->devCount; ++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;
 }
index c6d8605b1145ffb225c26184688a9d0882c906c1..73c7f8cd1fd7b0c4ce7f0e78ed1924f7c6997f8e 100644 (file)
@@ -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;