00001
00002
00003 #include <config.h>
00004 #if defined(CONF_DSOUND)
00005
00006 #include <dsound.h>
00007 #include <tm.h>
00008
00010 static const note_t robots[] = {
00011 { PITCH_D4, 2 } , { PITCH_C4, 1 } , { PITCH_D4, 1 },
00012 { PITCH_F4, 1 } , { PITCH_D4, 1 } , { PITCH_D4, 2 },
00013 { PITCH_F4, 2 } , { PITCH_G4, 1 } , { PITCH_C5, 1 },
00014 { PITCH_A4, 2 } , { PITCH_D4, 2 } , { PITCH_END, 0 }
00015 };
00016
00017 int main(int argc,char *argv[]) {
00018 while (!shutdown_requested()) {
00019 if (wait_event(dsound_finished,0) != 0)
00020 dsound_play(robots);
00021 }
00022 return 0;
00023 }
00024 #else // CONF_DSOUND
00025 #warning robots.c requires CONF_DSOUND
00026 #warning robots demo will do nothing
00027 int main(int argc, char *argv[]) {
00028 return 0;
00029 }
00030 #endif // CONF_DSOUND