how to know when IWMReaderCallback::OnSample() is called no more (end of data)



Hi all,

I am developing an audio player with WMF SDK 11.

I am using an asynchronous WMReader, and IWMReaderAdvanced's user
provided clock.

When playing some files, I cannot detect the end of the audio data at
IWMReaderCallback::OnSample() because cnsSampleTime +
cnsSampleDuration doesn't always reach the total length of the audio
(read from g_wszWMDuration header attribute).

I get WMT_EOF at IWMReaderCallback::OnStatus() but OnSample() will
still be called a few more times afterwards, so OnStatus() events are
useless for this task.

Which would be the correct way to detect that the total length of the
audio has been decompressed (ie. OnSample() is not going to be called
anymore).

Cheers,
Jose
.



Relevant Pages

  • Jon Ds 2 audio clips for our esteemed perusal
    ... This is in response to a thread that Jon started on December 18 titled "2 audio clips for your esteemed perusal" I finally got around to playing with the unprocessed mp3 a little. ... can make things sound thin and distant, but compression and limiting can ...
    (rec.music.makers.guitar.jazz)
  • Re: Actual sound playing position in DirectShow applications
    ... > playing position. ... > 2) Put sample grabber before audio rendersing filter into graph and learn ... Reduce the audio buffer size, default is 1/2 second per buffer. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Compaq Armada 1520DM Laptop CD Rom Drive Problem
    ... ago, it started to have difficultly reading a CD rom, or playing an audio ... "playing" (audio) the CD. ...
    (sci.electronics.repair)
  • Re: Problem retrieving WAVEHDR using USB Audio driver, wince 6.0 Media player
    ... I am playing 16-bit sample. ... media player) are simple audio files taken from PB 6.0 i.e. ring.wav, ... I am using these files to be played using ce media player in CEPC. ... I have no idea of what can happen with your WAVEHDR. ...
    (microsoft.public.windowsce.embedded)
  • Re: [SLE] CD
    ... On Wednesday 15 December 2004 10:40 am, Mitja wrote: ... > I compile by myself arts and now sound works ... > but i have still problem with playing CDs. ... Are you a member of the audio group? ...
    (SuSE)

Loading