[pulseaudio-discuss] Resampler rewinding

Georg Chini georg at chini.tk
Tue Jun 11 20:08:30 UTC 2019


Hi Tanu,

the first diagram should look like this:

DIAGRAM FOR HARDWARE SINK 1 BEFORE STARTING THE MOVE

+---------------------------------------------------------------------------------+-----
|           client stream memblockq                                               |
+---------------------------------------------------------------------------------+-----
                                                                                   ^ read index

+------------------------------------------------------------+--------------------+-----
|  client history_queue                                      |    queue length    |
+------------------------------------------------------------+--------------------+-----
                                                              ^ read index         ^write index
                                                                                   
  
                                                    +------------------------------+
                                                    | data in the client resampler |
                                                    +------------------------------+

+--------------------------------------------------+
|  client render_memblockq  |     queue length     |
+--------------------------------------------------+
                             ^ read index           ^ write index

----------------------------+
    |      dma buffer        |
----------------------------+
    ^ hardware playback position,
      can't rewind beyond this point

This is why I do not need to take the render memblockq length into account when
rewinding the history queue. (When rewinding during a volume change, the history
queue is also rewound by the same amount as the render memblockq plus the data in
the resampler. Then the resampler bit is fed back into the resampler.)

The third diagram is correct again, before finishing the move, the read pointers are
out of sync and will be re-synchronized when pa_sink_input_drop() is called the next
time during FINISH_MOVE.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20190611/5f931c06/attachment.html>


More information about the pulseaudio-discuss mailing list