]> Repos - portaudio/commitdiff
formatting and #ifdef comment
authorJohn Melas <john@jmelas.gr>
Fri, 27 Nov 2020 07:09:00 +0000 (09:09 +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
src/hostapi/coreaudio/pa_mac_core_utilities.h

index 155c6ba1195f82d0bda7a69139cfef638d457b05..21bd788c3711e1a2c1cd93f31d3f66b9cc13981f 100644 (file)
@@ -1083,7 +1083,8 @@ static OSStatus AudioDevicePropertyActualSampleRateListenerProc( AudioDeviceID i
     }
     return osErr;
 }
-#endif
+#endif /* PA_NEW_HAL */
+
 /* ================================================================================= */
 static OSStatus QueryUInt32DeviceProperty( AudioDeviceID deviceID, Boolean isInput, AudioDevicePropertyID propertyID, UInt32 *outValue )
 {
@@ -1169,7 +1170,7 @@ static OSStatus AudioDevicePropertyGenericListenerProc( AudioDeviceID inDevice,
     }
     return osErr;
 }
-#endif
+#endif /* PA_NEW_HAL */
 
 /* ================================================================================= */
 /*
@@ -2244,7 +2245,7 @@ static OSStatus ringBufferIOProc( AudioConverterRef inAudioConverter,
 
    return noErr;
 }
-#endif
+#endif /* PA_NEW_HAL */
 
 /*
  * Called by the AudioUnit API to process audio from the sound card.
@@ -2486,7 +2487,7 @@ static OSStatus AudioIOProc( void *inRefCon,
                              &stream->inputRingBuffer,
                              &size,
                              (void *)&data );
-#endif
+#endif /* PA_NEW_HAL */
                if( err == RING_BUFFER_EMPTY )
                { /* the ring buffer callback underflowed */
                   err = 0;
@@ -2686,7 +2687,7 @@ static OSStatus AudioIOProc( void *inRefCon,
                           &stream->inputRingBuffer,
                           &size,
                           (void *)data );
-#endif
+#endif /* PA_NEW_HAL */
             if( err != RING_BUFFER_EMPTY )
                ERR( err );
             if( err != noErr && err != RING_BUFFER_EMPTY )
index 2e859076005800a4bc9868d815e4ddbe05007381..711d5cae10ab0175956cffca1605f7dcfa9a95b8 100644 (file)
@@ -73,7 +73,7 @@ OSStatus pa_AudioHardwareGetProperty(
     return AudioObjectGetPropertyData(kAudioObjectSystemObject, &address, 0, NULL, ioPropertyDataSize, outPropertyData);
 #else
     return AudioHardwareGetProperty(inPropertyID, ioPropertyDataSize, outPropertyData);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioHardwareGetPropertySize(
@@ -85,7 +85,7 @@ OSStatus pa_AudioHardwareGetPropertySize(
     return AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &address, 0, NULL, outSize);
 #else
     return AudioHardwareGetPropertyInfo(inPropertyID, outSize, NULL);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioDeviceGetProperty(
@@ -102,7 +102,7 @@ OSStatus pa_AudioDeviceGetProperty(
    return AudioObjectGetPropertyData(inDevice, &address, 0, NULL, ioPropertyDataSize, outPropertyData);
 #else
     return AudioDeviceGetProperty(inDevice, inChannel, isInput, inPropertyID, ioPropertyDataSize, outPropertyData);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioDeviceSetProperty(
@@ -120,7 +120,7 @@ OSStatus pa_AudioDeviceSetProperty(
     return AudioObjectSetPropertyData(inDevice, &address, 0, NULL, inPropertyDataSize, inPropertyData);
 #else
     return AudioDeviceSetProperty(inDevice, inWhen, inChannel, isInput, inPropertyID, inPropertyDataSize, inPropertyData);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioDeviceGetPropertySize(
@@ -136,7 +136,7 @@ OSStatus pa_AudioDeviceGetPropertySize(
     return AudioObjectGetPropertyDataSize(inDevice, &address, 0, NULL, outSize);
 #else
     return AudioDeviceGetPropertyInfo(inDevice, inChannel, isInput, inPropertyID, outSize, NULL);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioDeviceAddPropertyListener(
@@ -153,7 +153,7 @@ OSStatus pa_AudioDeviceAddPropertyListener(
     return AudioObjectAddPropertyListener(inDevice, &address, inProc, inClientData);
 #else
     return AudioDeviceAddPropertyListener(inDevice, inChannel, isInput, inPropertyID, inProc, inClientData);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioDeviceRemovePropertyListener(
@@ -170,7 +170,7 @@ OSStatus pa_AudioDeviceRemovePropertyListener(
     return AudioObjectRemovePropertyListener(inDevice, &address, inProc, inClientData);
 #else
     return AudioDeviceRemovePropertyListener(inDevice, inChannel, isInput, inPropertyID, inProc);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 OSStatus pa_AudioStreamGetProperty(
@@ -185,7 +185,7 @@ OSStatus pa_AudioStreamGetProperty(
     return AudioObjectGetPropertyData(inStream, &address, 0, NULL, ioPropertyDataSize, outPropertyData);
 #else
     return AudioStreamGetProperty(inStream, inChannel, inPropertyID, ioPropertyDataSize, outPropertyData);
-#endif
+#endif /* PA_NEW_HAL */
 }
 
 PaError PaMacCore_SetUnixError( int err, int line )
@@ -455,7 +455,7 @@ OSStatus propertyProc(
    // this is where we would set the condition variable
    return noErr;
 }
-#endif
+#endif /* PA_NEW_HAL */
 
 /* sets the value of the given property and waits for the change to 
    be acknowledged, and returns the final value, which is not guaranteed
@@ -815,7 +815,7 @@ OSStatus xrunCallback(
 
    return 0;
 }
-#endif
+#endif /* PA_NEW_HAL */
 
 int initializeXRunListenerList( void )
 {
index e6e0c6e87dd70a27a6ffae6d11e06293f4c89a11..8888a36e3c9073b48ef96f00fa9bf43f85dc5b52 100644 (file)
 typedef AudioObjectPropertyListenerProc pa_AudioDevicePropertyListenerProc;
 #else
 typedef AudioDevicePropertyListenerProc pa_AudioDevicePropertyListenerProc;
-#endif
+#endif /* PA_NEW_HAL */
 
 OSStatus pa_AudioHardwareGetProperty(
     AudioHardwarePropertyID inPropertyID,
     UInt32*                 ioPropertyDataSize,
     void*                   outPropertyData);
+
 OSStatus pa_AudioHardwareGetPropertySize(
     AudioHardwarePropertyID inPropertyID,
     UInt32*                 outSize);
+
 OSStatus pa_AudioDeviceGetProperty(
     AudioDeviceID         inDevice,
     UInt32                inChannel,
@@ -137,6 +139,7 @@ OSStatus pa_AudioDeviceGetProperty(
     AudioDevicePropertyID inPropertyID,
     UInt32*               ioPropertyDataSize,
     void*                 outPropertyData);
+
 OSStatus pa_AudioDeviceSetProperty(
     AudioDeviceID         inDevice,
     const AudioTimeStamp* inWhen,
@@ -145,12 +148,14 @@ OSStatus pa_AudioDeviceSetProperty(
     AudioDevicePropertyID inPropertyID,
     UInt32                inPropertyDataSize,
     const void*           inPropertyData);
+
 OSStatus pa_AudioDeviceGetPropertySize(
     AudioDeviceID         inDevice,
     UInt32                inChannel,
     Boolean               isInput,
     AudioDevicePropertyID inPropertyID,
     UInt32*               outSize);
+
 OSStatus pa_AudioDeviceAddPropertyListener(
     AudioDeviceID                      inDevice,
     UInt32                             inChannel,
@@ -158,6 +163,7 @@ OSStatus pa_AudioDeviceAddPropertyListener(
     AudioDevicePropertyID              inPropertyID,
     pa_AudioDevicePropertyListenerProc inProc,
     void*                              inClientData);
+
 OSStatus pa_AudioDeviceRemovePropertyListener(
     AudioDeviceID                      inDevice,
     UInt32                             inChannel,
@@ -165,6 +171,7 @@ OSStatus pa_AudioDeviceRemovePropertyListener(
     AudioDevicePropertyID              inPropertyID,
     pa_AudioDevicePropertyListenerProc inProc,
     void*                              inClientData);
+
 OSStatus pa_AudioStreamGetProperty(
     AudioStreamID         inStream,
     UInt32                inChannel,
@@ -213,7 +220,7 @@ OSStatus propertyProc(
     Boolean isInput, 
     AudioDevicePropertyID inPropertyID, 
     void* inClientData );
-#endif
+#endif /* PA_NEW_HAL */
 
 /* sets the value of the given property and waits for the change to 
    be acknowledged, and returns the final value, which is not guaranteed
@@ -276,7 +283,7 @@ OSStatus xrunCallback(
     Boolean isInput, 
     AudioDevicePropertyID inPropertyID, 
     void* inClientData ) ;
-#endif
+#endif /* PA_NEW_HAL */
 
 /** returns zero on success or a unix style error code. */
 int initializeXRunListenerList( void );