Decimate sample rate
The decimate
hook reduces the sampling rate by periodically discarding samples.
Implementation
The source code of the hook is available here: https://github.com/VILLASframework/node/blob/master/lib/hooks/decimate.cpp
Configuration
ratio required | integer The decimation ratio. A value of 4 will skip every, but the 4th sample in a row. |
enabled | boolean Default: true An optional field which can be used to disable a hook. |
priority | integer Default: 99 The priority of this hook which determines the order in which hooks are executed. Hooks with a lwoer priority are executed before ones with a higher priority. If no priority is configured, hooks are executed in the order they are configured in the configuration file. |
{- "ratio": 4,
- "enabled": true,
- "priority": 99
}
Example
node/etc/examples/hooks/decimate.conf
@include "hook-nodes.conf"
paths = (
{
in = "signal_node"
out = "file_node"
hooks = (
{
type = "decimate"
ratio = 10
}
)
}
)