Hi Tim, Thank you very much. I play a song and ran slience.exe as your suggesion but there was still AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY happened sometimes just like following cases in your blog: ... IAudioCaptureClient::GetBuffer set flags to 0x00000001 on pass 5381 after 1088829 frames... Could you please show me some suggstion on it? It could be something as simple as a slight clocking mismatch. My guess is that it is not important. Do you get that more than once? Yes. I met several times. And if I ignore this error code to continue capturing audio data, it seems there is no error in saving audio files. I just listened it and saw the outline of wave form in CoolEdit Pro but not comparing bit by bit. Something I did not say clearly to make your trouble. Sorry for that. For the 3rd part application, I meant that it was not our own application. Actually it is Microsoft application. It should always have a way to disable its own AEC. I will use loopback capture to capture the redener audio data and implement AEC. For the articles and white papers, I read part of them but not all. I have not get clearly about APO completely. I spent one week on APO and I think I need some more time. Thank you again. Your patient explanation give me big help. Many thanks,Audleyswood Date: Fri, 21 Oct 2011 10:19:03 -0700 From: timr@xxxxxxxxx To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: - How to capture HDMI audio output data? Whether is sAPO a choice for it? Jun Jiang wrote: Yes, the latency is a question. Now I need to find a way to capture HDMI audio output data firstly and check latency later. For my case, I use a 3rd part application and this application can trun off Microsoft AEC. Actually, I want to find a way to disable Microsoft AEC, such as set key in Register. But I does not find it now. Could somebody show suggetion on it? If you just need this inside one application, then it's not that hard. The application is building its own audio graph. It can hook into the loopback output, and combine that with the microphone input to do the cancellation. No drivers, no APOs, no magic. The application can disable APOs. The one overriding key concept in the Vista-and-beyond audio engine is that the application should be in complete control. There shouldn't be anything slipped in to the audio stack that the application didn't know about. In the days before Vista, every audio manufacturer and system vendor and application developer and value-added reseller had their own cool idea for how to tweak the audio path. As a result, some systems ended up with multiple filters that caused god-awful latencies and quality impacts. The professional audio guys complained, and this is the result. This applies in your case. AEC is only useful if you have a microphone and speaker, where BOTH are in use, and where the output of the speaker can be heard in the microphone. That's a very specific circumstance. You don't want your AEC code to be installed at all times (well, maybe you do, but your users do not). It would get in the way if they were listening to a DVD without using the microphone. You are going to need to understand the Vista audio engine. There are some excellent articles and white papers on the APO architecture and the system effects APO. Have you read them? Here's an index to some of the white papers: http://msdn.microsoft.com/en-us/windows/hardware/gg454527 Of particular interest are "Custom Audio Effects in Windows Vista: http://msdn.microsoft.com/en-us/windows/hardware/gg463025 and "Reusing Windows Vista Audio System Effects": http://msdn.microsoft.com/en-us/windows/hardware/gg463044 I found your previous post, http://www.winvistatips.com/system-wide-audio-filter-driver-t819251.html, about APO. You said that APO is the extension of hardware and it should co-work with hardware together. I just want to know if it is possible to make a APO to attach to other hardware driver, such as my case, to attcah to Intel Display Audio driver to capture output audio data? Or to attach to some system level to capture audio output data? Or whether can I make the global APO to capture all possible audio output data? Is it possible? Yes. Is it the recommend solution? No. The official Microsoft position is like I said: an APO is an extension of the hardware. When you install your APO, the APO's name becomes part of the audio driver name that the user sees. Now, it's true that many people implement solutions that are not the recommended solution, but there's a risk. I do know of one company that implemented AEC by having a user-mode application fetch the data using the loopback path, then feeding that back into a filter driver on their USB audio microphone driver, where the AEC algorithm was implemented. No APO was required. My another question: Is APO not recommended to do it or APO impossible to do it? If this is going to be part of a product that you expect to sell, it might be worthwhile for you to try to set up a face-to-face meeting with members of the Microsoft audio team. They have some very smart people there who have, mostly, seen it all before. They might be able to provide you with guidance. -- Tim Roberts, timr@xxxxxxxxx Providenza & Boekelheide, Inc.