mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
lfe-filter: Add rewind support
Store current filter state at every normal block process. When a rewind happens, rewind back to the nearest saved state, then calculate forward to the actual sample position. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
d0e8b0fe07
commit
defc2b702b
3 changed files with 108 additions and 9 deletions
|
|
@ -419,7 +419,8 @@ pa_resampler* pa_resampler_new(
|
|||
if (lfe_filter_required) {
|
||||
pa_sample_spec wss = r->o_ss;
|
||||
wss.format = r->work_format;
|
||||
r->lfe_filter = pa_lfe_filter_new(&wss, &r->o_cm, (float)crossover_freq);
|
||||
/* FIXME: For now just hardcode maxrewind to 3 seconds */
|
||||
r->lfe_filter = pa_lfe_filter_new(&wss, &r->o_cm, (float)crossover_freq, b->rate * 3);
|
||||
pa_log_debug(" lfe filter activated (LR4 type), the crossover_freq = %uHz", crossover_freq);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue