calling Pa_SelectHostApis now returns an error if it is called while PA is initialized.
This commit is contained in:
parent
9039daf7e7
commit
f13a626eef
2 changed files with 10 additions and 3 deletions
|
|
@ -134,7 +134,8 @@ typedef enum PaErrorCode
|
|||
paCanNotReadFromAnOutputOnlyStream,
|
||||
paCanNotWriteToAnInputOnlyStream,
|
||||
paIncompatibleStreamHostApi,
|
||||
paBadBufferPtr
|
||||
paBadBufferPtr,
|
||||
paIsInitialized
|
||||
} PaErrorCode;
|
||||
|
||||
|
||||
|
|
@ -276,8 +277,9 @@ typedef enum PaHostApiTypeId
|
|||
|
||||
/** Select host APIs and their initialization order.
|
||||
|
||||
The selected host APIs take effect the next time that Pa_Initialize() is
|
||||
invoked.
|
||||
This function may only be called prior to calling Pa_Initialize()
|
||||
or after calling Pa_Terminate(). The selected host APIs take effect the
|
||||
next time that Pa_Initialize() is invoked.
|
||||
|
||||
@param hostApiTypes An array of host API identifiers belonging to the
|
||||
PaHostApiTypeId enumeration.
|
||||
|
|
|
|||
|
|
@ -217,6 +217,11 @@ PaError Pa_SelectHostApis( const PaHostApiTypeId *hostApiTypes, int count )
|
|||
PaHostApiTypeId *oldSelectedHostApiTypes = selectedHostApiTypes_;
|
||||
PaHostApiTypeId *newSelectedHostApiTypes = NULL;
|
||||
|
||||
if( PA_IS_INITIALISED_ )
|
||||
{
|
||||
return paIsInitialized;
|
||||
}
|
||||
|
||||
if( count == 0 )
|
||||
{
|
||||
/* revert to default state */
|
||||
|
|
|
|||
Loading…
Reference in a new issue