Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fbs777

Pages: [1]
1
Scripting / Re: How to play a sound "n" seconds after the layout start?
« on: October 01, 2016, 05:14:34 PM »
try updating your Start function in StartLayoutAudio to this:

Code: [Select]
function Start( ttime ) {
if ( active && (ttime >= starttime ) )
                {
sound.playing = true;
active = false;
                }
                Timer( ttime );
}
Yes, now its working, thank you guys

2
Scripting / Re: How to play a sound "n" seconds after the layout start?
« on: August 19, 2016, 12:08:19 AM »
Untested, best I can do. Something like this. In a hurry before work.

Edit: forgot add ticks callback for timer function
Thank you, you even added an option to modify the path and timer in the display menu, but unfortunately this dont worked too.

This is the code without options in the display menu testing with 5 seconds of delay declared:

Code: [Select]
class StartLayoutAudio {
active = false;
time =0;
delay = null;
starttime =0;
sound = null;

constructor( path, sec ) {
delay = sec.tointeger()*1000;

sound = fe.add_sound( path );

sound.playing = false;

fe.add_transition_callback( this, "Trigger" );
fe.add_ticks_callback( this, "Start" );
}

function Timer( ttime ) {
time = ttime;
}

function Trigger( ttype, var, ttime ) {
switch ( ttype ) {
case Transition.StartLayout:
starttime = time + delay;
active = true;
break;
}
}

function Start( ttime ) {
if ( active && (ttime >= starttime ) )
sound.playing = true;
active = false;
}
}

local start_layout_audio = StartLayoutAudio( "sound.mp3", "5" );

Using this code the sound doesnt play in anytime and dont show any error on the console

The only way to work is changing the delay value to "1" or "2" ("3" or any number higher will not work) but the sound will play just after start the layout...

If i change the >= in the line    if ( active && (ttime >= starttime ) ) the result is:
from ">=" to "<=", "<", or "=": The sound starts with zero delay
from ">=" to ">", or "==": The sound doesnt play in anytime

3
Scripting / Re: How to play a sound "x" seconds after the layout start?
« on: August 18, 2016, 12:34:06 AM »
Try something like the following.

Code: [Select]
local sound = fe.add_sound( "sound.mp3" );
sound.playing=false;
fe.add_transition_callback( "sound" );
function sound( ttype, var, ttime ) {
  switch ( ttype ) {
    case Transition.StartLayout:
      if ( sound.playing == flase) sound.playing = true;
    break;
  }
}
Sorry, but where is the code to declare the amount of time to wait before the mp3 starts?
And as i said before, using the "case Transition.StartLayout:" will work almost as expected, but this is inside the Transition.StartLayout, so none of the layers/surfaces will start until the code reach the time declared


Maybe the title of this topic is a bit confuse because the "x" instead of "n", so i will write again: How to play a sound 30 seconds after the layout start?

The point is: how to use an delay option like the delay = n used in the animation module to declare the amount of time (in miliseconds since the layout start) to wait to execute the command?

4
Scripting / Re: How to play a sound "x" seconds after the layout start?
« on: August 17, 2016, 04:51:45 PM »
i have tried a lot of things and nothing works
Btw, i dont want to play in loop, just once

this will play the file once just after start the layout:
Code: [Select]
local sound = fe.add_sound( "sound.mp3" );local i=0; i<30000; i++;
if ( i = 30000 ) {
sound.playing=true;
}

this will try to play the file every single milisecond just after start the layout:
Code: [Select]
fe.add_ticks_callback( this, "_timer" );
local timer = 0;
function _timer( ticks ) {
timer = ticks;
if ( timer = 30000 ) {
local sound = fe.add_sound( "sound.mp3" );
sound.playing=true;
return false;
}
else
{

return false;
   }
}


This will work almost as expected, but this is inside the Transition.StartLayout, so none of the layers/surfaces will start until the time "x", so its useless...
Code: [Select]
fe.add_transition_callback( "orbit_transition" );
function orbit_transition( ttype, var, ttime )
{
switch ( ttype )
{
case Transition.StartLayout:
if ( ttime < 30000 ) {
return true;
}
else
{
local sound = fe.add_sound( "sound.mp3" );
sound.playing=true;
return false;
                }
break;
}
return false;
}

This is even worse because will wait for the "x" time before load any layout content, so is even more useless:
Code: [Select]
local sound = fe.add_sound( "sound.mp3" );
for ( local i=0; i<30000; i++ )
sound.playing=true;

5
Scripting / How to play a sound "n" seconds after the layout start?
« on: August 17, 2016, 01:17:31 AM »
Im trying to do this without success. I want to start the layout then after "x" seconds call the mp3:

local sound = fe.add_sound( "sound.mp3" );
sound.playing=true;

6
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: June 10, 2016, 10:30:04 AM »
@omegaman

Im using the v.03 floob's image on framebuffer.

Quote
And, the wheel art is probably going to be a little more sluggish than say on the rpi3
yeah, but i think its because the flyer is loading in every scroll so the bgart.trigger = Transition.EndNavigation isnt working as expected. If you press and hold the down key you will see the flyers changing too instead to stay in the last game selected before press the button. In a faster system this isnt noticiable, but in a slow system this can do the same slowdown effect as trying to update the videos in every wheel change.

But i tried the efraimsangil's aburner2.flv w/ the same resolution and a similar bitrate comparing with the aburner2.mp4 from emumovies and its working fine, so maybe the problem is just with some .mp4 files


@efraimsangil

Where did you get the .flv movies version? I have the emumovies and the pleasuredome packs but both are .mp4 files. Im downloading right now the videos for hyperspin on progettosnaps to see if this is .flv version
First i tried to convert the mp4 videos to flv but but i got errors in some videos using the format factory...

edit: i found in the pleasuredome an old flv pack. Im downloading to test

7
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: June 09, 2016, 11:45:38 PM »
No, the new layout.nut dont change anything. Dont matter the wheel speed value, tested here even with 400ms and just make the transition slower with the same video bug.

And the wheel scroll with panscan enabled is a lot slower. When scrolling i can see the flyers of each game while scrolling , so the line bgart.trigger = Transition.EndNavigation; isnt working as expected and maybe the search for flyers in each wheel scroll instead of only after stop to scroll is causing the slowdown.

Maybe im having more videos with problem here because i have a raspberry pi 2, not a rpi 3...

I tried more gpu ram changing from 256 to 512 but nothing changed...

This is a short video with this new layout.nut and with video snaps instead the flyer to see the same video working fine in the background:

https://vimeo.com/170120359

8
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: June 08, 2016, 12:13:15 AM »

Hmmmm I am keep testing. I think that robospin use a "bug module". Because I have ALL videos (mp4 / flv) working perfectly in Nevato. Only I have problem with robospin.

Maybe I'm saying nonsense, but the result of the tests is that.

Thanks @omegaman
yes, this is a bug module in the pan-and-scan module, or at least a bad use of this module on the robospin-betanew.

Is easy to see the bug:
open the layouts/robospin-betanew/layout.nut and change the line 53

from:
local bgart = PanAndScanArt( "flyer", 0, 0, flw, flh);

to:
local bgart = PanAndScanArt( "snap", 0, 0, flw, flh);

Or download the attached layout.nut

In the layout options choose the panscan to show flyers:
Select bg image or panscan = panscan

and:
background scanline = none

You will see another video instead the flyer in the background, and this second video will not turn in gray, only the normal cabinet video. (Of course both videos will turn in gray and crash if using a HD video)

A lot of LQ videos from emumovies are crashing when the pan-and-scan module is activated, but the background scanline option will do the same problem on some LQ videos like the aburner.mp4 (320x240) (see the attached file)

9
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: June 06, 2016, 07:39:24 AM »
efraimsangil-

There is nothing in robospin that would cause this issue, unless it has something to do with the shader being turned on.

I think floobs image has most of the shaders elements turned on in robospsin but nobody has complained about this issue.

There are 2 options causing this issue and there's nothing to do with shaders, because there's no shader support, so choosing yes on shaders options will not change anything:
Code: [Select]
pi@retropie:~ $ attract -v
Attract-Mode v2.0.0 (Linux, SFML 2.3 +FontConfig +RPi +SWF +7z)

Using Libav for Audio and Video.
avcodec 56.1.0 / avformat 56.1.0 / swscale 3.0.0 / avresample 2.1.0

[b]Shaders are not available.[/b]

In fact the problem is choosing this 2 options:
Code: [Select]
Select bg image or panscan = panscan
Enable background Scanline = light, medium or dark
Must change to:
Code: [Select]
Select bg image or panscan = blue or retro
Enable background Scanline = none

But doing this just fix the problem for videos with low resolution (320x240) with high kbps ( ~700kbps or more).
 For higher resolutions (640x480) dont matter the layout config. options because isnt a layout problem...

10
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: May 08, 2016, 08:13:40 AM »
I had some of the same issues with the keyboard and double esc key presses (only single was pressed) taking me right to the command line.
Decided to compile the non X version back onto RetroPie 3.6 since 3.7 was buggy for me by itself.
Works much better now on my setup anyway.
I dont know if is a retropie 3.7 problem, because i was using the v.02 (retropie 3.7) without problems. Maybe is the SFML version. Are you using the same new SFML version ( https://github.com/mickelson/sfml-pi used in v.03) with the retropie 3.6?

11
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: May 07, 2016, 07:01:34 PM »
I was using the v.01 and v.02 versions without any problem, but this v.03 is almost impossible to use with keyboard (no problem with xbox 360 controller), both terminal and X mode:

1- The v.03 version included again an old problem with keyboard on linux. If i hold the "down" key for 3 seconds the wheel will still scroll for about 5 seconds after release the key. (No problem with gamepad).

2- If you open a game and press a key in the keyboard some times, this will "keep in memory", then quit the game and the AM will start to "press the keys in memory"
So if you press down, down, down, down in the game and exit with gamepad button, the AM will start to scroll down the wheel. If you quit the game with the Esc key will not scroll down because will send the esc to AM and will ask to quit the AM.

3- After start it shows this error in the terminal when running without X (maybe its running without the hardware accelerated gpu when no X?):
Code: [Select]
glGetError 0x500
glGetError 0x500
glGetError 0x500


12
General / Re: Raspberry Pi Image for Pi 2 and Pi 3
« on: April 19, 2016, 11:19:12 PM »
Quote
- Fixed keyboard hang (hacked boot delay)
Im still having problems with keyboard, some times i need to unplug and plug again to work. Its randomly, some times is after a few minutes, some times is after hours...
Im using a raspberry pi 2

13
General / Re: Attract mode shuts down automaticaly on RPi3
« on: April 19, 2016, 10:43:57 PM »
Ok, now i know this is something to do with the rom video file, but i still not sure if its because of the size in MB or the video quality.
 And dont need to wait the screensaver, just crash if you go to the rom in the list and try to see the video to play until the end.

This is an example of video working fine:
size: 2,7MB
video :320 x 240, codec H.264 (High Profile), 30fps, 520 kbps
audio: MPEG-4 AAC, stereo, 48000 Hz, 64 kbps


this is an example of video crashing the AM: (from a megadrive rom, but you can rename it to test http://www.4shared.com/video/i7OS-hKGba/Gunstar_Heroes__Europe_.html )
size: 5,0MB
video :612 x 464, codec H.264 (Baseline Profile), 30fps, 3390 kbps
audio: MPEG-4 AAC, stereo, 44000 Hz, 124 kbps


another one crashing the AM: (from a megadrive rom, but you can rename it to test http://www.4shared.com/video/oixiVb78ba/Thunder_Force_IV__Europe_.html )
size: 11,9MB
video :612 x 464, codec H.264 (Baseline Profile), 30fps, 4832 kbps
audio: MPEG-4 AAC, stereo, 44000 Hz, 125 kbps


Oh, btw, im using the Raspberry Pi 2.

14
General / Re: Attract mode shuts down automaticaly on RPi3
« on: April 19, 2016, 09:55:16 PM »
Just happened here a few minutes ago. It was in screensaver and then after a few minutes it crashed.
Now is running again in screensaver mode and no problem after more than 30 minutes.
Im using the Floob's v.02 image ( http://forum.attractmode.org/index.php?topic=705.0 ) with the newest robospin layout

The output error:
 
Code: [Select]
AL lib: (EE) ALSAProc: mmap commit error: Broken pipe

15
How to do an animation to move and hide wheels like this theme ( http://forum.attractmode.org/index.php?topic=505.0 ) does with listbox after 1 second of inactivity? Im trying to adapt the code without sucess...

Pages: [1]