Changeset 25
- Timestamp:
- 08/24/02 05:51:07 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pa_proposals/trunk/016-UseStructsForOpenStreamParameters.html
r20 r25 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: August 2 0, 2002 </P>20 <P>Updated: August 24, 2002 </P> 21 21 22 22 <H4>Status</H4> 23 23 24 <P>This proposal is under discussion.</P>24 <P>This proposal is sufficiently well defined to be implemented.</P> 25 25 26 26 <H4>Background</H4> … … 33 33 34 34 <P> 35 Define a new structure called Pa DeviceParameters:35 Define a new structure called PaStreamParameters: 36 36 </P> 37 37 38 38 <PRE> 39 typedef struct Pa DeviceParameters{39 typedef struct PaStreamParameters{ 40 40 PaDeviceIndex device; 41 41 int numChannels; … … 43 43 PaTime latency; 44 44 void *hostApiSpecificStreamInfo; 45 }Pa DeviceParameters;45 }PaStreamParameters; 46 46 </PRE> 47 47 48 48 <P> 49 Replace existing input and output deviceparameter fields in50 Pa_OpenStream() with pointers to Pa DeviceParameters structures.49 Replace existing input and output parameter fields in 50 Pa_OpenStream() with pointers to PaStreamParameters structures. 51 51 </P> 52 52 … … 64 64 65 65 <P> 66 The same could be done for Pa_IsFormatSupported(): 66 The new Pa_IsFormatSupported() function defined 67 <A href="002-ImproveDeviceFormatsQueryInterface.html">here</a> would also use pointers 68 to PaStreamParameters structures: 67 69 </P> 68 70 69 71 <PRE> 70 Pa _IsFormatSupported(72 PaError Pa_IsFormatSupported( 71 73 PaStreamParameters *inputParameters, 72 74 PaStreamParameters *outputParameters, … … 75 77 76 78 <P> 77 Half duplex streams should pass NULL for the parameter structure which they are 78 not using. 79 When opening a half duplex stream with Pa_OpenStream(), or querying half duplex format 80 capabilities with Pa_IsFormatSupported(), clients should pass NULL for the 81 parameter structure covering the unused direction. 79 82 </P> 80 83 … … 99 102 100 103 <P> 101 104 The new implementation (V19) of PortAudio provides support for all 105 sample formats, so the value of PaStreamParameters::sampleFormat will not 106 be relevant to Pa_IsFormatSupported(). Using the PaStreamParameters structure 107 for Pa_IsFormatSupported() parameters 108 is still considered to be worthwhile. 102 109 </P> 103 104 110 105 111 … … 107 113 108 114 <P> 109 This proposal will require clients that use Pa_OpenStream() to rewrite the parameter passing code.115 This proposal will require clients that use Pa_OpenStream() to rewrite their parameter passing code. 110 116 </P> 111 117
