| | 78 | <H4>Pa_OpenStream() Flag to Prime Initial Buffers Using the Stream Callback</H4> |
| | 79 | |
| | 80 | <P> |
| | 81 | Currently, when a stream is started, host buffers are initially filled with zeros (silence). This is done so that the Stream Callback: a) is called regularly (useful for time syncronisation), b) provides relatively constant latency from calback to output, and c) avoids a peak in processor load while a number of buffers are filled one after another. The downside of this strategy is that the startup latency is held constant, whereas some host APIs may be able to provide significantly lower startup latency if the initial buffers are filled with valid sample data. |
| | 82 | </P> |
| | 83 | |
| | 84 | <P> |
| | 85 | Although it is generally held that the above behavior is the most widely useful for streaming audio applications, a flag could be provided to Pa_OpenStream() to indicate that the buffers should initially be primed using the callback: |
| | 86 | </P> |
| | 87 | |
| | 88 | <PRE> |
| | 89 | paPrimeBuffersUsingCallback |
| | 90 | </PRE> |
| | 91 | |