Changeset 59 for pa_proposals/trunk
- Timestamp:
- 12/02/02 22:14:08 (6 years ago)
- Location:
- pa_proposals/trunk
- Files:
-
- 3 modified
-
003-ImproveLatencySpecificationInterface.html (modified) (3 diffs)
-
017-MethodForRetrievingActualStreamSampleRate.html (modified) (4 diffs)
-
index.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pa_proposals/trunk/003-ImproveLatencySpecificationInterface.html
r38 r59 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: October 19, 2002 </P>20 <P>Updated: December 3, 2002 </P> 21 21 22 22 <H4>Status</H4> … … 75 75 76 76 <P> 77 The following two functions are proposed to retrieve the input and output latency of a stream. Both return the latency in seconds. 77 A method will be provided to retrieve the actual input and output latency of a stream. The following is proposed: A new PaStreamInfo structure will be defined along with a Pa_GetStreamInfo() function as follows: 78 78 </P> 79 79 80 80 <PRE> 81 /* the following would operate directly on streams */ 82 PaTime Pa_GetStreamInputLatency( PaStream *stream ); 83 PaTime Pa_GetStreamOutputLatency( PaStream *stream ); 81 /** A structure containing unchanging information about an open stream. 82 @see Pa_GetStreamInfo 83 */ 84 85 typedef struct PaStreamInfo 86 { 87 /** this is struct version 1 */ 88 int structVersion; 89 90 /** The input latency of the stream in seconds. This value provides the most 91 accurate estimate of input latency available to the implementation. It may 92 differ significantly from the suggestedLatency value passed to Pa_OpenStream(). 93 The value of this field will be zero (0.) for output-only streams. 94 @see PaTime 95 */ 96 PaTime inputLatency; 97 98 /** The output latency of the stream in seconds. This value provides the most 99 accurate estimate of output latency available to the implementation. It may 100 differ significantly from the suggestedLatency value passed to Pa_OpenStream(). 101 The value of this field will be zero (0.) for input-only streams. 102 @see PaTime 103 */ 104 PaTime outputLatency; 105 106 ... (other fields) ... 107 108 } PaStreamInfo; 109 110 111 /** Retrieve a pointer to a PaStreamInfo structure containing information 112 about the specified stream. 113 @return A pointer to an immutable PaStreamInfo structure. If the stream 114 parameter invalid, or an error is encountered, the function returns NULL. 115 116 @param stream A pointer to an open stream previously created with Pa_OpenStream. 117 118 @note PortAudio manages the memory referenced by the returned pointer, 119 the client must not manipulate or free the memory. The pointer is only 120 guaranteed to be valid until the specified stream is closed. 121 122 @see PaStreamInfo 123 */ 124 const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream ); 84 125 </PRE> 85 126 … … 124 165 </P> 125 166 167 168 169 <P> 170 Initially the following two functions were proposed to retrieve the actual input and output latency of a stream. However, the potential need to retrieve additional information about a stream was identified, and so the PaStreamInfo structure was introduced instead. 171 </P> 172 173 <PRE> 174 /* the following would operate directly on streams */ 175 PaTime Pa_GetStreamInputLatency( PaStream *stream ); 176 PaTime Pa_GetStreamOutputLatency( PaStream *stream ); 177 </PRE> 178 179 126 180 <H4>Impact Analysis</H4> 127 181 -
pa_proposals/trunk/017-MethodForRetrievingActualStreamSampleRate.html
r53 r59 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: October 22, 2002 </P>20 <P>Updated: December 3, 2002 </P> 21 21 22 22 <H4>Status</H4> 23 23 24 <P>This proposal s 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> 25 25 26 26 <H4>Background</H4> … … 33 33 34 34 <P> 35 Add a function to retrieve the actual sample rate of the stream: 35 Provide a method to to retrieve the actual sample rate of the stream. This will be achieved by 36 adding 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 44 typedef 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 64 place actual latency and sample rate information in a common structure to simplify the 65 API for casual users. 36 66 </P> 37 67 … … 51 81 </PRE> 52 82 53 54 <H4>Discussion</H4>55 56 57 58 83 <H4>Impact Analysis</H4> 59 84 … … 65 90 </BODY> 66 91 </HTML> 92 -
pa_proposals/trunk/index.html
r53 r59 16 16 17 17 <P><A href="http://www.portaudio.com/">PortAudio Home Page</A></P> 18 <P>Updated: October 22, 2002 </P>18 <P>Updated: December 3, 2002 </P> 19 19 20 20 <H2>Introduction</H2> … … 176 176 <TD>implemented</TD> 177 177 </TR> 178 <TR BGCOLOR="#FFCCFF">178 <TR> 179 179 <TD><A HREF="017-MethodForRetrievingActualStreamSampleRate.html">017 - Method for Retrieving Actual Stream Sample Rate</A></TD> 180 <TD> open for discussion</TD>181 <TD> notimplemented</TD>182 <TD >not implemented</TD>183 <TD >not implemented</TD>184 <TD >not implemented</TD>180 <TD>complete</TD> 181 <TD>implemented</TD> 182 <TD BGCOLOR="#FFCCCC">partial</TD> 183 <TD BGCOLOR="#FFCCCC">partial</TD> 184 <TD BGCOLOR="#FFCCCC">partial</TD> 185 185 </TR> 186 186 <TR>
