• Rémi Denis-Courmont's avatar
    Merge all audio output locks except volume control · 41d30c6a
    Rémi Denis-Courmont authored
    With only one input per output, the lock is only useful:
     - to restart the audio instance (needed 3 out of 4 locks anyway),
     - to propagate volume change to the mixer or output plugin,
     - to access the FIFO from the output plugin thread (if applicable).
    
    So 4 fine-grained was over-engineering. Most importantly, the locking
    scheme was overly complicated and generally misunderstood/misused. Also
    to avoid lock inversion, some unlocking/relocking sequences were
    introduced; they broke atomicity.
    
    We could certainly reduce the scope of the remaining lock. Since we
    have one only input per output, most of the code is only ever run from
    the decoder thread. Thus reentrancy is not anymore needed in some
    places. But first aout_Restart() needs to be fixed and simplified.
    41d30c6a
intf.c 10 KB