delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/23/14:43:30

To: djgpp AT delorie DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: Sound C++ with DJGPP
Message-ID: <19990623.084201.10271.0.vmccar@juno.com>
References: <3768A98B DOT 47FBAC85 AT computerpro DOT com>
<37703244 DOT 48BB0E5C AT computerpro DOT com>
X-Mailer: Juno 1.49
X-Juno-Line-Breaks: 0-52
From: Vince McCarthy <vmccar AT juno DOT com>
Date: Wed, 23 Jun 1999 11:41:23 EDT
Reply-To: djgpp AT delorie DOT com

to use sound(int_Frequency)
#include <stdio.h> /* 
#include <pc.h> /* sound commands */
#include <dos.h>  /* delay command */

declare int A5=1000; /* frequency 1000Hz */
sound(A5); delay(1000); nosound();

turn on sound of 1000Hz for 1 sec(1000ms), then turn off sound.

hope this helps.... 

 Vince    
On Tue, 22 Jun 1999 20:03:00 -0500 paradise AT computerpro DOT com writes:
>hmm...
>
>The problem I'm having with sound( ) and nosound( ) and delay( ) is 
>that I
>don't know the syntax of what goes in ( ).
>
>In replace of sound( int _Frequency)
>ie. sound(A5)?????????? or something??????
>anyone know what I mean
>
>
>
>
>C++
>
>
>
>
>
>Steven Taylor wrote:
>
>> > The library reference on sound says the syntax is:
>> > ------------------------------------------------
>> >     #include <pc.h>
>> >
>> >     void sound(int _frequency);
>> > ------------------------------------------------
>> > _frequency being a number for the tone, I guess.
>> >
>> > I keep getting errors when compiling.
>> > I don't think I'm putting these lines in my code properly.
>> >
>> > Help!!!
>> oh dear. If you're getting a linker error, then you haven't 
>installed DJGPP
>> properly. If you're getting a compiler error, you either haven't 
>read the
>> docs properly or you need to learn how to program in C or C++.
>

___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: http://dl.www.juno.com/dynoget/tagj.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019