void AudioParamTimeline::setTargetAtTime(float target, double time, double timeConstant, ExceptionState& exceptionState)
{
    ASSERT(isMainThread());

    if (!isNonNegativeAudioParamTime(time, exceptionState)
        || !isNonNegativeAudioParamTime(timeConstant, exceptionState, "Time constant"))
        return;

    insertEvent(ParamEvent(ParamEvent::SetTarget, target, time, timeConstant, 0, nullptr), exceptionState);
}
void AudioParamTimeline::linearRampToValueAtTime(float value, double time, ExceptionState& exceptionState)
{
    ASSERT(isMainThread());

    if (!isNonNegativeAudioParamTime(time, exceptionState))
        return;

    insertEvent(ParamEvent(ParamEvent::LinearRampToValue, value, time, 0, 0, nullptr), exceptionState);
}
void AudioParamTimeline::setValueCurveAtTime(DOMFloat32Array* curve, double time, double duration, ExceptionState& exceptionState)
{
    ASSERT(isMainThread());

    if (!isNonNegativeAudioParamTime(time, exceptionState)
        || !isPositiveAudioParamTime(duration, exceptionState, "Duration"))
        return;

    insertEvent(ParamEvent(ParamEvent::SetValueCurve, 0, time, 0, duration, curve), exceptionState);
}
void AudioParamTimeline::exponentialRampToValueAtTime(float value, double time, ExceptionState& exceptionState)
{
    ASSERT(isMainThread());

    if (!isPositiveAudioParamValue(value, exceptionState)
        || !isNonNegativeAudioParamTime(time, exceptionState))
        return;

    insertEvent(ParamEvent(ParamEvent::ExponentialRampToValue, value, time, 0, 0, nullptr));
}