Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: PaulF on November 20, 2016, 10:19:47 PM

Title: SDL mp3 using pulseaudio
Post by: PaulF on November 20, 2016, 10:19:47 PM
I had good luck compiling for the Raspberry Pi and am trying another platform the uses pulseaudio for the pcm daemon. All the menus and themes work, but each file in my playlist only lasts a second when played.  I use the fail safe theme and it shows the duration correctly for each file.
 
Any ideas?

I'm looking at  firmware/target/hosted/sdl/pcm_sdl.c. How do I turn on the debug so I can see what's happening? For instance if the audio device doesn't open there is:
        DEBUGF("Unable to open audio: %s\n", SDL_GetError());
Title: Re: SDL mp3 using pulseaudio
Post by: [Saint] on November 21, 2016, 04:18:59 PM
How do I turn on the debug so I can see what's happening?

The DEBUG flag is passed as an additional build parameter during the configure stage.


Note:

Suggestion:


If you have any additional queries or run afoul at any stage during this procedure, please don't hesitate to seek further assistance from myself or other developers or volunteers either here in this thread or via our Freenode IRC channel (https://webchat.freenode.net/?channels=rockbox). My username on this channel is '[Saint]' if you would prefer to deal with me personally.


[Saint]
Title: Re: SDL mp3 using pulseaudio
Post by: PaulF on November 22, 2016, 04:56:20 PM
Thanks, that worked great. I made a new build directory so I now have a normal and debug versions.

It turns out it had nothing to do with pulseaudio. I copied the .rockbox directory from the Raspberry PI dev environment  to the PocketCHIP using scp. They both use the same ARM platform version. The debug message simply told me that I needed to also copy the codecs into a separate directory. duh

Title: Re: SDL mp3 using pulseaudio
Post by: PaulF on November 22, 2016, 05:46:28 PM
Listening to a LeBatard podcast
Title: Re: SDL mp3 using pulseaudio
Post by: [Saint] on November 24, 2016, 08:42:15 PM
It would have been nice if "full screem" was a configure option, like LCD size.

A patch for this functionality against /rockbox/tools/configure (https://github.com/Rockbox/rockbox/blob/master/tools/configure) would be welcomed, providing it was sufficiently well written and thought out.

You seem to be aware of the fact but what you have there is most definitely a hack, looking at some areas of the code is it hard to reconcile with sometimes, but Rockbox has a "Do It Right" philosophy. This fullscreen option would need to be special cased so that it doesn't apply globally to all SDL CONFIG_PLATFORM targets but isn't able to be removed from PLATFORM_MAEMO and PLATFORM_PANDORA.


[Saint]
Title: Re: SDL mp3 using pulseaudio
Post by: PaulF on November 25, 2016, 12:55:35 PM
You seem to be aware of the fact but what you have there is most definitely a hack

I removed the hack from my post. It was years ago  when I first tried the Raspberry PI. I am starting to recall what happened. I was really excited to see Rockbox on the PI, but when I clicked fullscreen  in the window bar it filled the screen, but the bar took up some of the screen. I grepped fullscreem and found where some platforms did a fullscreen and did a temporary hack. Someone asked for the hack so I posted it not remembering it was a temp kludge. I now know how to start the Rockbox with command line screen parameters that can do fullscreen without decorations and new size.

About the configure: Entering LCD size was confusing to me. It has nothing to do with hardware. It is the default window size. IMHO "configure" should say "default window" instead of "LCD". Hardware is done with "platforms", like you said.



Title: Re: SDL mp3 using pulseaudio
Post by: [Saint] on December 02, 2016, 12:55:32 PM
About the configure: Entering LCD size was confusing to me. It has nothing to do with hardware. It is the default window size. IMHO "configure" should say "default window" instead of "LCD". Hardware is done with "platforms", like you said.


While I see your point, it really isn't worth it for us to special case the wording in configure so that someone doesn't get triggered by it.

I mean, if one really wants to get pedantic about this type of thing in regards to terminology, there's a couple of targets that don't actually have LCD displays at all and instead have OLED/AMOLED displays. If you want to get really really pedantic, pretty much all of this falls over with the charcell displays.

Using 'LCD size' is somewhat of an obvious hand-me-down, because the overwhelming majority of the supported devices have a fixed display size. As you may well know, configure isn't building this list of configurable targets dynamically, and is instead taking defined devices and platforms from a list in configure that has been appended to for what is now almost the better part of two decades.

Of course you're welcome to make a submission against configure that ensures that we correctly list the display technology for any given target, and whether or not this is a hosted platform and actually refer to the Rockbox internal framebuffer...but I suspect you have more important things to do.


[Saint]
Title: Re: SDL mp3 using pulseaudio
Post by: PaulF on December 05, 2016, 09:09:19 PM
Actually I am feeling like I should submit something since I use Rockbox a lot. I could start with your idea, but I want try some other things, too. I am house bound after hip replacement. I tried building an SDL manual because I got stuck in menu and couldn't get out of it and needed menu descriptions. My dev system crashed loading LaTex. I am going to build a new system first. I think the SD card finally gave out so I need a hard drive system instead of the Raspberry PI.
Title: Re: SDL mp3 using pulseaudio
Post by: PaulF on December 11, 2016, 02:53:40 AM
My dev system now consists of banana pi M3 with a 500 gigabyte hard drive. The 8 cores does wonders for "make -j 16"

I knew how get the raspberry pi into full screen using the windows manager. I couldn't figure out how to go full screen on the PocketChip. I decided to add a command line flag to the SDLAPP. I hope this isn't a hack.

Code: [Select]
git diff firmware/target/hosted/sdl/system-sdl.c
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 37580ed..dbab8fb 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -56,6 +56,7 @@
 SDL_Surface    *gui_surface;
 
 bool            background = true;          /* use backgrounds by default */
+bool            fullscreen = false;
 #ifdef HAVE_REMOTE_LCD
 bool            showremote = true;          /* include remote by default */
 #endif
@@ -137,6 +138,9 @@ static int sdl_event_thread(void * param)
     /* Fullscreen mode for maemo app */
     flags |= SDL_FULLSCREEN;
 #endif
+    if(fullscreen){
+        flags |= SDL_FULLSCREEN;
+    }
 
     SDL_WM_SetCaption(UI_TITLE, NULL);
 
@@ -338,6 +342,11 @@ void sys_handle_argv(int argc, char *argv[])
                 printf("Disabling remote image.\n");
             }
 #endif
+            else if (!strcmp("--fullscreen", argv[x]))
+            {
+                fullscreen = true;
+                printf("Using Full Screen Mode.\n");
+            }
             else if (!strcmp("--old_lcd", argv[x]))
             {
                 having_new_lcd = false;
@@ -391,6 +400,7 @@ void sys_handle_argv(int argc, char *argv[])
                 printf("  --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
                 printf("  --zoom [VAL]\t Window zoom (will disable backgrounds)\n");
                 printf("  --alarm \t Simulate a wake-up on alarm\n");
+                printf("  --fullscreen \t Use fullscreen mode\n");
                 printf("  --root [DIR]\t Set root directory\n");
                 printf("  --mapping \t Output coordinates and radius for mapping backgrounds\n");
                 exit(0);

When I do a build only a few plugins are built. How I get more plugins? I really want frotz because I have the 3 Zork z5 files.