Direct Sound

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use a trackbar to show progress of a sound file currently being played. So what I thought I would do is this

Have the trackbar's maximum value equal 1. On my timer's tick event, I would have the trackbar's value equal the current play position divided by the lenght of the buffer. I can not find a way to get the lenght of a buffer, so if someone could either tell me a better way to do it, or how to get the lenght of a buffer, please tell me. Thank you.
 
Check this:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2221&lngWId=10
This guy had acontrol for playing sound etc.


Bill English said:
I want to use a trackbar to show progress of a sound file currently being
played. So what I thought I would do is this:
Have the trackbar's maximum value equal 1. On my timer's tick event, I
would have the trackbar's value equal the current play position divided by
the lenght of the buffer. I can not find a way to get the lenght of a
buffer, so if someone could either tell me a better way to do it, or how to
get the lenght of a buffer, please tell me. Thank you.
 
Back
Top