forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sound Playing

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
swordman



Joined: 27 Dec 2005
Posts: 27

PostPosted: Sat Jul 01, 2006 11:12 pm    Post subject: Sound Playing Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Tue Jul 04, 2006 11:22 pm    Post subject: Re: Sound Playing Reply with quote

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
View user's profile Send private message
swordman



Joined: 27 Dec 2005
Posts: 27

PostPosted: Sat Jul 08, 2006 5:44 am    Post subject: Reply with quote

Thanks!!! now all function properly.
Thanks again!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group