My understanding is that the ability to pause a sound was introduced in glk 0.7.4.
As my main machine’s a Mac, my sound-making interpreter is out-of-date Gargoyle and I understand it supports an earlier glk.
At least for purposes of helping me test my game while trying to write in up-to-date sound features, I wondered if my game can distinguish whether it’s running in a glk 0.7.4 interpreter or earlier, soundwise?
Looking at the 0.7.4 spec, it says to test the following gestalt to see if an interpreter has all sound powers (or alternately, not all of them, or none of them, which would both give a 0 if I read this right):
glui32 res;
res = glk_gestalt(gestalt_Sound2, 0);
Then it says the old calls are no longer needed, but you can test them. So I could check the following one to see if an interpreter has the more basic sound powers:
res = glk_gestalt(gestalt_Sound, 0);
Sooo, am I right to think that if I check the first one and get a 1, I’m in glk 0.7.4 and have all powers-
- and that if I check the first one and get a 0, I could then check the second one, and if I get a 1 there, I’m back in an earlier glk, with sound, but without the latest sound code?
(and 0 and 0 would mean no sound at all)
This would help because then I could have the game just stop a sound instead of pause it when running in an interpreter which lacks the ability to pause.
Thanks
-Wade