News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Miscellaneous Forum
 
Using the WaveFile class

Reply

by Todd Nirenstein
posted on 2003/10/11

I downloaded and used the WaveFile class and I had a question about the Position property. I want to start x seconds into the playback of the .wav file but I can't figure out the conversion between Position units and seconds. Is there a formula I can use? More easily said, how many Position units equal 1 second???

Thanks so much in advance. This class has been really really helpful!

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2003/10/12
Reply

The number of Position units that equals a second depends from WAVE file to WAVE file. It depends on the sample rate, the size of the samples and the number of channels.
I've uploaded a new version of the WaveFile class that has two methods that can do the conversion. The methods are called ToByteOffset and ToMilliSeconds. You can download the new version of the class from http://www.mentalis.org/soft/class.qpx?id=14

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.