resample: add SSE peaks resampler

This commit is contained in:
Wim Taymans 2018-12-19 16:47:20 +01:00
parent a1e567b985
commit 0a4ef3d2c0
4 changed files with 116 additions and 10 deletions

View file

@ -92,6 +92,7 @@ struct impl {
struct spa_node node;
struct spa_log *log;
struct spa_cpu *cpu;
struct props props;
@ -925,10 +926,19 @@ impl_init(const struct spa_handle_factory *factory,
this = (struct impl *) handle;
for (i = 0; i < n_support; i++) {
if (support[i].type == SPA_TYPE_INTERFACE_Log)
switch (support[i].type) {
case SPA_TYPE_INTERFACE_Log:
this->log = support[i].data;
break;
case SPA_TYPE_INTERFACE_CPU:
this->cpu = support[i].data;
break;
}
}
if (this->cpu)
this->resample.cpu_flags = spa_cpu_get_flags(this->cpu);
if (info != NULL && (str = spa_dict_lookup(info, "resample.peaks")) != NULL)
this->monitor = atoi(str);