Audio Question: Pause
by Tim Kin Chu · in Torque Game Builder · 10/09/2006 (10:02 pm) · 8 replies
How to pause the audio. and resume it later?
#2
I know when I get to seriously doing the audio for my game I'll need to add a bunch of little utility functions like that. If GG hasn't already added it by then, I'll put up a resource.
10/17/2006 (1:10 pm)
I just looked through the source and it doesn't look like it's possible from script right now. On the surface it's something that's pretty easy to implement in source since it's basically just a call to alSourcePause, and then make sure that having a new audio state doesn't screw up other function that only expect the current state to be PLAY or STOP.I know when I get to seriously doing the audio for my game I'll need to add a bunch of little utility functions like that. If GG hasn't already added it by then, I'll put up a resource.
#4
10/17/2006 (3:40 pm)
Ah, even better :) Thanks Michael!
#6
I assume it's up to the TGE gang to get it incorporated and TGB will naturally follow suit. Perhaps filing a suggestion or a bug report might push it onto their todo list though. I'm not sure how GG decides in general what resources make it into the official package.
10/18/2006 (12:15 pm)
AFAIK, TGB uses the audio core from TGE so there should be no problems. I tried it out and it does compile without a hitch and it pauses sounds fine (very limited testing).I assume it's up to the TGE gang to get it incorporated and TGB will naturally follow suit. Perhaps filing a suggestion or a bug report might push it onto their todo list though. I'm not sure how GG decides in general what resources make it into the official package.
#7
@@
it will stop not pause.
and unpause will play the audio again.
10/19/2006 (3:34 am)
Oh....... I add the code to 1.11. and it did not work..........@@
it will stop not pause.
and unpause will play the audio again.
#8
Are you using alxUnpause() to resume playing? Because using alxPlay() (which I did at first) will start a new copy of the sound playing at the beginning and leave the original one paused.
10/19/2006 (7:41 am)
I double checked, and it's resuming at the right point for me.Are you using alxUnpause() to resume playing? Because using alxPlay() (which I did at first) will start a new copy of the sound playing at the beginning and leave the original one paused.
Torque Owner Tim Kin Chu
Default Studio Name