1 #include <libchimara/glk.h>
7 if(!glk_gestalt(gestalt_Sound, 0)) {
8 fprintf(stderr, "Sound not supported.\n");
11 if(!glk_gestalt(gestalt_SoundVolume, 0)) {
12 fprintf(stderr, "Sound volume not supported.\n");
16 schanid_t sc = glk_schannel_create(0);
18 fprintf(stderr, "Could not create sound channel.\n");
22 glk_schannel_set_volume(sc, 0x10000);
23 glk_schannel_set_volume(sc, 0x08000);
24 glk_schannel_set_volume(sc, 0x04000);
25 glk_schannel_set_volume(sc, 0x00000);
26 glk_schannel_set_volume(sc, 0xA0000); /* max supported volume */
27 glk_schannel_set_volume(sc, 0xB0000); /* should be coerced */
28 glk_schannel_set_volume(sc, 0x10000);
30 glk_schannel_destroy(sc);