Ommpc2x V0.1.2


Coder_TimT

Member
Joined
Mar 17, 2006
Messages
288
I'll start this off by saying thanks to Michael(not sure if he's registered here, and don't want to give out full name w/o permission) for the large patch he send me which adds the big enhancement for this release. We now have resume of the now playing song at the last played location upon restarting the player. Just leave the song playing when you exit and it will resume when you start back up.

There are a few other changes sprinkled in included paging the playlist or browser by using left/right on the joystick. Volume control and Prev/Next while locked. Also some fixes/clarifications in the doc. Such as, in case you didn't know, the player has normal Repeat/Random modes that can be access with the 'A' button....

One important thing to note with the build...there is a line that must be added to mpd.conf for the resume to work correctly.... Make sure you get the following in there...

state_file "/mnt/sd/ommpc2x/.mpdstate"

Another important note... I've apparently left the bookmarks directory out of the archive and was a lazy programmer and the application doesn't create one for you. So you'll need to create a bookmarks folder off of "programRoot" for that functionality to work...

Unfortunately still have the nagging issues where mpd will sometimes just not output anything after changing songs until you pause/unpause and/or change volume. Been looking, but haven't come up with anything yet...

Anyway, changlog is below, download links follow...have fun...you have a few hours before the gbax entries hit.... :p
1. Merge of changes from Michael summarized below
_a. Use of mpd states to save/load current playlist, allowing for resuming now playing song on restart
_b. Addition of an Add all Songs playlist...
_c. New "mpd kill" routine to facilitate save states
_d. Added needed "sync" calls after writes
_e. Cleanup/Safety checks added to thread code.
Other changes...
2. Fixed random playlist code so that it won't add two of the same title...
3. Slightly reduced button hold time for screen blank/lock.
4. Allow volume changes while locked(B+vol)
5. Allow Prev/Next while locked(B+triggers)
6. Left and Right joystick now page up/down
7. Changes to Help text to mention random and repeat modes and clarify normal versus hold commands
8. Changed Vol/file type text to better fit in different layouts...
9. Readme and control file fixes to mention above random and repeat modes and need case of album art files.

Zip Archve

Bunzipped tar file
 
Are bookmarks working for other people? I am new to this app and can't get them working yet (I have tried via bookmarks section and via start pop-up menu).

The new feature of resuming last position in track works well though which is useful as a sort of bookmark in itself.
 
imhotep said:
Are bookmarks working for other people? I am new to this app and can't get them working yet (I have tried via bookmarks section and via start pop-up menu).

The new feature of resuming last position in track works well though which is useful as a sort of bookmark in itself.
Seem to still be working. Is "programRoot" in ommpc.conf pointing to the correct location. And does the bookmark directory exist in "programRoot".
 
Last edited by a moderator:
Ah, excellent! Thanks for merging in my patches :^) . Can you push the new version to the subversion repo so that I can track it?
 
DBH said:
Hey dude was just wondering if the player supports .pls extension files?
From a quick google search, I'm guessing that is a winamp playlist file? Then no, only m3u style playlists are supported.
 
Last edited by a moderator:
@micket - Thanks for that link, looks easy enough to handle...I could either convert into m3u so that mpd could deal with it, or I guess the proper way to handle would be to hack it into the mpd source. Something to think about...

@DBH - I'm thinking m3u or pls playlist from online radio stations are not going to work unless Shoutcast/Icecast support is implemented...which by the way isn't looking terribly promising because Icecast and tremor don't appear to play well together. An m3u file that linked to seperate mp3s on a remote web server might work...but not a normal radio stream... Okay, I was completely off base, see below...
 
The easiest way to handle pls files is for ommpc to extract the URLs (or filenames, as the case may be) from the file and just add them to mpd's current playlist. That's what I did for a similar project (The Emacs MultiMedia System). No need to patch mpd.
 
Okay, I just realized that I was completely off base on what the icecast integration was for with mpd. It's actually to pipe the music from mpd to an icecast server to listen to wherever. I did eventually get it compiled in...but for right now it's not terribly important.

Anyway, as for internet radio streams...yes mpd should support them. If you have a m3u playlist you should be able to load it and go I think. I'll look into getting pls playlists handled also... This is all assuming you're gp2x can get out to the internet to access the streams...if not it appears to crash right now...

Sorry for any confusion I might have caused....
 
Awesome dude if you can add the .pls soon I will have an internet radio station working proper!!! Much needed for me :) Only shitty thing for me is in my office we got like 12 different wireless networks around me and my gp2x doesnt want to connect to my office network first argh!!!!!
 
Coder_TimT said:
imhotep said:
Are bookmarks working for other people? I am new to this app and can't get them working yet (I have tried via bookmarks section and via start pop-up menu).
Seem to still be working. Is "programRoot" in ommpc.conf pointing to the correct location.

Yes definitely.
Coder_TimT said:
And does the bookmark directory exist in "programRoot".
No bookmark directory there at all. Is the app supposed to generate a bookmark folder or do I create one?
Neither of my config files mention a bookmark directory. Is there supposed to be an entry for this?
 
Last edited by a moderator:
[/quote]
No bookmark directory there at all. Is the app supposed to generate a bookmark folder or do I create one?
Neither of my config files mention a bookmark directory. Is there supposed to be an entry for this?
[/quote]


Arrrgh... I left the bookmarks directory out of the archive somehow....and I was lazy and it doesn't generate one... You'll need to create a "bookmarks" directory off of programRoot and it should start working...
 
Coder_TimT said:
Arrrgh... I left the bookmarks directory out of the archive somehow....and I was lazy and it doesn't generate one... You'll need to create a "bookmarks" directory off of programRoot and it should start working...
Yeah that was it. Solved!

Now that that's out of the way I wanted to say thanks for this app. It fills an enormous gap the other players left by not including bookmarks. It's the podcast and audio book era after all! - well sort of. :rolleyes:

Question: Is there potential for ommpc2x to ever run as a background app? Probably not feasible but just curious as I had a couple of freak crashes where it was playing an MP3 whilst showing the desktop of gmenu2x. I was able to navigate around and relaunch ommpc2x no probs. I should have tried launching another app I suppose. :(
 
Last edited by a moderator:
imhotep said:
Coder_TimT said:
Arrrgh... I left the bookmarks directory out of the archive somehow....and I was lazy and it doesn't generate one... You'll need to create a "bookmarks" directory off of programRoot and it should start working...
Yeah that was it. Solved!

Now that that's out of the way I wanted to say thanks for this app. It fills an enormous gap the other players left by not including bookmarks. It's the podcast and audio book era after all! - well sort of. :rolleyes:

Question: Is there potential for ommpc2x to ever run as a background app? Probably not feasible but just curious as I had a couple of freak crashes where it was playing an MP3 whilst showing the desktop of gmenu2x. I was able to navigate around and relaunch ommpc2x no probs. I should have tried launching another app I suppose. :(



Thanks for the encouragement.

I don't know that it will ever be a truly seamless/stable background player. The player portion is actually mpd(Music player daemon) so that is what it is designed for, but it doesn't work terribly well in practice. The application dependent volume control on the gp2x is troublesome. If the running app doesn't control the volume, it likes to jump up to a level of about 2/3 max. Then theres the fact that the gp2x doesn't like to share the mixer. If another program tries to output sound while mpd is playing, mpd locks and the other program doesn't output it's sound either... I haven't looked into that too much yet, so perhaps something can be done.... Thus far I've hypothosized to myself that it has to do with the old 2.4 kernel and buggy sound driver...but that just a wild guess...

But yes, background playback was one of the original intentions. That's why you can detach the client and launch other programs from it. In my testing, I was able to launch and play gpfce and picodrive with decent results....

So..you had the ommpc2x gui crash, and were dumped back to gmenu2x with mpd still playing. That would definitely be the behavior if the gui crashed and yes I could see you being able to start it right back up. The gui crash is troublesome though...that is one thing I have never seen it do. Mpd has done many strange things, but I've never had a problem out of the gui. Any idea of what actions you might have been doing at the time? You didn't accidently hit "Detach client" from the main menu did you... :D ...that would definitely do it...
 
Last edited by a moderator:
Coder_TimT said:
Any idea of what actions you might have been doing at the time? You didn't accidently hit "Detach client" from the main menu did you... :D ...that would definitely do it...
I think I was holding 'A' to remove a song from the playlist, but I can't be sure because I cannot reproduce it. I don't think you need to worry about the GUI though. It seems stable enough. :)

I actually really like the idea of using your GUI, starting one of my podcasts, exiting GUI and then playing some emulation on mute. Is "detach client" designed for this purpose? I wouldn't really need sound in the game anyway. I used to love doing this on my Pocket PC, but the d-pad was crap for games and I only had one stylus based game I liked. :angry:
 
Last edited by a moderator:
imhotep said:
[I actually really like the idea of using your GUI, starting one of my podcasts, exiting GUI and then playing some emulation on mute. Is "detach client" designed for this purpose? I wouldn't really need sound in the game anyway. I used to love doing this on my Pocket PC, but the d-pad was crap for games and I only had one stylus based game I liked. :angry:
Yes, detach client will accomplish this. You can also look at the scripts in the shortcuts directory for examples on kicking off programs directly from "Launch Program" menu item. Mpd will sometimes crash out when switching programs and you'll have to restart the gp2x to use the player again, and sometimes it will work well. I was just able to detach, start squidesnes..play..quit, start battlejewels and play, then picodrive, then phishy, then battlejewels once more... Battlejewels and phishy surprised me as they both have sound...they weren't able to access /dev/dsp and didn't output any of their own sounds, but mpd didn't freak out... Anyway, give it a go and let me know how successful/unsuccessful you are...
 
Last edited by a moderator:
Coder_TimT said:
Anyway, give it a go and let me know how successful/unsuccessful you are...
I will let you know. I am looking forward to giving this a go in the next few days. Thanks for all the info in your posts as it makes things much clearer. :)
 
Last edited by a moderator:
Back
Top