]> Repos - portaudio/commitdiff
renamed PaAsio_GetAvailableLatencyValues to PaAsio_GetAvailableBufferSizes and includ...
authorrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Mon, 2 May 2011 15:49:20 +0000 (15:49 +0000)
committerrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Mon, 2 May 2011 15:49:20 +0000 (15:49 +0000)
include/pa_asio.h
src/hostapi/asio/pa_asio.cpp

index 6199cabd3a70fe009b619b2956c4893e8e4fc8d9..9c606a9c7cead335866acf8140ec09c48baf139c 100644 (file)
@@ -52,25 +52,32 @@ extern "C"
 #endif /* __cplusplus */
 
 
-/** Retrieve legal latency settings for the specificed device, in samples.
+/** Retrieve legal native buffer sizes for the specificed device, in sample frames.
 
  @param device The global index of the device about which the query is being made.
- @param minLatency A pointer to the location which will recieve the minimum latency value.
- @param maxLatency A pointer to the location which will recieve the maximum latency value.
- @param preferredLatency A pointer to the location which will recieve the preferred latency value.
- @param granularity A pointer to the location which will recieve the granularity. This value 
- determines which values between minLatency and maxLatency are available. ie the step size,
if granularity is -1 then available latency settings are powers of two.
+ @param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
+ @param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.
+ @param preferredBufferSizeFrames A pointer to the location which will receive the preferred buffer size value.
+ @param granularity A pointer to the location which will receive the "granularity". This value determines
+ the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames.
If granularity is -1 then available buffer size values are powers of two.
 
  @see ASIOGetBufferSize in the ASIO SDK.
 
- @todo This function should be renamed to PaAsio_GetAvailableBufferSizes. 
       No reason to use a wildly different name from the ASIO version.
+ @note: this function used to be called PaAsio_GetAvailableLatencyValues. There is a
#define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.
 */
-PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
-               long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
+PaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,
+               long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity );
+
+
+/** Backwards compatibility alias for PaAsio_GetAvailableBufferSizes
+
+ @see PaAsio_GetAvailableBufferSizes
+*/
+#define PaAsio_GetAvailableLatencyValues PaAsio_GetAvailableBufferSizes
+
 
-        
 /** Display the ASIO control panel for the specified device.
 
   @param device The global index of the device whose control panel is to be displayed.
index d77c7e7391af57fe4124daa3e61a671baa1f1b56..a64109306a050fdd1def4878b94d455ecdd385bd 100644 (file)
@@ -906,8 +906,8 @@ typedef struct PaAsioDeviceInfo
 PaAsioDeviceInfo;
 
 
-PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
-        long *minLatency, long *maxLatency, long *preferredLatency, long *granularity )
+PaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,
+        long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity )
 {
     PaError result;
     PaUtilHostApiRepresentation *hostApi;
@@ -924,9 +924,9 @@ PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
             PaAsioDeviceInfo *asioDeviceInfo =
                     (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];
 
-            *minLatency = asioDeviceInfo->minBufferSize;
-            *maxLatency = asioDeviceInfo->maxBufferSize;
-            *preferredLatency = asioDeviceInfo->preferredBufferSize;
+            *minBufferSizeFrames = asioDeviceInfo->minBufferSize;
+            *maxBufferSizeFrames = asioDeviceInfo->maxBufferSize;
+            *preferredBufferSizeFrames = asioDeviceInfo->preferredBufferSize;
             *granularity = asioDeviceInfo->bufferGranularity;
         }
     }