AnsweredAssumed Answered

VRf-VEE_BEEP

Question asked by VRFuser on Jul 2, 1997
send q VRf-VEE_BEEP ww vrf mkpkor@inet.uni-c.dk

from: Greg Goebel / HP-MXD
      gvg@lvld.hp.com / 970-679-3030 / FAX 970-679-5971
to:   VRf -- Henrik Grevelund
date: Thursday, 03 July 1997 1034 MDT

> Date: Thu, 03 Jul 1997 11:10:16 +0200
> From: Henrik Grevelund <mkpkor@inet.uni-c.dk>
> Subject: Vrf- Problem with Beep
>
> Hello world
>
> With my Vee 3.2 on NT 3.51, i trip over a little
> ting. I tried to make at beep with duration of 3
> seconds, but the beep staied the same, I also tried
> to enter another frequency and volume, nothing but
> the normal Beep.
>
> The machine is a Pentuim 133MHz 32MB Ram and no
> soundcard.
>
> Is this a bug or what, does it apear in V. 4.01 ?

Sort of ... the Win32 API doesn't provide much in the way of BEEP
functionality and so VEE can't generate much of a BEEP. 

We've had a lot of complaints about this, but the lab says there's not much
we can do.

There is a workaround if you have a sound card ... see below.

> Henrik Grevelund
> Minecomponentworkshop
> Royal Danish Navy
> Naval Base Korsoer
> mkpkor@inet.uni-c.dk

--------------------------------- cut here ----------------------------------


[21.13] PLAYING SOUND FILES WITH VEE

* I had been puzzling over the problem of how to get VEE to play sound files
-- typically .WAV files -- on a PC for a long time, but though it was
possible to use the VEE Execute Program object to run the Windows Media
Player ("mplayer.exe") with a .WAV file as a parameter, it would play the
file -- and then stay on the screen.

A customer on the VEE Reflector (bless him and it!) came up with the
solution ... you have to invoke it as:

   c:winmplayer.exe -play -close c:sounds igboom.wav 

-- assuming, of course, that the "mplayer.exe" file is in a directory named
"c:win" and you want to play a .WAV file named "c:sounds igboom.wav".
This brings up the Media Player, which then plays the .WAV file -- and goes
away.

In practice, the VEE code to play different .WAV would look something like
this:

               +-------+
               | Start |
               +---+---+
                   |
  +----------------+----------------+
  |              Text               |
  +---------------------------------+
  | c:winmplayer.exe -play -close +--+   +-------------+
  +---------------------------------+  |   |   Formula   |
                                       +-->+-------------+
  +------------------------+               | A + " " + B +--+
  |          Text          |           +-->+-------------+  |
  +------------------------+           |                    |
  | c:sounds igboom.wav  +-----------+                    |
  +------------------------+                                |
                                                            |
                     +--------------------------------------+
                     |
                     |   +------------------------------------------------+
                     |   |             Execute Program (PC)               |
                     |   +---------+-----------------------------------+--+
                     |   |         | Run Style:          [ Minimized ] |  |
                     +-->| Command | Wait for prog exit: [ Yes ]       |  |
                         |         | Prog with params:   [ c:winmp ] |  |
                         |         | Working directory:  [           ] |  |
                         +---------+-----------------------------------+--+

Notice how the "Run Style" is set to "Minimized" to ensure that the Media
Player only comes up as an icon.

We have successfully run this program on both Win3 and WinNT using PCs with
sound cards.  Experiments with the so-called "Sound Driver for the PC
Speaker" didn't provide very good results -- but then that particular driver
doesn't provide very good results in general.

[%%]

Outcomes