X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=tests%2Fsoundtest.c;h=a4aae14f3b7f102b8977a8bdaeccea91377de1c7;hb=0a6b83f80b277780a2c23aaa9c2c433a234f16b3;hp=18c36fa7a857e6c0eb6386715dc26c2d5e89baee;hpb=24f606be7ff02b0267401f1eb6373d3a8a6d11e0;p=projects%2Fchimara%2Fchimara.git diff --git a/tests/soundtest.c b/tests/soundtest.c index 18c36fa..a4aae14 100644 --- a/tests/soundtest.c +++ b/tests/soundtest.c @@ -1,5 +1,6 @@ #include #include +#include void glk_main(void) @@ -18,14 +19,23 @@ glk_main(void) fprintf(stderr, "Could not create sound channel.\n"); return; } + + if(!glk_schannel_play(sc, 0)) { /* resource number doesn't matter right now */ + fprintf(stderr, "Could not start sound channel.\n"); + return; + } glk_schannel_set_volume(sc, 0x10000); + sleep(1); glk_schannel_set_volume(sc, 0x08000); + sleep(1); glk_schannel_set_volume(sc, 0x04000); + sleep(1); glk_schannel_set_volume(sc, 0x00000); glk_schannel_set_volume(sc, 0xA0000); /* max supported volume */ glk_schannel_set_volume(sc, 0xB0000); /* should be coerced */ glk_schannel_set_volume(sc, 0x10000); - + + glk_schannel_stop(sc); glk_schannel_destroy(sc); }