Changeset 56

Show
Ignore:
Timestamp:
10/26/02 02:16:14 (6 years ago)
Author:
rossbencina
Message:

- removed Pa_HostApiDefaultInputDevice, Pa_HostApiDefaultOutputDevice
- added defaultInputDevice, defaultOutputDevice fields to PaHostApiInfo? struct
- removed Pa_HostApiCountDevices
- added PaHostApiInfo::deviceCount

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pa_proposals/trunk/007-MultipleHostAPIsInASingleBuild.html

    r40 r56  
    143143 
    144144 
    145 PaHostApiIndex Pa_CountHostApis( void ); 
    146 /**< Retrieve the number of available host APIs. Even if a host API is 
     145/** Retrieve the number of available host APIs. Even if a host API is 
    147146 available it may have no devices available. 
    148147  
     
    152151 @see PaHostApiIndex 
    153152*/ 
    154  
    155  
    156 PaHostApiIndex Pa_GetDefaultHostApi( void ); 
    157 /**< Retrieve the index of the defualt hostAPI. The default host API will be 
     153PaHostApiIndex Pa_CountHostApis( void ); 
     154 
     155 
     156/** Retrieve the index of the defualt hostAPI. The default host API will be 
    158157 the lowest common denominator host API on the current platform and is 
    159158 unlikely to provide the best performance. 
     
    161160 @return The default host API index. 
    162161*/ 
    163  
    164  
    165 PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ); 
    166 /**< Convert a static host API unique identifier, into a runtime 
     162PaHostApiIndex Pa_GetDefaultHostApi( void ); 
     163 
     164 
     165/** Convert a static host API unique identifier, into a runtime 
    167166 host API index. 
    168167 
     
    175174 @see PaHostApiTypeId 
    176175*/ 
     176PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ); 
    177177</PRE> 
    178178 
     
    180180<P>3. Provide a method for retrieving information about a given host API:</P> 
    181181<PRE> 
     182/** A structure containing information about a particular host API. */ 
    182183typedef struct 
    183184{ 
    184185    int structVersion; 
    185     PaHostApiTypeId type; /**< the well known unique identifier of this host API @see PaHostApiTypeId*/ 
    186     const char *name; /* a textual description of the host API for display on user interfaces */ 
     186        /** the well known unique identifier of this host API @see PaHostApiTypeId*/ 
     187    PaHostApiTypeId type;  
     188        /** a textual description of the host API for display on user interfaces */ 
     189    const char *name;  
     190 
     191        /**  The number of devices belonging to this host API. This field may be 
     192     used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate 
     193     all devices for this host API. 
     194     @see Pa_HostApiDeviceIndexToDeviceIndex 
     195    */ 
     196    int deviceCount; 
     197 
     198    /** The the default input device for this host API. The value will be a 
     199     device index ranging from 0 to (Pa_CountDevices()-1), or paNoDevice 
     200     if no default input device is available. 
     201    */ 
     202    PaDeviceIndex defaultInputDevice; 
     203 
     204    /** The the default output device for this host API. The value will be a 
     205     device index ranging from 0 to (Pa_CountDevices()-1), or paNoDevice 
     206     if no default output device is available. 
     207    */ 
     208    PaDeviceIndex defaultOutputDevice; 
     209 
    187210} 
    188211PaHostApiInfo; 
    189 /**< A structure containing information about a particular host API. */ 
    190  
    191  
    192 const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi ); 
    193 /**< Retrieve a pointer to a structure containing information about a specific 
     212 
     213/** Retrieve a pointer to a structure containing information about a specific 
    194214 host Api. 
    195215      
     
    204224 calls to Pa_Initialize() and Pa_Terminate(). 
    205225*/ 
     226const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi ); 
     227 
    206228</PRE> 
    207229 
     
    226248</PRE> 
    227249 
    228 <P>5. Provide methods for finding per-host API default devices:</P> 
    229 <PRE> 
    230 PaDeviceIndex Pa_HostApiDefaultInputDevice( PaHostApiIndex hostApi ); 
    231 /**< Retrieve the default input device for the specified host API 
    232       
     250<P>5. Provide a facility for finding per-host API default devices. - This functionality is provided by the defaultInputDevice and defaultOutputDevice fields in the PaHostApiInfo structure.</P> 
     251 
     252<P>6. Provide a facility for enumerating devices on a per-host-API basis. Note that this functionality is provided in addition to the current Pa_CountDevices() and Pa_GetDeviceInfo() functions:</P> 
     253<PRE> 
     254/** Convert a host-API-specific device index to standard PortAudio device index. 
     255 This function may be used in conjunction with the deviceCount field of 
     256 PaHostApiInfo to enumerate all devices for the specified host API. 
     257 
    233258 @param hostApi A valid host API index ranging from 0 to (Pa_CountHostApis()-1) 
    234       
    235  @return A device index ranging from 0 to (Pa_CountDevices()-1), or paNoDevice 
    236  if there is no default input device available for the specified host API. 
    237 */ 
    238  
    239  
    240 PaDeviceIndex Pa_HostApiDefaultOutputDevice( PaHostApiIndex hostApi ); 
    241 /**< Retrieve the default output device for the specified host API 
    242  
    243  @param hostApi A valid host API index ranging from 0 to (Pa_CountHostApis()-1) 
    244  
    245  @return A device index ranging from 0 to (Pa_CountDevices()-1), or paNoDevice 
    246  if there is no default output device available for the specified host API. 
    247 */ 
    248 </PRE> 
    249  
    250 <P>6. Provide functions for enumerating devices on a per-host-API basis. Note that this functionality is provided in addition to the current Pa_CountDevices() and Pa_GetDeviceInfo() functions:</P> 
    251 <PRE> 
    252 int Pa_HostApiCountDevices( PaHostApiIndex hostApi ); 
    253 /**< Retrieve the number of devices belonging to a specific host API. 
    254  This function may be used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() 
    255  to enumerate all devices for a specific host API. 
    256   
    257  @param hostApi A valid host API index ranging from 0 to (Pa_CountHostApis()-1) 
    258       
    259  @return The number of devices belonging to the specified host API. 
    260       
    261  @see Pa_HostApiDeviceIndexToDeviceIndex 
    262 */ 
    263  
    264  
     259 
     260 @param hostApiDeviceIndex A valid per-host device index in the range 
     261 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1) 
     262 
     263 @see PaHostApiInfo 
     264*/ 
    265265PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, 
    266266        int hostApiDeviceIndex ); 
    267 /**< Convert a host-API-specific device index to standard PortAudio device index. 
    268  This function may be used in conjunction with Pa_HostApiCountDevices() to 
    269  enumerate all devices for a specific host API. 
    270  
    271  @param hostApi A valid host API index ranging from 0 to (Pa_CountHostApis()-1) 
    272  
    273  @param hostApiDeviceIndex A valid per-host device index in the range 
    274  0 to (Pa_HostApiCountDevices(hostApi)-1) 
    275  
    276  @see Pa_HostApiCountDevices 
    277 */ 
     267 
    278268</PRE> 
    279269