This project has moved and is read-only. For the latest updates, please go here.

how to get latency after applying effects to Buffered Wave Provider

Jan 24, 2011 at 2:09 PM

I am trying to synchronize visual content with an MP3 that has pitch shifting applied to it.

I need to know how much latency the effect processing is adding so I can offset the position of the visual content.

I also need 1/60 second resolution for the "Actual Play Position (mp3 position - latency)".

How do I need to configure the DirectSound settings to get the chunks processed in smaller than 1/60 second intervals and get the latency factored in?

Basically I need, "what you are hearing now is at xxxxx milliseconds in the source MP3 file".

Great library by the way.

Jan 25, 2011 at 10:16 PM


I wrote a class named AdvancedBufferedWaveProvider, since I had a similar problem/question.

[Just some credits: it is based on code from trentdevers (]

There is an event there: PlayPositionChanged, which has a property on the Event Argument named: PlayTime

It should give you what you're looking for. Just subscribe to the event and you get the current playing time.


To check out the whole project:


Hope this helps,


Author of Practice#