User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:dos.h:sound

sound

description of sound

Producessound of a specified frequency.
mostly used for adding music to c program
random values and delay needed to make some strange sounds.

#include<stdio.h>
#include<dos.h>
 
int main(void)
{
   int i;
   for ( i = 42 ; i <= 4200 ; i ++  )
   {
      i = i + rand(100);
      sound(i);
      delay(50);
   }
   nosound();
 
   return 0;
}

output of sound c example

  Strange sounds 

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/dos.h/sound.txt · Last modified: 2024/02/16 01:06 (external edit)

Impressum Datenschutz