]> Repos - portaudio/commitdiff
hotplug: rename Pa_UpdateAvailableDeviceList() to Pa_RefreshDeviceList(). Clean up...
authorRoss Bencina <rossb@audiomulch.com>
Fri, 2 Sep 2016 09:27:47 +0000 (19:27 +1000)
committerRoss Bencina <rossb@audiomulch.com>
Fri, 2 Sep 2016 09:27:47 +0000 (19:27 +1000)
include/portaudio.h
src/common/pa_front.c
test/patest_refresh_device_list.c [moved from test/patest_update_available_device_list.c with 95% similarity]

index 09d6aa8d5c9ccbce01fb0fb85210ae93ce4d06ed..407feb3a8ae36251b3fc124a1f942460abca297e 100644 (file)
@@ -439,19 +439,24 @@ PaDeviceIndex Pa_GetDefaultInputDevice( void );
 */
 PaDeviceIndex Pa_GetDefaultOutputDevice( void );
 
-/** Update the list of available devices to match currently available hardware devices.
+/** Refresh the list devices to match currently available hardware devices.
 
- PortAudio's list of available devices is usually frozen at the time Pa_Initialize() is 
- called. Pa_UpdateAvailableDeviceList() may be called to refresh PortAudio's list
of available devices at any time while PortAudio is initialized.
+ PortAudio's list of devices is usually frozen when Pa_Initialize() is
+ called. Call Pa_RefreshDeviceList() to refresh PortAudio's device list
+ at any time while PortAudio is initialized.
 
- @note Open streams will not be affected by calls to this function, but
- any previously returned PaDeviceInfo pointers are invalidated once this
- function is called.
+ @return an error code indicating whether the refresh was successful.
 
- @return an error code indicating whether the device refresh was successful.
+ If the function succeeds, future calls to Pa_GetDeviceCount() may return
+ a different count than before, all device indexes may refer to
+ different devices, and any previously returned PaDeviceInfo pointers are
+ invalidated.
+
+ If the function fails, the device list is unchanged.
+
+ @note Open streams will not be affected by calls to this function.
  */
-PaError Pa_UpdateAvailableDeviceList( void );
+PaError Pa_RefreshDeviceList( void );
 
 
 /** The type used to represent monotonic time in seconds. PaTime is 
index f530bd975ee9e7f68bf20f8af658b49a2add6e18..def07e32232ab8237b8ddbefd44c7e69a3ac17d4 100644 (file)
@@ -755,7 +755,7 @@ PaDeviceIndex Pa_GetDefaultOutputDevice( void )
 }
 
 
-PaError Pa_UpdateAvailableDeviceList( void )
+PaError Pa_RefreshDeviceList( void )
 {
     PaError result     = paNoError;
     void **scanResults = NULL;
similarity index 95%
rename from test/patest_update_available_device_list.c
rename to test/patest_refresh_device_list.c
index 2c077f53ebc0b399bc2b450b5be3aa2a322c5fd3..69adae9369694aba93608f81cfb9373c8c4414fd 100644 (file)
@@ -38,7 +38,7 @@ int main(int argc, char* argv[])
         if( getchar() == 'q' )
             break;
 
-        Pa_UpdateAvailableDeviceList();
+        Pa_RefreshDeviceList();
     }
 
     Pa_Terminate();