Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speaker in use
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00817316
Message ID:
00818442
Views:
17
Hi Bill,

Multimedia API functions
mmioOpen
mmioClose
mmioDescend
mmioAscend
mmioRead
allow 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 player
http://www.news2news.com/vfp/?example=417

For just playing WAV files there is much more simple in use API function sndPlaySound
How to play a waveform sound
http://www.news2news.com/vfp/?example=251&function=398
Previous
Reply
Map
View

Click here to load this message in the networking platform