Hi Bill,
Multimedia API functions
mmioOpenmmioClosemmioDescendmmioAscendmmioReadallow to open a WAV file and read its chunks (sections).
FMT chunk contains format data: channels, samples per second, bits per sample.
With this data you are able to calculate an average bytes per second value:
[Bytes per Second] = [channels] * [samples per second] * [bits per sample]/8
DATA chunk contains data size in bytes.
So finally:
[Play time] = [data size] / [Bytes per Second]
There is a sample FoxPro code (members area) here showing how to read and play a WAV file:
WAV file playerhttp://www.news2news.com/vfp/?example=417For just playing WAV files there is much more simple in use API function
sndPlaySoundHow to play a waveform soundhttp://www.news2news.com/vfp/?example=251&function=398