mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
alsa: improve capture slave resync
When we underrun, send out a buffer of 0 samples and catch up next time. Detect discont in the master and resync.
This commit is contained in:
parent
b43844e7c6
commit
5ac383e7f7
3 changed files with 46 additions and 32 deletions
|
|
@ -65,7 +65,7 @@ struct buffer {
|
|||
struct spa_list link;
|
||||
};
|
||||
|
||||
#define BW_MAX 0.256
|
||||
#define BW_MAX 0.128
|
||||
#define BW_MED 0.064
|
||||
#define BW_MIN 0.016
|
||||
#define BW_PERIOD (3 * SPA_NSEC_PER_SEC)
|
||||
|
|
@ -125,6 +125,7 @@ struct state {
|
|||
int timerfd;
|
||||
uint32_t threshold;
|
||||
uint32_t last_threshold;
|
||||
uint64_t last_position;
|
||||
unsigned int alsa_started:1;
|
||||
unsigned int alsa_sync:1;
|
||||
unsigned int slaved:1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue