![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
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 ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#2 |
![]() ![]() Developer
|
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 D² |
|
|
|
|
|
#3 |
![]() |
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.. |
|
|
|
|
|
#4 |
![]() ![]() Developer
|
Just act like this:
Code:
System.oaenable()
Sound.load("yourStuff.wav")
--code
--code
System.oadisable()--when you have fisished playing sounds
__________________
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. |
|
|
|
|
|
#5 | |
![]() |
Quote:
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) |
|
|
|
|
|
|
#6 |
![]() ![]() Developer
|
Basically Image:blit() function must be called this way:
Code:
image:blit(x, y, ImageSource, [sourcex, sourcey, width, height], [alpha = true]) 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:
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. |
|
|
|
|
|
#8 | |
![]() |
Quote:
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... |
|
|
|
|
|
|
#9 |
![]() ![]() Developer
|
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. |
|
|
|
|
|
#10 | ||
![]() |
Quote:
-=Double Post Merge =- Quote:
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()
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
Does someone know how to use it? Last edited by Predricted; 06-17-2009 at 02:57 PM.. Reason: Automerged Doublepost |
||
|
|
|
|
|
#12 |
![]() |
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
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.. |
|
|
|
|
|
#13 |
![]() ![]() Developer
|
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 D² |
|
|
|
|
|
#14 |
![]() |
|
|
|
|
|
|
#15 |
![]() ![]() Developer
|
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. |
|
|
|
|
|
#16 | ||
![]() |
Quote:
-=Double Post Merge =- Quote:
Last edited by Predricted; 06-18-2009 at 05:09 AM.. Reason: Automerged Doublepost |
||
|
|
|
|
|
#17 |
![]() |
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.. |
|
|
|
![]() |
| Tags |
| loadin , sounds |
| Thread Tools | |
|
|