Showing Time with PlaySoundAPI

  • Thread starter Thread starter William Ryan
  • Start date Start date
W

William Ryan

Does anyone know how to show the time that corresponds to where you are in a
..wav file when you use the PlaySound API? It appears to run in a different
thread and I can figure out how to know where you are in the file as it
plays. The best I can do is guess the estimated size of the file and roll
out my own, but this is so ugly is not really an option. Any ideas?

Thanks,
Bill
 
PlaySound does not provide that kind of feedback.
You will need to use low-level wave API - consider OpenNETCF.Multimedia
library as your base code for that.
I would disagree with the last statement you made - it is not ugly, and it
is a valid option. You can retrieve the bit rate from the wave file prior to
the playback start and it should give you a reasonable approximation (but of
course not to a particular byte, which is not possible anyway).
 
Alex:

Thanks for the reply. I misspoke when I said it was ugly...I had come up
with method using a timer that was a bit clunky but that's a function of not
really thinking it out in advance.

I have used the MM library from opennetcf.org and really like most of the
stuff. I've had some trouble playing larger files with it though, and
ultimately, my objective is to FF/RW and allow inserts into the file for
editing. I've got the ability to append files now, as well as pause and
concatenate them, but my UI clues to what and where I'm at aren't very good.
Ditto for getting FF/RW to work but I'm still tinkering with it.

Do you have any ideas or links about FF/RW functionality with the voice
recorder?

Thanks again for your response.

Bill
 
Back
Top