Public feed #723157

Unnamed

public text v1 · immutable
Raw Edit
·published 2007-10-02 15:42 UTC
rendered paste body
The non-DMA case:

   0             D-RS  D                                 G-RS  G                                           M 
   |              :    |                                  :    |                                           |
   +-------------------+-----------------------------------------------------------------------------------+
   |              :    |                                  : rs |                                           |
   |  <--fixed--> : rs |  <-- changeable buffer -------------------------------------------------------->  |
   |     buffer   :    |                                  :    |                                           |
   +-------------------+-----------------------------------------------------------------------------------+
                  ^                                       ^
   ^              |    ^                                  |    ^                                           ^
   | Where the    |    | The delay, i.e.                  |    | somewhere here we                         | here's where we enforce 
   | audio hw     |    | where the changable buffer       |    | have the goal                             | the maximum buffer size,
   | read samples |    | is handed to the fixed buf       |                                                | considerably larger then the goal
                  |                                       |
                  | if the fixed buffer fill level        | if the changeable buffer fill level
                  | drops below the delay minus           | drops below the goal minus reqsize
                  | reqsize, we move more data from the   | we ask the app for more data. 
                  | changeable buffer to the fixed 
                  | buffer.

Data is requested from the application only in blocks >= the reqsize, and also moved only in blocks >= the reqsize from the changeable buffer to the fixed buffer.