Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Why sporadic corrupt data in real time audio capture

Hi,

I try to read a few 10k samples from my sound card at 96k samples per second and then do some data analysis on them.

I have written a prog which captures one buffer via Windows Multimedia API and then stops recording.

When I analyze the buffer after capture I see occasionally jumps in the data: I capture a sine wave signal and I see phase jumps as if some samples would simply be missing. If this occurs it occurs always at the same sample position #2884 counted from the start i.e. at almost exactly 30 milliseconds after capture has started.

Can anybody give me a clue as to where my problem can come from and what I can do to avoid it?

BR Tom

Comments

  • MojojojoMojojojo Posts: 17Member
    : Hi,
    :
    : I try to read a few 10k samples from my sound card at 96k samples per second and then do some data analysis on them.
    :
    : I have written a prog which captures one buffer via Windows Multimedia API and then stops recording.
    :
    : When I analyze the buffer after capture I see occasionally jumps in the data: I capture a sine wave signal and I see phase jumps as if some samples would simply be missing. If this occurs it occurs always at the same sample position #2884 counted from the start i.e. at almost exactly 30 milliseconds after capture has started.
    :
    : Can anybody give me a clue as to where my problem can come from and what I can do to avoid it?
    :
    : BR Tom
    :
    My guess would be that your buffer is getting full after 30 msec, and during the time you are copying the samples elsewhere, you are missing out some new input samples.
Sign In or Register to comment.