Homebrew [Release] Lua Player Plus 3DS (lpp-3ds) - LUA interpreter for 3DS

LiquidFenrir

Well-Known Member
Newcomer
Joined
Jan 15, 2016
Messages
90
Trophies
0
XP
627
Country
France
Rinnegatamante said:
Problem is probably in your debugPrint. Before calling any kind of printing function (for Screen module) you have to call at least once Screen.refresh()

Thanks, that fixed it! I still have a weird problem though, sometimes the text that I told to write on the top screen gets printed on the bottom screen, I restart the screen and both screens are black, I restart it once more and it finally works. What's the logic behind that? Is there something I do wrong or just pure randomness
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

LiquidFenrir

Well-Known Member
Newcomer
Joined
Jan 15, 2016
Messages
90
Trophies
0
XP
627
Country
France
So I changed my code (updated the pastebin), and it makes the first "hello" appear light grey and blink really fast on the beginning. if I press A the top screen doesn't clear, nothing appears on the bottom one but I'm in the keyboard loop and can type stuff.
Is that normal? or did I mess with something again
 
Last edited by LiquidFenrir,

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
So I changed my code (updated the pastebin), and it makes the first "hello" appear light grey and blink really fast on the beginning. if I press A the top screen doesn't clear, nothing appears on the bottom one but I'm in the keyboard loop and can type stuff.
Is that normal? or did I mess with something again

To solve the blinking issue you should print twice your text cause double buffering updating screens between the two calls. You can use this function to do it automatically: https://github.com/Rinnegatamante/Sunshell/blob/master/LUA/scripts/funcs.lua#L301-L308
 

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,081
Country
Brazil
Try to add a descriptor forcing csnd:SND usage. (There is a pre-builded one in r4 release)

Yeah, using CSND fixed the stuttering, but Sound.updateStream() seems to be bugged on R4. Music is looping at 3 secs and if you do any action during the loop the game freezes (but the loop continues)

To solve the blinking issue you should print twice your text cause double buffering updating screens between the two calls. You can use this function to do it automatically: https://github.com/Rinnegatamante/Sunshell/blob/master/LUA/scripts/funcs.lua#L301-L308

You could include this solution in the Documentation as a warning to the printing functions, I'm willing to bet more people will run into this issue haha xD
 
Last edited by phalk,

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Yeah, using CSND fixed the stuttering, but Sound.updateStream() seems to be bugged on R4. Music is looping at 3 secs and if you do any action during the loop the game freezes (but the loop continues)



You could include this solution in the Documentation as a warning to the printing functions, I'm willing to bet more people will run into this issue haha xD

Any modern console platform uses double buffering (PSP, PSVITA, N3DS and so on) so it should be normal to print twice something on screen.
 

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,081
Country
Brazil
Yeah, it's a music track. But the ogg file is very little, less than 1MB (low bit rate).

I'll try with a bigger file... Just a sec.

--------------------- MERGED ---------------------------

updateStream works fine to me. Is the file you're using big enough? (Using streaming for sound like 4-5 secs is just useless and make the whole thing unstable).

Yep! The problem were with my ogg files.
If you want to try to reproduce the problem yourself so you can try to fix it, all my ogg files were converted to 11025Hz Mono tracks (for really small file sizes lol).

With a 44100Hz Stereo ogg file the problem was solved on LPP R4. (The problem persists on Nightly, though).
 

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,081
Country
Brazil
Yeah yeah, it's me once again for your despair.

Is Sound.isPlaying working with CSND on R4?

I'm having difficulties playing WAV sounds while playing OGG music in the background with CSND, so I'm trying to pause the OGG while the WAV is being played and then resume playing the OGG from where it stopped, but I can't get it to work because Sound.isPlaying is always returning false :/

Ideally, I would like to play both at the same time with CSND, but that is asking a little too much I guess.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Yeah yeah, it's me once again for your despair.

Is Sound.isPlaying working with CSND on R4?

I'm having difficulties playing WAV sounds while playing OGG music in the background with CSND, so I'm trying to pause the OGG while the WAV is being played and then resume playing the OGG from where it stopped, but I can't get it to work because Sound.isPlaying is always returning false :/

Ideally, I would like to play both at the same time with CSND, but that is asking a little too much I guess.

You can reproduce how much music files you want but only one can be reproduced with streaming feature. Also you shouldn't open two music files together with both streaming feature.
 

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,081
Country
Brazil
You can reproduce how much music files you want but only one can be reproduced with streaming feature. Also you shouldn't open two music files together with both streaming feature.

Yeah, but when I play a WAV (not streaming) file while streaming OGG audio in the background it seems to break the streaming.
The last second of the WAV file gets stuck inside a 3 second loop with the streamed audio in the background and it stops refreshing the stream. (Again, I'm using release 4)

--------------------- MERGED ---------------------------

Yeah, but when I play a WAV (not streaming) file while streaming OGG audio in the background it seems to break the streaming.
The last second of the WAV file gets stuck inside a 3 second loop with the streamed audio in the background and it stops refreshing the stream. (Again, I'm using release 4)

NVM.
I got it to work with a work around (using timers).
 

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country
I'm once again going to try compile this because I need to compile it so I can make a CIA and I get this.
Code:
vshader.v.pica
make[1]: picasso: Command not found
make[1]: *** [vshader.v.pica.o] Error 127
make: *** [build] Error 2
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,081
Country
Brazil
I just noticed Screen.flipImage() flips the image vertically.

Is there a way to flip the image horizontally?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty
    what are you looking at?
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
  • K3Nv2
    Xdqwerty @ Xdqwerty: @BakerMan, it wasnt aimed at you but ok