Changeset 33 for pa_proposals/trunk
- Timestamp:
- 10/17/02 20:01:30 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pa_proposals/trunk/008-HostAPISpecificOpenStreamParameters.html
r12 r33 18 18 <P><A href="index.html">Enhancement Proposals Index</A>, 19 19 <A href="http://www.portaudio.com/">PortAudio Home Page</A></P> 20 <P>Updated: July 31, 2002 </P>20 <P>Updated: October 18, 2002 </P> 21 21 22 22 … … 24 24 25 25 <P> 26 This proposal is sufficiently well defined to be implemented. It has been partially implemented 27 in v19-devel, however the current proposal no longer utilises the PaHostApiSpecificStreamInfo 28 structure currently used in v19-devel. 26 This proposal is sufficiently well defined to be implemented. It has been implemented 27 in v19-devel. 29 28 </P> 30 29 <H4>Dependencies</H4> … … 33 32 If the PaHostApiSpecificStreamInfo structure defined in this proposal includes a PaHostApiTypeId host API identifier, then this proposal depends on the 34 33 <A HREF="007-MultipleHostAPIsInASingleBuild.html">007 - Support for Multiple Host APIs in a Single PortAudio Build</A> 35 36 34 proposal to define the form of the identifier. 37 35 </P> … … 40 38 41 39 <P> 42 Pa_OpenStream has always had inputDriverInfo and outputDriverInfo parameters, which were defined to support passing host API specific information to PortAudio implementations. Currently these parameters are defined as void* and are not used by any implementation. Two uses of inputDriverInfo and outputDriverInfo are planned for the near future: passing device names to OSS drivers, and passing additional device ids for opening multichannel soundcards under MME.40 Pa_OpenStream has always had inputDriverInfo and outputDriverInfo parameters, which were defined to support passing host API specific information to PortAudio implementations. Currently (V18) these parameters are defined as void* and are not used by any implementation. Two uses of inputDriverInfo and outputDriverInfo are planned for the near future: passing device names to OSS drivers, and passing additional device ids for addressing multichannel soundcards under MME. 43 41 </P> 44 42 … … 46 44 47 45 <P> 48 The inputDriverInfo and outputDriverInfo to Pa_OpenStream() will be renamed inputStreamInfo and outputStreamInfo.46 The inputDriverInfo and outputDriverInfo fields to Pa_OpenStream() will be moved to the PaStreamParameters structure described in <A HREF="016-UseStructsForOpenStreamParameters.html">016 - Use Structs for Pa_OpenStream() Parameters</A>. The equivalent field in this structure will be a void* field named hostApiSpecificStreamInfo. 49 47 </P> 50 48 … … 55 53 56 54 <PRE> 57 #define paNull StreamInfo ((void*)0)58 </P >55 #define paNullHostApiSpecificStreamInfo ((void*)0) 56 </PRE> 59 57 60 58 <P> … … 65 63 66 64 <PRE> 67 unsigned long size; /* size of whole structure including this header */65 unsigned long size; /* size of whole structure including this header */ 68 66 PaHostApiTypeId hostApiType; /* host API for which this data is intended */ 69 unsigned long version; /* structure version */67 unsigned long version; /* structure version */ 70 68 </PRE> 71 69 … … 84 82 <PRE> 85 83 struct{ 86 unsigned long size; /* size of whole structure including this header */87 PaHostApiTypeId hostApiType; /* host API for which this data is intended */88 unsigned long version;/* structure version */84 unsigned long size; /* size of whole structure including this header */ 85 PaHostApiTypeId hostApiType; /* host API for which this data is intended */ 86 unsigned long version; /* structure version */ 89 87 90 88 char *deviceName; 91 }PaO SSSpecificStreamInfo;89 }PaOssSpecificStreamInfo; 92 90 </PRE> 93 91 … … 128 126 129 127 typedef struct PaWinMmeStreamInfo{ 130 unsigned long size; /* size of whole structure including this header */131 PaHostApiTypeId hostApiType; /* host API for which this data is intended */132 unsigned long version;/* structure version */128 unsigned long size; /* size of whole structure including this header */ 129 PaHostApiTypeId hostApiType; /* host API for which this data is intended */ 130 unsigned long version; /* structure version */ 133 131 134 132 unsigned long flags; … … 169 167 <PRE> 170 168 struct{ 171 unsigned long size; /* size of whole structure including this header */169 unsigned long size; /* size of whole structure including this header */ 172 170 PaHostApiTypeId hostApiType; /* host API for which this data is intended */ 173 unsigned long version; /* structure version */171 unsigned long version; /* structure version */ 174 172 }PaHostApiSpecificStreamInfo; 175 173 </PRE> … … 183 181 <P> 184 182 When PaHostApiSpecificStreamInfo was still declared, we intended to change the type of the 185 streamInfor parameters from void* to PaHostApiSpecificStreamInfo*. Some objections were raised 186 to this, as it may have required clients to explicitly cast to PaHostAPISpecificInfo* when passing NULL. However the added semantic and type safety advantages were considered more valuable. The current 187 proposal leaves these parameters as NULL. 183 streamInfo parameters from void* to PaHostApiSpecificStreamInfo*. Some objections were raised 184 to this, as it may have required clients to explicitly cast to PaHostAPISpecificInfo* when passing NULL. However the added semantic and type safety advantages were considered more valuable. The current proposal leaves these parameters as void*. 188 185 </P> 189 186 … … 196 193 197 194 <P> 198 This proposal provides access to new platform-specific extensions. No existing client code will be modified. Only implementations that implement the extensions will be effected. Depending on the compiler used, clients passing NULL for inputStreamInfo and outputStreamInfo may need to explicitly cast to (PaHostAPISpecificInfo*).195 This proposal provides access to new platform-specific extensions. No existing client code will be modified. Only implementations that implement the extensions will be effected. 199 196 </P> 200 197
