Show
Ignore:
Timestamp:
12/02/02 22:14:08 (6 years ago)
Author:
rossbencina
Message:

- replaced Pa_GetStreamInputLatency() and Pa_GetStreamOutputLatency() with a new PaStreamInfo? and Pa_GetStreamInfo() functions.
- added sampleRate to PaStreamInfo?
- marked PaStreamInfo::sampleRate as implemented

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pa_proposals/trunk/017-MethodForRetrievingActualStreamSampleRate.html

    r53 r59  
    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: October 22, 2002 </P> 
     20<P>Updated: December 3, 2002 </P> 
    2121 
    2222<H4>Status</H4> 
    2323 
    24 <P>This proposals is open for discussion.</P> 
     24<P>This proposal is sufficiently well defined to be implemented. It is implemented in the v19-devel branch. </P> 
    2525 
    2626<H4>Background</H4> 
     
    3333 
    3434<P> 
    35 Add a function to retrieve the actual sample rate of the stream: 
     35Provide a method to to retrieve the actual sample rate of the stream. This will be achieved by 
     36adding a sample rate field to the new PaStreamInfo structure defined in <A HREF="003-ImproveLatencySpecificationInterface.html">003 - Improve Latency Specification Interface</A> 
     37</P> 
     38 
     39<PRE> 
     40/** A structure containing unchanging information about an open stream. 
     41 @see Pa_GetStreamInfo 
     42*/ 
     43 
     44typedef struct PaStreamInfo{ 
     45        ... 
     46 
     47    /** The sample rate of the stream in Hertz (samples per second). In cases 
     48     where the hardware sample rate is inaccurate and PortAudio is aware of it, 
     49     the value of this field may be different from the sampleRate parameter 
     50     passed to Pa_OpenStream(). If information about the actual hardware sample 
     51     rate is not available, this field will have the same value as the sampleRate 
     52     parameter passed to Pa_OpenStream(). 
     53    */ 
     54    double sampleRate; 
     55 
     56        ... 
     57} PaStreamInfo; 
     58</PRE> 
     59 
     60 
     61<H4>Discussion</H4> 
     62 
     63<P> Initially the following function was proposed, however it was decided that it was better to 
     64place actual latency and sample rate information in a common structure to simplify the  
     65API for casual users. 
    3666</P> 
    3767 
     
    5181</PRE> 
    5282 
    53  
    54 <H4>Discussion</H4> 
    55  
    56  
    57  
    5883<H4>Impact Analysis</H4> 
    5984 
     
    6590</BODY> 
    6691</HTML> 
     92