Discuss using and improving Lua and the Lua Player specific to the PSP.
	Moderators:  Shine , Insert_witty_name 
			
		
		
			
				
																			
								swordman 							 
									
		Posts:  27 Joined:  Tue Dec 27, 2005 9:04 pm 
		
						
					
													
							
						
									
						Post 
					 
								by swordman  Sat Jul 01, 2006 11:12 pm 
			
			
			
			
			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: Select all 
--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???
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Shine 							 
									
		Posts:  728 Joined:  Fri Dec 03, 2004 12:10 pmLocation:  Germany 
		
						
					
													
							
						
									
						Post 
					 
								by Shine  Tue Jul 04, 2006 11:22 pm 
			
			
			
			
			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: Select all 
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.
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								swordman 							 
									
		Posts:  27 Joined:  Tue Dec 27, 2005 9:04 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by swordman  Sat Jul 08, 2006 5:44 am 
			
			
			
			
			Thanks!!! now all function properly.