Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speaker in use
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00817316
Message ID:
00818442
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform