Question about glk_schannel_play_multi

I’ve been implementing full Glulxe sound features into Bisquixe to the best of my ability, although it’s much more complicated than anything else I’ve had to do (and is the last thing I plan on doing)!

So far I’ve got channels working more or less, with Daniel Stelzer’s Music extension that adds multiple channels working well (playing a new sound on the current channel stops the old sound, but playing on different channels works fine).

But I’m hesitant on implementing glk_schannel_play_multi, as I can’t figure out the true specifications. The Glk Spec guide I’ve been using says it should pass two arrays, a number representing the length of the arrays, and a notify flag.

But Quixe’s prototype doesn’t include the length of the array.

Searching github, I can’t find any repositories with extensions using this function, but I see a lot of implentations, and they all differ, with one even having the length of the channel list and sound list included separately, giving 5 inputs.

Which specification should I use when creating this function, and are there any ‘test’ files I can use to check out if I did it right?

That’s because in Quixe you pass an actual array, rather than a pointer and length as you would in the C API. This is the same for all array functions in GlkApi.

1 Like

You should be able to test it with Soundtest.gblorb:

1 Like

Thank you! I’ll check that out.

FYI, I wrote up a doc about how the JS Glk API differs from what you’d expect in C or Inform:

3 Likes