pacat: make pacat respond to cork/uncork events
authorLu Guanqun <guanqun.lu@intel.com>
Tue, 23 Aug 2011 06:18:22 +0000 (14:18 +0800)
committerColin Guthrie <colin@mageia.org>
Mon, 29 Aug 2011 09:31:46 +0000 (10:31 +0100)
commitcef16430d0e307a3978dc6aa9a0d9b6940b0e0fa
tree4d6cbeb8c15f657608193d68e2ca117fb17a0b6e
parentc862c5caa4d2a63f0a5c5c359b6205e3bad5f78a
pacat: make pacat respond to cork/uncork events

Pacat remembers the number of cork requests, and then cork/uncork the stream
accordingly.

With this change, it makes below test script work correctly:

pacat -p --property=media.role="music" <long-sound> &
sleep 2
pacat -p --property=media.role="phone" <short-sound>
wait

Initial idea by Lu Guanqun, but modified by Colin Guthrie (so blame
me if it's broken)
src/utils/pacat.c