delorie.com/archives/browse.cgi | search |
Message-ID: | <3AC84B40.E68D65D9@earthlink.net> |
From: | Martin Ambuhl <mambuhl AT earthlink DOT net> |
X-Mailer: | Mozilla 4.76 [en] (Win95; U) |
X-Accept-Language: | en,zh-CN,fr,de-CH,ru |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: dos sound and cout |
References: | <9a7pk9$vod$1 AT news DOT chatlink DOT com> |
Lines: | 41 |
Date: | Sun, 01 Apr 2001 21:49:30 GMT |
NNTP-Posting-Host: | 63.210.223.64 |
X-Complaints-To: | abuse AT earthlink DOT net |
X-Trace: | newsread2.prod.itd.earthlink.net 986161770 63.210.223.64 (Sun, 01 Apr 2001 14:49:30 PDT) |
NNTP-Posting-Date: | Sun, 01 Apr 2001 14:49:30 PDT |
Organization: | EarthLink Inc. -- http://www.EarthLink.net |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Chris wrote: > > why does it make all the sounds and then > print the frequencies Because you don't synchronize the output with, for example, ' << flush'. > > #include <dos.h> > #include <iostream> > > int main() > > { > int i; > int z; > float a = 1.0594631; > float b = 41.2034; > while(b < 831.61){ > sound(b); > > std::cout.precision(4); > std::cout<<b<<" "; > b*= a; > delay(50); > } > b /= a; > nosound(); > > while(b > 40.0){ > sound(b); > std::cout.precision(4); > std::cout<<b<<" "; > b /= a; > delay(50); > } > nosound(); > return 0; > }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |