Game Development Community

1.1.0 Mac: alxGetStreamPosition not working?

by Vern Jensen · in Torque Game Builder · 08/29/2006 (1:09 am) · 1 replies

Okay, I"m not sure if this is alxGetStreamPosition failing to work, or if I just don't understand how to use handles. The documentation for alxPlay() says it returns a handle. So I'm trying to pass this to alxGetStreamPosition, but this returns -1 every time, indicating "invalid handle". Am I doing something wrong, or is this a bug? (If I'm doing something wrong, the documentation for the audio files needs to explain handles more clearly, as it currently sounds like you can get a handle from alxPlay and pass that to alxGetStreamPosition).

$gemFallSndHdl = alxPlay(gemFallSnd);
%result = alxGetStreamPosition($gemFallSndHdl);
echo($gemFallSndHdl);
echo(%result);

That will echo values from 1 and up for the $gemFallSndHdl, but always -1 for %result.

#1
08/29/2006 (1:13 am)
Note: I just tried using alxIsPlaying() using the same sound handle, and it always returns 1 as expected, so *that* function works. It seems that, indeed, alxGetStreamPosition is not working at all then.