Posts: 13
Threads: 0
Joined: Apr 2022
Reputation:
2
I was able to make enough changes to my old programs to get them running. Overall performance seems to have improved enough for some things I wrote off as impossible to move into the realm of viability. and the new audio engine means I can abandon the horrible system I cobbled together out of the winmm library.
A couple of things I noticed with the sound is that SNDBAL doesn't appear to work(no sound change with wiki example), and that SNDPLAYCOPY doesn't appear to copy volume settings like it seemed to previously.
Posts: 29
Threads: 2
Joined: May 2022
Reputation:
0
I ran into a problem with sound files not being played as expected and found this to be the problem :
The old audio backend would return 0 if the sound couldn't be loaded.
The new audio backend will return -1 if the sound can't be loaded.
This wouldn't be a major problem since the check for a valid handle could simply be changed to "IF h& > 0 THEN _SNDPLAY h&" -- however, any programs that were written with the previous (shorter) syntax of "IF h& THEN..." won't work like they used to.
It might be a good idea to make the new audio backend _also_ return a 0 instead of -1.
Also, in the Help File and/or Wiki :
under _SNDOPEN it says "Returns a LONG soundHandle& value to the sound file in memory. A value less than one means the sound could not be loaded". (This could mean 0 _or_ -1.)
Later it says "Always check the handle value returned is greater than zero before attempting to play the sound".
under _SNDPLAY it says "Make sure that the handle& value is not 0 before attempting to play it."
In the example code for checking a handle before playing is : "IF h& THEN _SNDPLAY h&"
This would need to be edited if an invalid handle returns -1 instead of 0.