sound 
Author Message
 sound

Can anyone tell me if their is a way to put sound into a CoBOL program?

I really don't care how crude it is, if it's just a series of signal tone
beeps, it is better than nothing.

                                                                Thank you,

Patrick L. Lykins



Sun, 18 Mar 2001 03:00:00 GMT  
 sound
Fujitsu COBOL V4 includes two routines for adding sound:

  CBL_ALARM_SOUND
  CBL_BELL_SOUND

Fujitsu Software Corporation
Developer Tools Group
Phone: (408) 428-0500
FAX:    (408) 428-0600

Web:   http://www.adtools.com

Quote:

>Can anyone tell me if their is a way to put sound into a CoBOL program?

>I really don't care how crude it is, if it's just a series of signal tone
>beeps, it is better than nothing.

>                                                                Thank you,

>Patrick L. Lykins



Sun, 18 Mar 2001 03:00:00 GMT  
 sound
On Wed, 30 Sep 1998 07:08:41 -0400, Patrick Lykins

Quote:

>Can anyone tell me if their is a way to put sound into a CoBOL program?

>I really don't care how crude it is, if it's just a series of signal tone
>beeps, it is better than nothing.

What compiler are you using and what platform is it running on?

If it's any flavor of text-mode, you're looking at a console bell (check your
manual to see if DISPLAY/ACCEPT have a bell or beep option). On the other hand
if you're running on Windows, your vendor may have provided a library routine
to play wave files (WIN$PLAYSOUND on Acucobol-GT, see I-144) and you can always
call the Windows API.

----
The opinions above are my own and may or may not match those of my employer.



Sun, 18 Mar 2001 03:00:00 GMT  
 sound

Quote:

> Can anyone tell me if their is a way to put sound into a CoBOL program?

> I really don't care how crude it is, if it's just a series of signal tone
> beeps, it is better than nothing.

With MF COBOL running under Windows, try the windows API.  Check if
sound is available and if so, just play away.  This sort of thing - mind
you need to use the copyfile derived from the windows.h file using the
h2cpy utility to pick up the right datatypes and constant values.  If
you need more info, let me know.

      *>   Next, check if sound is available
           move SND-ASYNC to sound-mode
           if sound-enabled                    *> Do we want to try?
               set sound-enabled to false
               call ms-winapi sndPlaySound using
                       by reference init-run-sound
                       by value     sound-mode
                       returning win-return-bool
               on exception
      *>           This is not a basic Windows routine but one from
      *>           the MMSystem, so it may not have been linked in.
                   add MB-OK MB-ICONINFORMATION giving tmp-int
      $if env not = "16bit"
                   add MB-SETFOREGROUND to tmp-int
      $end
                   call ms-winapi MessageBox using
                       by value screen-hand
                       by reference "The sound routine doesn't seem " &
                                 "to be here, but no matter."   & x"00"
                       by reference "TicTac - Running Silently" & x"00"
                       by value tmp-int
                   end-call
               not on exception
                   if win-return-bool = val-true
                       set sound-enabled to true
                   end-if
               end-call
           end-if
and then ...

           move SND-ASYNC to sound-mode
           add SND-NOSTOP to sound-mode
           if sound-enabled
               perform with test after until win-return-bool = val-true
                   call ms-winapi sndPlaySound using
                           by reference init-game-sound
                           by value     sound-mode
                           returning win-return-bool
                   if win-return-bool not = val-true
                       perform zb000-yield
                   end-if
               end-perform
           end-if
           move SND-ASYNC to sound-mode

and working storage has stuff like ..

       77  sound-mode                  usage UINT    value SND-ASYNC.
       77  win-return-bool             usage BOOL.
       78  init-run-sound  value sound-path & "initrun.wav"  & x"00".
       78  init-game-sound value sound-path & "initgame.wav" & x"00".
       01  screen-data value low-values.
        03 screen-hand                 usage HWND.

Martyn.

To reply, remove the two "unspam." from the address.



Mon, 19 Mar 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. clipper dos sound to windows sound card

2. Sound through the sound card for MSWLogo?

3. REXX: Sound.CMD --- simple sound player !

4. sound WAVE sound

5. SOUND-a-SOUND

6. snack sound and multiple sound cards

7. How do you use your sound card and sound VI to get sound levels off a microphone.

8. LOGO-L> Sound through the sound card for MSWLogo?

9. Puget Sound Smalltalk Users Group Meeting 12/5/01

10. Keyboard and Sound questions...

11. Sound Cards!

12. Disabling image save "snapshot" sound

 

 
Powered by phpBB® Forum Software