> I have a list of 15 WAV files that I need to play.
PlaySoundA (int __stdcall PlaySoundA(char *pFile, int x, long fdwSound), use
0 for the second param and 0x20000 for synchronous or 0x20001 for
asynchronous as the third) in winmm.dll can play WAVs synchronously or
asynchronously, but...
> since VEE will be controlling other bits of kit relevant to the
> WAVs at the time,
So asynchronous is the ticket, but...
> I need to have a time stamp that shows start and stop time of
> each file, together with silence between tracks.
Yup, that makes things more difficult. In this case you probably are better
off with the media control. It should be as easy as set the FileName
property to the wav file, set the Notify property to True, and set the
Command property to "Sound". Hm... no. I just tried it and it plays sounds
synchronously. Welp, I don't use this control so maybe I'm missing something
obvious. VEE code was:
mm.FileName = "\\PI100\HD_E\Wavs\afcw-apologize.wav";
mm.Notify = True;
mm.Command = "Sound";
The wave is fairly long so I'm certain it was playing synchronously. I had a
function catch the Done event and VEE was locked until it fired.
Heck I dunno. If you can get away with playing the wavs synchronously I'd
use PlaySoundA. It doesn't waste any time. Something like:
StartTime = Now
PlaySound //VEE stops.
StopTime = Now
...
Silence = Now - StopTime
StartTime = Now
PlaySound //VEE stops.
StopTime = Now
Yadda yadda. There is a way to play asynchronously and get done
notifications but the only way I know how to do this is via sending command
strings directly to the MCI. I'm sure it's doable with the media control but
I don't know how. Basically it should be something like open device WAV,
assign song alias, play song, wait for callback, close device.
I have no experience whatsoever with Media Player - I'm sure that's a viable
route too. I know somebody who built a VB juke box with it and I have it
here somewhere.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
PlaySoundA (int __stdcall PlaySoundA(char *pFile, int x, long fdwSound), use
0 for the second param and 0x20000 for synchronous or 0x20001 for
asynchronous as the third) in winmm.dll can play WAVs synchronously or
asynchronously, but...
> since VEE will be controlling other bits of kit relevant to the
> WAVs at the time,
So asynchronous is the ticket, but...
> I need to have a time stamp that shows start and stop time of
> each file, together with silence between tracks.
Yup, that makes things more difficult. In this case you probably are better
off with the media control. It should be as easy as set the FileName
property to the wav file, set the Notify property to True, and set the
Command property to "Sound". Hm... no. I just tried it and it plays sounds
synchronously. Welp, I don't use this control so maybe I'm missing something
obvious. VEE code was:
mm.FileName = "\\PI100\HD_E\Wavs\afcw-apologize.wav";
mm.Notify = True;
mm.Command = "Sound";
The wave is fairly long so I'm certain it was playing synchronously. I had a
function catch the Done event and VEE was locked until it fired.
Heck I dunno. If you can get away with playing the wavs synchronously I'd
use PlaySoundA. It doesn't waste any time. Something like:
StartTime = Now
PlaySound //VEE stops.
StopTime = Now
...
Silence = Now - StopTime
StartTime = Now
PlaySound //VEE stops.
StopTime = Now
Yadda yadda. There is a way to play asynchronously and get done
notifications but the only way I know how to do this is via sending command
strings directly to the MCI. I'm sure it's doable with the media control but
I don't know how. Basically it should be something like open device WAV,
assign song alias, play song, wait for callback, close device.
I have no experience whatsoever with Media Player - I'm sure that's a viable
route too. I know somebody who built a VB juke box with it and I have it
here somewhere.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
I have a list of 15 WAV files that I need to play. I would like to play them
using VEE, since VEE will be controlling other bits of kit relevant to the
WAVs at the time, e.g. GPIB controlling a relay. I need to have a time stamp
that shows start and stop time of each file, together with silence between
tracks. Apart from using 'Execute PC' to call Windows Media Player (which
introduces time delays) is there a quicker way of doing it ? I am not very
well acquainted with ActiveX. Could I generate a playlist on Media Player,
then run Media Player from VEE ? How do I call up my playlist from VEE ?
Any help is appreciated.
Dan Besgrove
_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".