npv: fix filter time base handling, prepare discontinuity support
[nyanmp.git] / npv / clk / local / state.frag.c
blobe125745ae2d35cbc3fdbdf2dbde76577cf747833
1 /*
2 * considered to be shared by all the thds: we spin because it is supposed to
3 * be short
4 */
5 STATIC struct {
6 /*
7 * 2 points in the time domain:
8 * - ref
9 * - now
11 * the ref point is the top fr of a ff set of audio frs ("AVFrame").
13 * the now point is interpolated using the ref point and the most
14 * accurate alsa audio timer can give us
16 */
17 bool ref_valid; /* we may not have a ref point yet */
18 bool paused;
19 struct {
20 snd_pcm_status_t *status;
22 * the n of audio frs (written to/mixed by) alsa from the ff set
23 * of audio frs ("AVFrame") when the alsa status is sampled
25 snd_pcm_ufrs_t written_ufrs_n;
27 s64 audio_filt_ts; /* in ff audio filt tb units */
28 } ref;
29 struct {
30 snd_pcm_status_t *status;
31 } now;
32 } npv_clk_l;
33 STATIC snd_pcm_hw_params_t *npv_clk_pcm_hw_params_l;