You ready for a D'oh moment
I can provide following kind of information quite easialy: xxx ms of audio stream was resampled into yyy ms
Does this support any kind of PAL SpeedDown 25fps > 23.976fps and if so, is this automated based on 25fps material or does it have to be set manually?
With regards to bitstream, can I playback DTS-MA/True-HD via ffdshow with this audio renderer or is this a no go?
REFERENCE_TIME CSyncClock::GetPrivateTime()
{
CAutoLock cObjectLock(this);
UINT64 qpcNow = GetCurrentTimestamp();
DWORD dwTime = timeGetTime();
UINT64 hwClock(0);
UINT64 hwQpc(0);
UINT64 hwClockEnd(0);
UINT64 hwQpcEnd(0);
HRESULT hr = m_pAudioRenderer->AudioClock(hwClock, hwQpc);
if (hr == S_OK)
{
if (m_dStartQpcHW == 0)
m_dStartQpcHW = hwQpc;
if (m_dStartTimeHW == 0)
m_dStartTimeHW = hwClock;
if (m_dStartTimeSystem == 0)
m_dStartTimeSystem = dwTime;
if (m_dStartTimeCorrected == 0)
m_dStartTimeCorrected = m_rtPrivateTime;
m_dDurationHW = (hwClock - m_dStartTimeHW) / 10000;
m_dDurationSystem = (dwTime - m_dStartTimeSystem);
m_dDurationCorrected = (m_rtPrivateTime - m_dStartTimeCorrected) / 10000;
//if (hwQpc < m_dPrevQpcHW)
//Log("%I64d", hwQpc - m_dPrevQpcHW);
if (m_dPrevTimeHW > hwClock)
{
m_dStartTimeHW = m_dPrevTimeHW = hwClock;
m_dStartQpcHW = m_dPrevQpcHW = hwQpc;
m_dStartTimeSystem = dwTime;
m_dStartTimeCorrected = m_rtPrivateTime;
m_llDeltaError = 0;
overallCorrection = 0;
}
else
{
double clockDiff = hwClock - m_dStartTimeHW;
double qpcDiff = hwQpc - m_dStartQpcHW;
if (clockDiff > 0 && qpcDiff > 0)
m_dSystemClockMultiplier = clockDiff / qpcDiff;
if (m_dSystemClockMultiplier < 0.95 || m_dSystemClockMultiplier > 1.05)
m_dSystemClockMultiplier = 1.0;
m_dPrevTimeHW = hwClock;
m_dPrevQpcHW = hwQpc;
}
}
else
{
//Log("AudioClock() returned error (0x%08x)");
}
REFERENCE_TIME delta = REFERENCE_TIME(dwTime) - REFERENCE_TIME(m_dwPrevSystemTime);
REFERENCE_TIME deltaOrig = delta;
if (dwTime < m_dwPrevSystemTime)
{
delta += REFERENCE_TIME(UINT_MAX) + 1;
}
m_dwPrevSystemTime = dwTime;
delta = (REFERENCE_TIME)(delta * (UNITS / MILLISECONDS));
double dAdjustment;
if (m_bHWBasedRefClock)
{
dAdjustment = m_dAdjustment * m_dBias / m_dSystemClockMultiplier;
}
else
{
dAdjustment = m_dAdjustment * m_dBias;
}
double ddelta= ((double) delta)*dAdjustment;
delta = (REFERENCE_TIME) ddelta;
m_ddeltaError += ddelta - delta;
if (m_ddeltaError>1.0)
{
delta--;
m_ddeltaError-=1.0;
overallCorrection += 1.0;
}
if (hwQpc - m_dStartQpcHW > 600000000)
{
Log("mul: %.10f de: %6I64d de.orig: %6I64d de.err: %.10f bias: %.10f adj: %.10f hwQpc: %I64d hwClock: %I64d",
m_dSystemClockMultiplier, delta, deltaOrig * 10000, m_ddeltaError, m_dBias, m_dAdjustment, hwQpc, hwClock);
}
m_rtPrivateTime = m_rtPrivateTime + delta;
return m_rtPrivateTime;
}
Netherlands
Tourettes: I have a problem: when playing AVI file in MePo using SAF5 and the V12 renderer I get no sound. I attached both graphs:
AVI-nosound - MePo, SAF5 and V12 renderer but gives me no sound
AVI-sound - MPC-HC
Please post log and ffdshow setting screen shots for 1) mixer screen 2) output screen 3) resampling screen. SAF might be having pretty bad settings for ffdshow. Currently I'm not recommending using SAF for testing at all.
Please post log and ffdshow setting screen shots for 1) mixer screen 2) output screen 3) resampling screen. SAF might be having pretty bad settings for ffdshow. Currently I'm not recommending using SAF for testing at all.
Only if passthrough is enabled, default setting should be OK.