Modules | |
| Output Stream | |
| The following section describes the states a stream uses. | |
| Input Stream | |
| The following figure describes the states an InStream uses. | |
Functions | |
| HPI_ERR | HPI_StreamEstimateBufferSize (HPI_FORMAT *pFormat, HW32 dwHostPollingRateInMilliSeconds, HW32 *dwRecommendedBufferSize) |
| Given a format and rate that the buffer is processed, return the correct buffer size to support ping-pong buffering of audio. | |
|
||||||||||||||||
|
Given a format and rate that the buffer is processed, return the correct buffer size to support ping-pong buffering of audio. Calculate the minimum buffer size for a stream given the audio format that the stream will be set to use and the rate at which the host polls the stream state and reads or writes data. The buffer size returned by this function should be used as the minimum value passed to HPI_OutStreamHostBufferAllocate() or HPI_InStreamHostBufferAllocate(). If different formats and samplerates will be used on the stream, buffer size should be calculated for the highest datarate format, or the buffer should be freed and allocated again for each format change. Enabling background bus mastering (BBM) places some additional constraints on your application. In order to allow the BBM to catch up if the host app has got behind, it must be possible to transfer data faster than it is being acquired. This means that the buffer needs to be bigger than minimum. Recommended size is at least 2x minimum. A buffer size of Nx4096 makes the best use of memory.
|
1.4.6-NO