From bf0b0fe11d8b301cdfcc6d13f12a778cdd1c14b5 Mon Sep 17 00:00:00 2001 From: Daniel Rugerio <50124185+darugeri@users.noreply.github.com> Date: Wed, 13 May 2020 16:23:40 -0700 Subject: Update to SysVAD, Wave test and public sample of KS Position Test (#496) * Update to Wave test and public sample of KS Position test. * Update to the SysVAD audio driver sample. * Add the PnpLockDown property. --- audio/sysvad/EndpointsCommon/minwavertstream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/sysvad/EndpointsCommon/minwavertstream.cpp') diff --git a/audio/sysvad/EndpointsCommon/minwavertstream.cpp b/audio/sysvad/EndpointsCommon/minwavertstream.cpp index 93ecdcf3..499d5b38 100644 --- a/audio/sysvad/EndpointsCommon/minwavertstream.cpp +++ b/audio/sysvad/EndpointsCommon/minwavertstream.cpp @@ -968,12 +968,12 @@ NTSTATUS CMiniportWaveRTStream::GetReadPacket // Return next packet number to be read *PacketNumber = availablePacketNumber; - // Compute and return timestamp corresponding to start of the available packet. In a real hardware + // Compute and return timestamp corresponding to the end of the available packet. In a real hardware // driver, the timestamp would be computed in a driver and hardware specific manner. In this sample // driver, it is extrapolated from the sample driver's internal simulated position correlation // [m_ullLinearPosition @ m_ullDmaTimeStamp] and the sample's internal 64-bit packet counter, subtracting // 1 from the packet counter to compute the time at the start of that last completed packet. - ULONGLONG linearPositionOfAvailablePacket = (packetCounter - 1) * (m_ulDmaBufferSize / m_ulNotificationsPerBuffer); + ULONGLONG linearPositionOfAvailablePacket = packetCounter * (m_ulDmaBufferSize / m_ulNotificationsPerBuffer); // Need to divide by (1000 * 10000 because m_ulDmaMovementRate is average bytes per sec ULONGLONG carryForwardBytes = (hnsElapsedTimeCarryForward * m_ulDmaMovementRate) / 10000000; ULONGLONG deltaLinearPosition = ullLinearPosition + carryForwardBytes - linearPositionOfAvailablePacket; -- cgit v1.3.1