Consider simplifying AudioParam::Create method call. One example is
gain_(AudioParam::Create(context,
kParamTypeGainGain,
"Gain.gain",
1.0,
AudioParamHandler::AutomationRate::kAudio,
AudioParamHandler:;AutomationRateMode::kIsVariable)) {
The "name" parameter isn't really needed anymore because it can be derived completely from kParamTypeGainGain.
A vast majority of AudioParam default to a-rate and is user-selectable. Many nodes have a default value of 0 (but not gain.gain), so many calls could be reduced to
AudioParam::Create(context, kParamTypeFoo)
and let everything default. More complicated ones will, of course, have to be complicated. But we could sondier using a struct to encapsulate all the arguments.
Comment 1 by rtoy@chromium.org
, Apr 24 2018