+ } else if(strcmp(buffer, "pause") == 0) {
+ glk_put_string("Pausing channel.\n");
+ glk_schannel_pause(sc[0]);
+ } else if(strcmp(buffer, "unpause") == 0) {
+ glk_put_string("Unpausing channel.\n");
+ glk_schannel_unpause(sc[0]);
+ } else if(strcmp(buffer, "ramp") == 0) {
+ glk_put_string("Ramping volume to ");
+ if(ramp == 0) {
+ glk_put_string("HALF.\n");
+ glk_schannel_set_volume_ext(sc[0], 0x8000, 1000, 42);
+ ramp = 1;
+ } else if(ramp == 1) {
+ glk_put_string("FULL.\n");
+ glk_schannel_set_volume_ext(sc[0], 0x10000, 1000, 69);
+ ramp = 0;
+ }
+ } else if(strcmp(buffer, "multi") == 0) {
+ glk_put_string("Playing two sounds. (These will not repeat.)\n");
+ glui32 sounds[NUM_CHANNELS] = { 3, 4 };
+ if(glk_schannel_play_multi(sc, NUM_CHANNELS, sounds, NUM_CHANNELS, 1) < 2) {
+ fprintf(stderr, "Tried to start %d sounds, but not all were successful.", NUM_CHANNELS);
+ finish = 1;
+ }