I continuously send data to IAudioClient
(GetBufferSize / GetCurrentPadding / GetBuffer / ReleaseBuffer
), but I want to know when the audio device finishes playing the last data I sent. I do not want to assume the player stopped just because I sent the last chunk of data to the device: it might still be playing the buffered data.
I tried using IAudioClock
/ IAudioClock2
to check the hardware buffer position, but it stays the same from the moment I send the last chunk.
I also don't see anything relevant in the IMMNotificationClient
and IAudioSessionNotification
interfaces...
What am I missing?
Thanks!