| View previous topic :: View next topic |
| Author |
Message |
swordman
Joined: 27 Dec 2005 Posts: 27
|
Posted: Sat Jul 01, 2006 11:12 pm Post subject: Sound Playing |
|
|
Hi all!
I've a problem. I'm trying to stop a program until the end of the current sound.
I want to
-update the screen
-play the sound
-update the screen
I can also update the screenduring playing but the sound ... blah
My current solution is
| Code: |
--while a_sound:playing() do
DrawBackground()
screen:blit(px,py,a_image,0, 0, a_image:width(), a_image:height(), true)
screen.waitVblankStart()
screen.flip()
--end
a_sound:play()
.
.
update the screen
|
PS: if i try to enable the while i've an error "loog in gettable".
What does that mean?
Any Solutions??? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Tue Jul 04, 2006 11:22 pm Post subject: Re: Sound Playing |
|
|
When you are calling "yourSound=Sound.load(...)" and then "yourSound.play()", you'll get a Voice object, on which you have to call playing:
| Code: |
sound = Sound.load("test");
voice = sound:play();
while voice:playing()....
|
If this doesn't work, post a full small sample of your problem, which I can test. |
|
| Back to top |
|
 |
swordman
Joined: 27 Dec 2005 Posts: 27
|
Posted: Sat Jul 08, 2006 5:44 am Post subject: |
|
|
Thanks!!! now all function properly.
Thanks again! |
|
| Back to top |
|
 |
|