Пример #1
0
void
CParamsManager ::UpdateActiveParams(REFERENCE_TIME rtTime, UpdateCallback &rThis)
{
    if (!m_dwActiveBits)
        return; // nothing to recalc

    DWORD dwBit = 1;
    for (DWORD dwIndex = 0; dwIndex < m_cParams; dwIndex++, dwBit = dwBit << 1)
    {
        if (m_dwActiveBits & dwBit)
        {
            float fVal = 0;
            HRESULT hr = GetParamFloat(dwIndex, rtTime, &fVal);
            rThis.SetParamUpdate(dwIndex, fVal);
            if (hr == S_FALSE)
                m_dwActiveBits &= ~dwBit; // we're beyond the last curve, don't need to recalc next time

            //TraceI(6, "DMO value: time %I64d, param #%d, current value %hf\n", rtTime, dwIndex, fVal);
        }
    }
}
Пример #2
0
void CParamsManager ::UpdateActiveParams(REFERENCE_TIME rtTime, UpdateCallback &rThis)
{
    if (!m_dwActiveBits)
        return; // nothing to recalc

    DWORD dwBit = 1;
    for (DWORD dwIndex = 0; dwIndex < m_cParams; dwIndex++, dwBit = dwBit << 1)
    {
        if (m_dwActiveBits & dwBit)
        {
            float fVal = 0;
            HRESULT hr = GetParamFloat(dwIndex, rtTime, &fVal);
            rThis.SetParamUpdate(dwIndex, fVal);
            if (hr == S_FALSE)
            {
                // we're beyond the last curve, so we don't need to recalc next time
                m_dwActiveBits &= ~dwBit; 
            }
        }
    }
}