| #include <sys/io.h> #include <unistd.h> void play(unsigned int* freq, unsigned int* delay); main() { int i; unsigned int freq[]={ 330 , 392 , 330 , 294 , 330 , 392 , 330 , 394 , 330 , 330 , 392 , 330 , 294 , 262 , 294 , 330 , 392 , 294 , 262 , 262 , 220 , 196 , 196 , 220 , 262 , 294 , 330 , 262 , 0 } ; unsigned int time[]={ 50 , 50 , 50 , 25 , 25 , 50 , 25 , 25 , 100, 50 , 50 , 25 , 25 , 50 , 50 , 25 , 25 , 100, 50 , 25 , 25 , 50 , 25 , 25 , 50 , 25 , 25 , 100 }; unsigned int freq2[]={ 196,262,262,262,330,294,262,294,330,294,262, 330,394,440,440,394,330,330,262,294,262,294, 330,294,262,230,230,196,262,440,394,330,330, 262,294,262,294,440,394,330,330,394,440,523, 394,330,330,262,294,262,294,330,294,262,230, 230,196,262,440,394,330,330,262,294,262,294, 440,394,330,330,394,440,523,394,330,330,262, 294,262,294,330,294,262,230,230,196,262,0 }; unsigned int time2[]={ 25,38,12,25,25,38,12,25,12,12,56,25,25,50,25, 38,12,12,12,38,12,25,12,12,38,12,25,25,100,25, 38,12,12,12,38,12,25,25,38,12,25,25,100,25,38, 12,12,12,38,12,25,12,12,38,12,25,25,100,25,38, 12,12,12,38,12,25,25,38,12,25,25,100,25,38,12, 12,12,38,12,25,12,12,38,12,25,25,100 }; |