hotplug: rename Pa_UpdateAvailableDeviceList() to Pa_RefreshDeviceList(). Clean up doc comment for Pa_RefreshDeviceList().

This commit is contained in:
Ross Bencina 2016-09-02 19:27:47 +10:00
commit 3f7c315f22
3 changed files with 16 additions and 11 deletions

View file

@ -439,19 +439,24 @@ PaDeviceIndex Pa_GetDefaultInputDevice( void );
*/ */
PaDeviceIndex Pa_GetDefaultOutputDevice( 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 PortAudio's list of devices is usually frozen when Pa_Initialize() is
called. Pa_UpdateAvailableDeviceList() may be called to refresh PortAudio's list called. Call Pa_RefreshDeviceList() to refresh PortAudio's device list
of available devices at any time while PortAudio is initialized. at any time while PortAudio is initialized.
@note Open streams will not be affected by calls to this function, but @return an error code indicating whether the refresh was successful.
any previously returned PaDeviceInfo pointers are invalidated once this
function is called.
@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 /** The type used to represent monotonic time in seconds. PaTime is

View file

@ -755,7 +755,7 @@ PaDeviceIndex Pa_GetDefaultOutputDevice( void )
} }
PaError Pa_UpdateAvailableDeviceList( void ) PaError Pa_RefreshDeviceList( void )
{ {
PaError result = paNoError; PaError result = paNoError;
void **scanResults = NULL; void **scanResults = NULL;

View file

@ -38,7 +38,7 @@ int main(int argc, char* argv[])
if( getchar() == 'q' ) if( getchar() == 'q' )
break; break;
Pa_UpdateAvailableDeviceList(); Pa_RefreshDeviceList();
} }
Pa_Terminate(); Pa_Terminate();