Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:44:14+00:00 2026-05-26T22:44:14+00:00

I am considering doing something that might seem strange to get a reliable time

  • 0

I am considering doing something that might seem strange to get a reliable time clock. I have to push buffers to a WiFi connected audio output device that does not do buffering or audio timestamp arbitration on its own. If I don’t send the buffers at regular periodic intervals that would match reasonably the timing of a hardware sampler device, the playback becomes corrupted and starts to stutter.

I looked at the usual suspects for doing high resolution timing first before considering the “hack” I describe below. QueryPerformanceCounter looked good until I read about buggy hardware implementations in the Harddware Abstraction Layer and the complexities of variable CPU speed stepping ruining the QPC calculations. Also, the Windows multimedia timer is only accurate to 1 millisecond making its use at high sampling rates like 44.1 kHz dubious. That’s why I am considering the following:

CPU clock frequency and thus QueryPerformanceCounter wrong?

As far as I know every Windows PC currently made has at least hardware support for a microphone. What I am considering doing is “piggybacking” on an existing capture device’s clock. I have a DirectShow push source filter that is the true source of the audio to be sent to the WiFi audio output device. I will force the Capture Filter’s sample rate to match the push source filter. Then, I will use a semaphore to lock the push source filter’s FillBuffer() call until the Capture Filter’s FillBuffer() call produces a buffer, thereby riding the Capture Filter’s buffer timing.

Can I count on a user’s PC having at least one Capture Device? Also, any comments about the overall strategy are appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:44:15+00:00Added an answer on May 26, 2026 at 10:44 pm

    System Reference Clock is a relaible clock with around millisecond accuracy, and you have it in any PC with or without DirectShow capture devices.

    The problem one might be dealing with is that tghis clock does not exactly match the clock of audio capture or playback device, and a long term sound streamed accumulates an error due to mismatch of the clocks. DirectShow rate matching is something to address the problem.

    On the other hand if you need a good clock with higher accuracy/precision, you can use the one backed by QueryPerformanceCounter but being resync’ed on a regular basis to keep long term accuracy, see class DateTimePrecise.

    Also:

    • C# DateTime.Now precision
    • Windows system time with millisecond precision
    • Microsecond resolution timestamps on Windows
    • How to realise long-term high-resolution timing on windows using C++?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query doing something like: SELECT FieldX, FieldY FROM A WHERE FieldW
I'm considering doing something with Domain Specific Languages for my undergraduate project. My one
Okay, I know I have to be doing something wrong here because the performance
Has anyone got much experience deploying applications to Amazons EC2? I am considering doing
I am doing an iPad imaging app and I am considering UIPopoverController as my
Considering this code, can I be absolutely sure that the finally block always executes,
Considering you have an MVVM Architecture in WPF like Josh Smith's examples How would
I've been checking to make sure my AJAX requests are successful by doing something
Recently I came across a gcc extension that I have found rather useful: __attribute__(cleanup)
I am seriously considering doing a Optical Character Recognition program. I am well versed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.