mirror of
https://github.com/vbatts/bitorchestra.git
synced 2024-11-23 09:05:41 +00:00
another sound...
This commit is contained in:
parent
0ec9dee6bb
commit
681343ff88
4 changed files with 17 additions and 2 deletions
5
f7.c
Normal file
5
f7.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "sounds.h"
|
||||
int main() {
|
||||
sound_loop_1(sound_7,0);
|
||||
}
|
||||
// vim:set sw=2 sts=2 et ai:
|
7
main.c
7
main.c
|
@ -7,7 +7,7 @@
|
|||
#include "sounds.h"
|
||||
|
||||
void usage(char* name, int exit_stat) {
|
||||
fprintf(stderr, "Usage: %s [-f filename] < -s 1-6 >\n", name);
|
||||
fprintf(stderr, "Usage: %s [-f filename] < -s 1-7 >\n", name);
|
||||
exit(exit_stat);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ int main(int ac, char* av[]) {
|
|||
}
|
||||
|
||||
if (sound_choice == 0) {
|
||||
fprintf(stderr, "ERROR: pleaese choice a sound (currently 1-6)\n");
|
||||
fprintf(stderr, "ERROR: pleaese choice a sound (currently 1-7)\n");
|
||||
usage(av[0], EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,9 @@ int main(int ac, char* av[]) {
|
|||
case 6:
|
||||
sound_loop_1(sound_6, 0);
|
||||
break;
|
||||
case 7:
|
||||
sound_loop_1(sound_7, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
6
sounds.c
6
sounds.c
|
@ -48,4 +48,10 @@ int sound_6(int t) {
|
|||
return ((30000000000/(y)&1)*35+(x)*y/400000000+((t>>8^t>>10|1>>14|x)&63));
|
||||
}
|
||||
|
||||
int sound_7(int t) {
|
||||
int i;
|
||||
i=t<<2*(t^t*2);
|
||||
return (((t&(t>>i)))^(t*("salve munde"[t>>13&7]&15))/12&32);
|
||||
}
|
||||
|
||||
// vim:set sw=2 sts=2 et ai:
|
||||
|
|
1
sounds.h
1
sounds.h
|
@ -9,6 +9,7 @@ int sound_3(int t);
|
|||
int sound_4(int t);
|
||||
int sound_5(int t);
|
||||
int sound_6(int t);
|
||||
int sound_7(int t);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue