QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

loadin sounds

This is a discussion on loadin sounds within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi all I am using luaplayerHM7 RC1 and when i want to load a sound it gives a error when ...

Reply
 
LinkBack Thread Tools
Old 06-17-2009, 06:10 AM   #1
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default loadin sounds

Hi all I am using luaplayerHM7 RC1
and when i want to load a sound it gives a error
when i try t in luaPlayerhm2 it don't gives a error
Kinda weird can someone help me out..
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 06:23 AM   #2

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

sure.
post the code and i will take a look at it
HM
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases

homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 06:47 AM   #3
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by homemister91 View Post
sure.
post the code and i will take a look at it
HM
YOu mean the code of loading the sound, where the error takes place...
well simple

Code:
Sound.load("swordslash.wav")

Last edited by Predricted; 06-17-2009 at 06:58 AM..
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 07:00 AM   #4

Developer
 
seanpaul223's Avatar
 
My Mood: Psychedelic
Join Date: Dec 2007
Location: B.F.
Posts: 308
Trader Feedback: 0
Default

Just act like this:

Code:
System.oaenable()
Sound.load("yourStuff.wav")
--code
--code
System.oadisable()--when you have fisished playing sounds
I advise you to create only ONE thread where you'll post your questions instead of making new threads anytime.Seems to me you have many things to ask.
__________________
00:00: Windows is loading...Come back tomorrow.
01:00 : Booting done.Not yet errors encountered...
01:10: Fatal error.Windows has been detected on logical drive
01:22: Keyboard Locked, try everything.
01:42 : Mouse Device Pilot not found, or uninstalled.Press Left-Bouton to continue.
01:50 : Ending User session.Do you want to play another game ?
01:59: Not enough memory.Only 508'312'583 bytes available.
02:00 : System is shutting Down.
seanpaul223 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 07:39 AM   #5
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by seanpaul223 View Post
Just act like this:

Code:
System.oaenable()
Sound.load("yourStuff.wav")
--code
--code
System.oadisable()--when you have fisished playing sounds
I advise you to create only ONE thread where you'll post your questions instead of making new threads anytime.Seems to me you have many things to ask.
kay I will follow that adivise of you
btw thnx that fixed the problem but now there comes another problem
I went from LuaplayerHM2 too LuaplayerHM7 RC1 so there are things that causes errors...
The next error I get is:
Argument error: image:blit() takes 3,4,7 or 8 arguments and MUST be called with a colon

I tried screen:blit but it still shows the same error...

code is :
screen.blit(0,0-storyy,storyimg0)
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 08:02 AM   #6

Developer
 
seanpaul223's Avatar
 
My Mood: Psychedelic
Join Date: Dec 2007
Location: B.F.
Posts: 308
Trader Feedback: 0
Default

Basically Image:blit() function must be called this way:

Code:
image:blit(x, y, ImageSource, [sourcex, sourcey, width, height], [alpha = true])
X and Y are the coordinates where you want to blit your Image
ImageSource is The variable where you previously loaded the picture.
[sourcex , sourcey,width & height] are optional: they are the position in the source image, from where a rectangle of the size width/height is copied.
[alpha = true] is also optional.

Then what you have to check out is that:
  • stroryy must be a number
  • you must have loaded previously an picture into stroyimg0 variable.

Do not ask everytime answers to basic problems of code such like this, just find a way to solve'em yourself and if it seems really ambiguous, then ask.This is the only way you'll learn more.

And pay attention to this Link
__________________
00:00: Windows is loading...Come back tomorrow.
01:00 : Booting done.Not yet errors encountered...
01:10: Fatal error.Windows has been detected on logical drive
01:22: Keyboard Locked, try everything.
01:42 : Mouse Device Pilot not found, or uninstalled.Press Left-Bouton to continue.
01:50 : Ending User session.Do you want to play another game ?
01:59: Not enough memory.Only 508'312'583 bytes available.
02:00 : System is shutting Down.
seanpaul223 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 08:08 AM   #7
Enter Custom Title
 
dan369's Avatar
 
Join Date: Jan 2008
Real First Name: Dan
Location: Wales, cardiff
Just Played: Overlord 2
Posts: 1,306
Blog Entries: 1
Trader Feedback: 0
Default

Agree with sean, you need to figure more things out for yourself. Though that link is a bit outdated.
dan369 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 08:30 AM   #8
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by dan369 View Post
Agree with sean, you need to figure more things out for yourself. Though that link is a bit outdated.
Thats true and I always use google before i start asking questions here..
But the problem is that i normally I use luaplayer v0.20 and those little functions
are different in each luaplayer.. I made my code with luaplayerHMV2 but i found out that The music play function in v2 is bugged so i wanted to translate my code to LUaplayerhm7 RC1 and searching all those little functions which I have to change is imposible...
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 09:59 AM   #9

Developer
 
seanpaul223's Avatar
 
My Mood: Psychedelic
Join Date: Dec 2007
Location: B.F.
Posts: 308
Trader Feedback: 0
Default

I'm pretty sure that Homemister always releases any LPHM version with a Txt file which lists the main functions.You should have read it before.
__________________
00:00: Windows is loading...Come back tomorrow.
01:00 : Booting done.Not yet errors encountered...
01:10: Fatal error.Windows has been detected on logical drive
01:22: Keyboard Locked, try everything.
01:42 : Mouse Device Pilot not found, or uninstalled.Press Left-Bouton to continue.
01:50 : Ending User session.Do you want to play another game ?
01:59: Not enough memory.Only 508'312'583 bytes available.
02:00 : System is shutting Down.
seanpaul223 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 02:14 PM   #10
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by seanpaul223 View Post
I'm pretty sure that Homemister always releases any LPHM version with a Txt file which lists the main functions.You should have read it before.
Thats true but in the functions txt file you cannot find how to use every function.. Thats one thing another thing is that not all functions are written in this text file I couldn't find anything about image.bliting
-=Double Post Merge =-
Quote:
Originally Posted by seanpaul223 View Post
Basically Image:blit() function must be called this way:

Code:
image:blit(x, y, ImageSource, [sourcex, sourcey, width, height], [alpha = true])
X and Y are the coordinates where you want to blit your Image
ImageSource is The variable where you previously loaded the picture.
[sourcex , sourcey,width & height] are optional: they are the position in the source image, from where a rectangle of the size width/height is copied.
[alpha = true] is also optional.

Then what you have to check out is that:
  • stroryy must be a number
  • you must have loaded previously an picture into stroyimg0 variable.

Do not ask everytime answers to basic problems of code such like this, just find a way to solve'em yourself and if it seems really ambiguous, then ask.This is the only way you'll learn more.

And pay attention to this Link
I found the problem LuaplayerHM7 RC1 do not use image.blit() function
But you must enter screen.blit() i just forgot to replace . with : .

But back to the sound problem...
When i do my sound code like this
Code:
soundplay=soundplay+1
System.oaenable()
if soundplay == 400 then
Music.playFile("music/background/bgmusic1.mod", true)
sanviastoryvc=Sound.load("music/voices/sanviastory.wav")
local sound = sanviastoryvc
voice=sound:play()
end
System.oadisable()
it will freeze the game when soundplay==1

and when I use it like this

Code:
if soundplay == 400 then
System.oaenable()
Music.playFile("music/background/bgmusic1.mod", true)
sanviastoryvc=Sound.load("music/voices/sanviastory.wav")
local sound = sanviastoryvc
voice=sound:play()
System.oadisable()
end
it will just play the sound when soundplay==400 and thats just for one second....
Does someone know how to use it?

Last edited by Predricted; 06-17-2009 at 02:57 PM.. Reason: Automerged Doublepost
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 04:32 PM   #11
Enter Custom Title
 
dan369's Avatar
 
Join Date: Jan 2008
Real First Name: Dan
Location: Wales, cardiff
Just Played: Overlord 2
Posts: 1,306
Blog Entries: 1
Trader Feedback: 0
Default

What are you trying to do?
dan369 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 05:05 PM   #12
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by dan369 View Post
What are you trying to do?
This code will freeze the game when soundplay==1
Code:
soundplay=soundplay+1
System.oaenable()
if soundplay == 400 then
Music.playFile("music/background/bgmusic1.mod", true)
sanviastoryvc=Sound.load("music/voices/sanviastory.wav")
local sound = sanviastoryvc
voice=sound:play()
end
System.oadisable()

This code will play music file and sound file when soundplay==400 so just for a second and then it stops the music and sound file
Code:
if soundplay == 400 then
System.oaenable()
Music.playFile("music/background/bgmusic1.mod", true)
sanviastoryvc=Sound.load("music/voices/sanviastory.wav")
local sound = sanviastoryvc
voice=sound:play()
System.oadisable()
end
This is the begin movie of the game and there is some guy telling a story
and the while that guy is talking I want to use background music..
the wav file is the voice of the guy thats talking and the .mod file is the backgroundmusic

Last edited by Predricted; 06-17-2009 at 05:32 PM..
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 09:36 PM   #13

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

you should only call System.oaenable() once. If you call it multaple times then it can error out. So just call it at the beginning of the lua file
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases

homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-17-2009, 11:31 PM   #14
 
Join Date: Feb 2008
Posts: 217
Trader Feedback: 0
Default

Hey.

Just a tip, if you want help about LPHM, head over to LPHM forums.



-Light_AleX
Light_AleX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-18-2009, 12:43 AM   #15

Developer
 
seanpaul223's Avatar
 
My Mood: Psychedelic
Join Date: Dec 2007
Location: B.F.
Posts: 308
Trader Feedback: 0
Default

Use System.oaenable() just once.
Then set a time interval for the sound.
Just asserts values to its bounds.
Code:
local LeftBound,RoghtBound
if soundplay > LeftBound and soundplay < RightBound then...
--code
end
__________________
00:00: Windows is loading...Come back tomorrow.
01:00 : Booting done.Not yet errors encountered...
01:10: Fatal error.Windows has been detected on logical drive
01:22: Keyboard Locked, try everything.
01:42 : Mouse Device Pilot not found, or uninstalled.Press Left-Bouton to continue.
01:50 : Ending User session.Do you want to play another game ?
01:59: Not enough memory.Only 508'312'583 bytes available.
02:00 : System is shutting Down.
seanpaul223 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-18-2009, 04:45 AM   #16
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Quote:
Originally Posted by Light_AleX View Post
Hey.

Just a tip, if you want help about LPHM, head over to LPHM forums.



-Light_AleX
That forum looks dead
-=Double Post Merge =-
Quote:
Originally Posted by homemister91 View Post
you should only call System.oaenable() once. If you call it multaple times then it can error out. So just call it at the beginning of the lua file
Thanks Guys that helped

Last edited by Predricted; 06-18-2009 at 05:09 AM.. Reason: Automerged Doublepost
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-19-2009, 04:14 PM   #17
 
Join Date: May 2008
Posts: 93
Trader Feedback: 0
Default

Does someone know how to encrypt compile lua files from luaplayerhm ??? I tried luac.exe but it gives error:

luac: '}' expected;
last token read: '=' at line 284 in file 'script.lua'

Last edited by Predricted; 06-19-2009 at 05:12 PM..
Predricted is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
loadin , sounds

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 10:09 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us