Changeset 25

Show
Ignore:
Timestamp:
08/24/02 05:51:07 (6 years ago)
Author:
rossbencina
Message:

- changes status to complete
- changed struct name to PaStreamParameters?
- added relevant link to proposal 002
- added note about sampleFormat field not being entirely relevant to Pa_IsFormatSupported()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pa_proposals/trunk/016-UseStructsForOpenStreamParameters.html

    r20 r25  
    1818<P><A href="index.html">Enhancement Proposals Index</A>, 
    1919<A href="http://www.portaudio.com/">PortAudio Home Page</A></P> 
    20 <P>Updated: August 20, 2002 </P> 
     20<P>Updated: August 24, 2002 </P> 
    2121 
    2222<H4>Status</H4> 
    2323 
    24 <P>This proposal is under discussion.</P> 
     24<P>This proposal is sufficiently well defined to be implemented.</P> 
    2525 
    2626<H4>Background</H4> 
     
    3333 
    3434<P> 
    35 Define a new structure called PaDeviceParameters:  
     35Define a new structure called PaStreamParameters:  
    3636</P> 
    3737 
    3838<PRE> 
    39 typedef struct PaDeviceParameters{ 
     39typedef struct PaStreamParameters{ 
    4040     PaDeviceIndex device; 
    4141     int numChannels; 
     
    4343     PaTime latency; 
    4444     void *hostApiSpecificStreamInfo; 
    45 }PaDeviceParameters; 
     45}PaStreamParameters; 
    4646</PRE> 
    4747 
    4848<P> 
    49 Replace existing input and output device parameter fields in 
    50 Pa_OpenStream() with pointers to PaDeviceParameters structures. 
     49Replace existing input and output parameter fields in 
     50Pa_OpenStream() with pointers to PaStreamParameters structures. 
    5151</P> 
    5252 
     
    6464 
    6565<P> 
    66 The same could be done for Pa_IsFormatSupported(): 
     66The new Pa_IsFormatSupported() function defined  
     67<A href="002-ImproveDeviceFormatsQueryInterface.html">here</a> would also use pointers  
     68to PaStreamParameters structures: 
    6769</P> 
    6870 
    6971<PRE> 
    70 Pa_IsFormatSupported( 
     72PaError Pa_IsFormatSupported( 
    7173   PaStreamParameters *inputParameters, 
    7274   PaStreamParameters *outputParameters, 
     
    7577 
    7678<P> 
    77 Half duplex streams should pass NULL for the parameter structure which they are 
    78 not using. 
     79When opening a half duplex stream with Pa_OpenStream(), or querying half duplex format  
     80capabilities with Pa_IsFormatSupported(), clients should pass NULL for the  
     81parameter structure covering the unused direction. 
    7982</P> 
    8083 
     
    99102 
    100103<P> 
    101  
     104The new implementation (V19) of PortAudio provides support for all 
     105sample formats, so the value of PaStreamParameters::sampleFormat will not 
     106be relevant to Pa_IsFormatSupported(). Using the PaStreamParameters structure  
     107for Pa_IsFormatSupported() parameters 
     108is still considered to be worthwhile.  
    102109</P> 
    103  
    104110 
    105111 
     
    107113 
    108114<P> 
    109 This proposal will require clients that use Pa_OpenStream() to rewrite the parameter passing code. 
     115This proposal will require clients that use Pa_OpenStream() to rewrite their parameter passing code. 
    110116</P> 
    111117