]> Repos - portaudio/commitdiff
rename pa_linux_alsa.c local function GropeDevice() to more descriptive DetermineDevi... alsa_rename_grope_device_function
authorRoss Bencina <rossb@audiomulch.com>
Sun, 12 May 2019 12:18:05 +0000 (22:18 +1000)
committerRoss Bencina <rossb@audiomulch.com>
Mon, 13 May 2019 20:21:53 +0000 (06:21 +1000)
src/hostapi/alsa/pa_linux_alsa.c

index 584cde8901d7f16630ca1e4bc864059da0edd8f3..2e2eb8d70a6fd601d5da11ff45420d9dd9b06640 100644 (file)
@@ -825,13 +825,13 @@ static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
     PaAlsa_CloseLibrary();
 }
 
-/** Determine max channels and default latencies.
+/** Determine max channels, default latencies, default sample rate.
  *
- * This function provides functionality to grope an opened (might be opened for capture or playback) pcm device for
+ * This function provides functionality to query an opened (might be opened for capture or playback) pcm device for
  * traits like max channels, suitable default latencies and default sample rate. Upon error, max channels is set to zero,
  * and a suitable result returned. The device is closed before returning.
  */
-static PaError GropeDevice( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking,
+static PaError DetermineDeviceInfos( snd_pcm_t* pcm, int isPlug, StreamDirection mode, int openBlocking,
         PaAlsaDeviceInfo* devInfo )
 {
     PaError result = paNoError;
@@ -1166,10 +1166,10 @@ static PaError FillInDevInfo( PaAlsaHostApiRepresentation *alsaApi, HwDevInfo* d
     if( deviceHwInfo->hasCapture &&
         OpenPcm( &pcm, deviceHwInfo->alsaName, SND_PCM_STREAM_CAPTURE, blocking, 0 ) >= 0 )
     {
-        if( GropeDevice( pcm, deviceHwInfo->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError )
+        if( DetermineDeviceInfos( pcm, deviceHwInfo->isPlug, StreamDirection_In, blocking, devInfo ) != paNoError )
         {
             /* Error */
-            PA_DEBUG(( "%s: Failed groping %s for capture\n", __FUNCTION__, deviceHwInfo->alsaName ));
+            PA_DEBUG(( "%s: Failed querying %s for capture device info\n", __FUNCTION__, deviceHwInfo->alsaName ));
             goto end;
         }
     }
@@ -1178,10 +1178,10 @@ static PaError FillInDevInfo( PaAlsaHostApiRepresentation *alsaApi, HwDevInfo* d
     if( deviceHwInfo->hasPlayback &&
         OpenPcm( &pcm, deviceHwInfo->alsaName, SND_PCM_STREAM_PLAYBACK, blocking, 0 ) >= 0 )
     {
-        if( GropeDevice( pcm, deviceHwInfo->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError )
+        if( DetermineDeviceInfos( pcm, deviceHwInfo->isPlug, StreamDirection_Out, blocking, devInfo ) != paNoError )
         {
             /* Error */
-            PA_DEBUG(( "%s: Failed groping %s for playback\n", __FUNCTION__, deviceHwInfo->alsaName ));
+            PA_DEBUG(( "%s: Failed querying %s for playback device info\n", __FUNCTION__, deviceHwInfo->alsaName ));
             goto end;
         }
     }