Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
X GUI

X11Amp v0.9 Source Released 98

Max Karpiak writes "The source to X11Amp's new (long awaited) version is available at the main homepage, and should hopefully propagate out the to the US site soon as well. Go get it. It's cool." Mine's making on the next desktop.
This discussion has been archived. No new comments can be posted.

X11Amp v0.9 Source Released

Comments Filter:
  • by Anonymous Coward
    Heard this on IRC, so I'm not the one who figured it out. If your skins aren't working, you have to (until it's fixed) have your skins in ~root/.x11amp/Skins instead of your user directory. And of course if you're running it as a user, you'll have to chmod 755 /root.. and then probably rechmod other stuff in there to keep it safe.
  • When i play mp3s with x11amp (any binary-only release) the songs start to crackle at random times in the song. It doesn't matter what my load is, it always does it, even if i'm not doing anything else. I have to constantly click the status bar to pause and start the mp3 again. Anybody else have this problem? (I tried using "real time" mode by running as root - whatever that means - but it didn't work either) Any help is appreciated. wxh[at]altonet.com
  • I have to admit, this is good news for the Linux community. My first X Window-based MP3 player was x11amp, and I was never sure about its license. It's nice to see that they are participating in the Open Source phenomenon.

    Currently, I use mpg123, and one of its frontends, GQmpeg. That combination really works well for me because of the 3DNow! support in the latest release of mpg123. The CPU is much less busy now. All things considered, there's nothing bad about this announcement.
  • by Shiska ( 131 )
    Well, it compiled just fine... trying to play an mp3 causes it to die, though. (freezes and eats 99.9% CPU until killed). ... ah, the joys of alpha software. This definately sucks. I use x11amp 0.7 all of the time, so I was pretty excited.



    ----------------- ------------ ---- --- - - - -
  • keep in mind that unstable == development (what developers usually use because they are looking to the future)


    it all gets to the users in the end, but developers *use* the bleeding edge stuff. most developers aren't going to give a rat's ass if you don't get the brand spanking new stuff, you can always wait until all the devel libs are into stable. there are many reasons for the developers to use the devel libs: to help guide the next versions, have their input taken, and to be prepared for the future. sure this is a release of x11amp, and you do have a point, but asking a developer to bend over backward and support the present instead of looking to the future is a pretty silly attitude, after all the developers aren't doing this just to make you happy.


    my advice, don't ask to be treated like a user : )
  • developers use development libs, get used to it
  • it would be that way if the libs weren't evolving so rapidly, currently the lib developers aren't the only ones developing the libs, they are getting hacked together to do what a app developer needs them to do. you have a good point, but it isn't really applicable to libs that are changing this rapidly
  • And I assume you're basing this on your own developmental experience?
  • Posted by Windigo The Feral (NYAR!):

    Some anonymous coward wrote:

    I already had a couple of MP3 players for my Linux box. Why the fsck

    isn't there an encoder to be found anywhere with source? Is the
    algotithm "secret" or some garbage like that? I thought MPEG was an
    open standards body like CCITT or NIST or ISO or ...

    The main problem with releasing an MP3 encoder with source is, as I understand it, the fact that the mathematical formula for MP3 compression happens to be patented by Fraunhofer GmBH. :P Technically, in those parts of the world that are insane enough to allow patents on mathematical formulas (like the US :( ) one isn't even supposed to create ANY sort of encoder/decoder that can handle MP3s without paying a royalty. :P

    Yes, the algorithm has been published as an ISO standard, but thanks to the patent issues it is next to impossible to put out a truly "open" MP3 encoding library, at least in the US and other places that accept US patents as valid. :P

    Obvious solutions:

    1) Find someone in a country that doesn't recognise software and/or algorithm patents as valid (and which also doesn't have a trade agreement that would mean they have to see US patents as valid) to put out an open library for MP3 encoding, and hope they don't get sued by Fraunhofer GmBH

    2) Raise hell with Fraunhofer GmBH to release the MP3 encoder/decoders as open libraries (good luck; I don't even think they have Linux *executables* of the latest version)

    3) US-based folks: Raise polite hell using snail-mail with your congress-critters stating that patent law needs reform to prevent abuses [be sure to cite examples such as IBM's recent-ish patent on the wheel]

    4) US-based folk, and maybe others--support peaceful protests to get patent law changed, such as some of the ideas proposed on here in past [one of my favourites--get a patent put out that essentially describes the process of patenting, then once it gets approved point out to the patent office that it's prior art by using *THEM* as the example].

  • Making those directories saved me from a few minutes of banging my head against my keyboard. Thanks!
  • I hope the x11amp team keeps up the good work despite all the stupid whining about the programs dependencies. I see that it is eats more CPU than mpg123, but its keeping up there with the presence winamp has, which some of us enjoy. mp3s in X will belong to x11amp for me.

    Just be happy with have a choice.

    tugrul
  • Okay, I poked around their website for a while and I still have one small little question:


    - What the heck *is* X11amp anyway? From the screenshots I can guess that it is a sound thing of some sort, but nothing on the site gives enough information to figure out anything other than that.

  • Comment removed based on user account deletion
  • ...add in a buffer. You can do this by passing -b to mpg123. I've found that one meg works well, or if you're memory-squeezed, 512K is great too. A buffer acts like ESP on a Discman, decoding the audio into one end and playing it out the other. If there's a short spike in system activity the player doesn't skip.

    gqmpeg has an option to do this; since the new x11amp uses mpg123, it should too.
  • by ninjaz ( 1202 )
    I finally got home from work and was able to compile the new version, and it rocks. :) Working EQ (!!), no seggies yet (!!), the gtk file selector works much better, and GPL (!!) I was really pleasantly surprised after compiling to see how much this new version rocks. :) This after expecting to be disappointed reading all of the incessant whining about it. Feh.
  • AFAIK, GTK+ is nearing 1.2.0. Most of the software I've seen that uses the development libraries is developmental itself, and so it makes no sense to tie it to an older version of the library which is scheduled to be replaced soon.

    In addition, I suspect that X11Amp uses skins? Those are probably done with GTK+ themes (although I haven't looked at the source yet so take this with a grain of salt :) )

    Oh, and much of the stuff you listed should be on any new self-respecting linux system (linuxthreads is part of the standard C library now, imlib has stable versions out there, libpng, libgif (or libungif), and libjpeg are AFAIK optional but recommended (and again, they're stable and, IIRC, used by a bunch of stuff), zlib is pretty much universal--the latest version is 1.1.3 not 1.1.2 which you listed, and imagemagick is unrelated. Don't know what it's doing there. The only exotic and devel stuff I see is GTK+, Glib, and gettext--and I run programs using those almost continually on my system with ABSOLUTELY NO CRASHES DUE TO THE LIBRARIES. And they build quite nicely too (and I'm using the most difficult method of building them) )

    Daniel
  • No distro has the right GTK+ (well, debian potato does but it's unstable and doesn't count :-) ), but all you need to do to install it is:
    (a) download the tar and extract (www.gtk.org)
    (b) ./configure && make && [sudo|su -c] make install

    It's stabilizing enough that the recent releases are fairly interchangable.

    I believe Debian 2.1 ("frozen", should be released stable RSN) has the relevant imlib, although I could be wrong. I _know_ the rest of the libs should be fine.

    Daniel
  • "unstable" is not as unstable as you may think.

    I know. I'm running it. :-)

    Daniel
  • You miss the point... They're doing all of their development based on the development branches of various libraries. A lot of people are. A lot of silly, silly Gprimates.

    How are they ever supposed to become stable, if they're basing all of their work on a shaky foundation? The stable versions of most of those libs are there. Use them.
  • Gtk 1.1 is perfectly stable

    I think you misinterpret what I mean by "unstable". Not "unstable" as in you link against it and your app crashes and burns. "Unstable" as in it's still in development and therefore subject to change. "Unstable" as in it's still in development, and therefore you can't be assured that everyone has the latest (probably not greatest) version.

    GTK 1.0 is stable. Version releases occur infrequently, and people generally have the latest version. If they don't, you can be sure they can safely upgrade to it.
  • Would you people stop coding every damn thing with experimental/developmental libraries? There's a reason it's called being "bleeding edge".

    I use x11amp 0.7, because I have found nothing particularly better for X. (I'm a pretty big fan of nice GUIs, if I'm gonna have a GUI.) I was going to install 0.9a essentially for the double-size option.

    But wow, check out the libraries I'd need:
    • glib 1.1.14
    • gtk+ 1.1.14
    • imlib 1.9.2
    • linuxthreads 0.71
    • gnu gettext 0.10
    For imlib, I'd need:
    • giflib 3.0-2
    • libungif 3.0
    • libpng 1.0.1
    • zlib 1.1.2
    • jpegsrc 6b
    • ImageMagick 4.0.5


    See a trend? Why do people write so much software that compiles only against developmental/experimental libraries?

    Not to mention the stuff that the G-crowd (and E-flock) consider standard, but nobody else has or uses....

    Yeah, these new libs (especially gtk) tend to have some neato-burrito whiz-bang wowie-zowie features, but can't we wait til they're something resembling stable? Isn't that why there're separate "stable" and "development" versions?
  • Note that the new version might be slower than the older binary only releases because of your compiler. With binary only releases, the author may have used an optimizing Pentium (pgcc) compiler unliek the gcc/egcs combo most people have on their systems.

    This is just speculation, I haven't actually compiled any MP3 players under normal gcc and pgcc to compare.
  • Windigo said:

    ... cite examples such as IBM's recent-ish patent on the wheel

    Please can someone point me towards this.

    Alex
  • True, and hunting down libraries for downloading isn't exactly my favorite pastime (I'd rather shave my balls with a weed wacker), but mostly this is a good thing. It's painful sometimes, but it is a good thing. Anything GTK is a good thing for X (as opposed to motif).
  • making problems? try

    make SHELL=sh

    wont start?
    rm -rf ~/.x11amp ; mkdir ~/.x11amp ; mkdir ~/.x11amp/Skins ; chmod +x ~/.x11amp/Skins
  • Ok, run x11amp as normal, play some mp3's. Open a top and check it out. (hmm .7% for me) Now start rendering something in povray or start cracking rc5. Take a look at top again.... Interesting, my x11amp process is now taking up 8.2%
    mpg123 takes up less CPU for me. How about you?

    CPU Hack? Probably...
  • Ok, run the old x11amp (version .7) as normal, play some mp3's. Open a top and check it out. (hmm .7% for me) Now start rendering something in povray or start cracking rc5. Take a look at top again.... Interesting, my x11amp process is now taking up 8.2%
    mpg123 takes up less CPU for me. How about you?

    CPU Hack? Probably...
  • Hi there. I'm a Slackware user, and I'm here to say that you don't know what you're talking about.

    I can actually compile Gnome from CVS, because I know what packages have to be installed, and in what order, and even the proper phase of the moon.

    However, none of this changes the fact that the new release of X11amp is *terribly* unstable, and IMHO, quite unuseable. Most of the time it won't even draw a window, but instead chooses to die and give an X error.

    On the other hand, GQmpeg said very plainly in the README's that it required the 1.0.x libraries, yet it compiled without a whimper and runs beautifully with gtk+/glib-1.1.4 and imlib 1.9.2. Go figure.

    Furthermore, mpg123 (it's backend) 0.59q contains 3dNow! support for people like me who have K6-2 CPUs and binutils 2.9.1.0.19a. That means that mpg123 rolls back and forth between 3% and 8% of my total CPU.

    Personally, I'll wait for the X11amp guys to attempt to compile their own code before I go back to trying to use the new version.
  • It's not just you. I'm getting it as well. Considering that this is the only thing out of the entire mess of apps that I use which rely on the 1.1.x libraries which malfunctions like this, I'm inclined to blame X11amp.
  • I believe they just added two more functions! ;)

    I tend to agree with the original thread of this post, but for another reason. Lots of people like to use the latest software, but having the latest version of gtk, and the stable version co-existing is a bit of a pain in the ass. Yes, its possible, but a pain. And some of us still use apps that won't work with gtk 1.1. But then, its nice to use the latest features. I guess you can't please all the people all of the time. :)
  • I downloaded it before teh announcement on /. (i had been refreshing the ftp all day) anyway, It has a nice feature set, but I find it uses up about 4-5 timesmore CPU power than the old one. Anybody have any clue what might have caused this HUGE jump in processor usage?
  • Hey, they're not all bad. Sure they, crash now and then, but come on - good effort guys! I'm not gping to complain about the problems with something because I don't care if it gets fixed or not.
  • Yes, fix the goddam mpg123 code to make it pre-load the buffer and not try to play when it loads the first damn bit of the first damn byte of the mp3.

    Sorry, not cursing at you, but mpg123 in general. kmpg has been annoying me for the longest time with this.
  • Worked fine for me on my RH 5.2 box. But, I didn't use RPM versions of the libs and Installed them all in /usr/local. Then did:
    • export PATH=/usr/local/bin:$PATH

      export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
    to make sure it would pick up the libs I wanted. It configured and compiled perfectly. Here is my ldd of the binary.


    • $ ldd /usr/local/share/x11amp/x11amp-0.9a

      • libgdk_imlib.so.1 => /usr/local/lib/libgdk_imlib.so.1 (0x40006000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4002c000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x4004c000)
        libungif.so.3 => /usr/lib/libungif.so.3 (0x40077000)
        libpng.so.2 => /usr/lib/libpng.so.2 (0x4007e000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40098000)
        libm.so.6 => /lib/libm.so.6 (0x400a6000)
        libgtk-1.1.so.11 => /usr/local/lib/libgtk-1.1.so.11 (0x400bf000)
        libgdk-1.1.so.11 => /usr/local/lib/libgdk-1.1.so.11 (0x401ca000)
        libgmodule-1.1.so.12 => /usr/local/lib/libgmodule-1.1.so.12 (0x401f9000)
        libglib-1.1.so.12 => /usr/local/lib/libglib-1.1.so.12 (0x401fd000)
        libdl.so.2 => /lib/libdl.so.2 (0x4021e000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40222000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4022e000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402d1000)
        libc.so.6 => /lib/libc.so.6 (0x402de000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)


    Hope this helps...
  • Yeah, you can stream it with netscape if you use this script [bubba.org] I whipped together. No guarentees, but it works for me...


  • I'm using RedHat 5.2. The way I did it was with the SRPMS; you can find them at rawhide.redhat.com [redhat.com].

    As others have mentioned, use rpm --erase --nodeps to remove the 1.0.* gtk/gdk and imlib library packages installed with 5.2 (there are three).

    One gotcha is that the new stuff requires a binary called libtoolize; grab the libtool SRPM and build/install it; I put it in /usr/local.

    Then build and install new 1.1.* versions of the gtk/gdk and imlib libraries from the SRPMS; I install them in /usr/local. Add /usr/local/lib to your /etc/ld.so.conf file and re-run ldconfig.

    Now you can build and install x11amp! Good luck.

  • wow, I found about this BEFORE reading it on slashdot...heh.

    The new version uses mpg123, and skips a little more. It seems a bit flakier, but it actually has a *lot* of new features. (feature set -- not just l&f -- reminds me of winamp on my girlfriend's computer)


    cheers,
    wb
  • If you install GNOME 0.99.3 over RH 5.2, you'll have the right versions.



    cheers,
    wb
  • I've actually needed to make changes to the X11Amp
    source before, but couldn't because of the
    license. I'm glad it's now under the GNU GPL.
  • /*
    I noticed shuffle isn't hooked in yet. Here's a quick fix to enable shuffle. It's not an ideal fix, but it'll work until we see another release!
    My apologies if the formatting gets screwed up.
    */

    //playlist.c
    #include "x11amp.h"

    GList *playlist=NULL;
    GList *playlist_position;


    void playlist_clear(void)
    {
    GList *node;
    PlaylistEntry *entry;

    if(playlist)
    {
    if(get_input_playing()) input_stop();
    node=playlist;
    while(node)
    {
    entry=(PlaylistEntry *)node->data;
    if(entry->filename) g_free(entry->filename);
    if(entry->title) g_free(entry->title);
    node=node->next;
    }
    g_list_free(playlist);
    playlist=NULL;
    playlist_position=NULL;
    }
    }

    void playlist_delete(gboolean crop)
    {
    gboolean restart_playing=FALSE,set_info_text=FALSE;
    GList *node=playlist,*next;
    PlaylistEntry *entry;

    while(node)
    {
    entry=(PlaylistEntry *)node->data;
    next=g_list_next(node);
    if((entry->selected&&!crop)||(!entry->selected&&cr op))
    {
    if(playlist_position==node)
    {
    set_info_text=TRUE;
    if(get_input_playing())
    {
    input_stop();
    restart_playing=TRUE;
    }
    if(g_list_next(playlist_position))
    playlist_position=g_list_next(playlist_position);
    else if(g_list_previous(playlist_position))
    playlist_position=g_list_previous(playlist_positio n);
    else if(node!=playlist)
    playlist_position=playlist;
    else
    playlist_position=NULL;
    }
    if(entry->filename)
    g_free(entry->filename);
    if(entry->title)
    g_free(entry->title);
    playlist=g_list_remove_link(playlist,node);
    g_free(entry);
    g_list_free_1(node);
    }
    node=next;
    }
    playlistwin_update_list();
    if(set_info_text)
    mainwin_set_info_text();
    if(restart_playing)
    {
    if(playlist_position)
    playlist_play();
    mainwin_set_song_info(0,0,0);
    }
    }

    void playlist_select_all(void)
    {
    GList *node;

    node=playlist;
    while(node)
    {
    ((PlaylistEntry *)node->data)->selected=TRUE;
    node=node->next;
    }
    playlistwin_update_list();
    }

    void playlist_select_none(void)
    {
    GList *node;

    node=playlist;
    while(node)
    {
    ((PlaylistEntry *)node->data)->selected=FALSE;
    node=node->next;
    }
    playlistwin_update_list();
    }

    void playlist_inverse_selection(void)
    {
    GList *node;

    node=playlist;
    while(node)
    {
    ((PlaylistEntry *)node->data)->selected=!((PlaylistEntry *)node->data)->selected;
    node=node->next;
    }
    playlistwin_update_list();
    }


    void playlist_add(gchar *filename)
    {
    PlaylistEntry *entry;
    gchar *ext;

    entry=g_malloc0(sizeof(PlaylistEntry));
    entry->length=-1;
    entry->filename=g_strdup(filename);

    if(!playlist)
    {
    playlist=g_list_append(NULL,entry);
    playlist_position=playlist;
    }
    else
    g_list_append(playlist,entry);
    }

    void playlist_add_dir(gchar *path)
    {
    DIR *dir;
    struct dirent *dirent;
    struct stat statbuf;
    gchar *filename;

    if(dir=opendir(path))
    {
    while(dirent=readdir(dir))
    {
    if(dirent->d_name[0]!='.')
    {
    filename=g_strconcat(path,"/",dirent->d_name,NULL) ;
    stat(filename,&statbuf);
    if(S_ISDIR(statbuf.st_mode))
    playlist_add_dir(filename);
    else
    playlist_add(filename);
    g_free(filename);
    }
    }
    }
    }

    /*
    * I'm not sure if this is the correct way to do it but it seems to work fine
    */

    void playlist_add_url_string(gchar *string)
    {
    gint i=0,start;
    gchar *temp,*ext;
    struct stat statbuf;

    printf("%s\n",string);
    while(*string)
    {
    temp=strchr(string,'\n');
    if(temp)
    {
    if(*(temp-1)=='\r')
    *(temp-1)='\0';
    *temp='\0';
    }
    if(!strncasecmp(string,"file:",5))
    {
    stat(string+5,&statbuf);
    if(S_ISDIR(statbuf.st_mode))
    playlist_add_dir(string+5);
    else
    {
    ext=strrchr(string+5,'.');
    if(ext)
    {
    if(!strcasecmp(ext,".m3u")||!strcasecmp(ext,".pls" ))
    playlist_load(string+5);
    else
    playlist_add(string+5);
    }
    else
    playlist_add(string+5);
    }
    }
    else
    playlist_add(string);
    if(!temp)
    break;
    string=temp+1;

    }

    }

    void playlist_play(void)
    {
    PlaylistEntry *entry;
    gchar *ptr;

    if(get_playlist_length()==0)
    return;
    entry=(PlaylistEntry *)playlist_position->data;

    if(get_input_playing()) input_stop();

    input_play(entry->filename);

    if(input_get_time()!=-1)
    input_set_eq(cfg.equalizer_active,cfg.equalizer_pr eamp,cfg.equalizer_bands);

    }

    void playlist_set_info(gchar *title,gint length,gint rate,gint freq,gint nch)
    {

    PlaylistEntry *entry;

    entry=(PlaylistEntry *)playlist_position->data;

    if(entry->title)
    g_free(entry->title);
    entry->title=g_strdup(title);
    entry->length=length;
    mainwin_set_song_info(rate,freq,nch);
    mainwin_set_info_text();
    playlistwin_update_list();
    }


    void playlist_next(void)
    {
    if(!playlist) return;

    if(!cfg.shuffle) {
    if(g_list_next(playlist_position))
    playlist_position=g_list_next(playlist_position);
    }
    else
    playlist_position=g_list_nth(playlist,rand() % get_playlist_length());
    if(get_input_playing())
    {
    input_stop();
    playlist_play();
    }
    else
    {
    mainwin_set_info_text();
    playlistwin_update_list();
    }

    }

    void playlist_prev(void)
    {
    if(!playlist) return;


    if(g_list_previous(playlist_position))
    playlist_position=g_list_previous(playlist_positio n);
    if(get_input_playing())
    {
    input_stop();
    playlist_play();
    }
    else
    {
    mainwin_set_info_text();
    playlistwin_update_list();
    }
    }

    void playlist_set_position(gint pos)
    {
    if(!playlist) return;

    playlist_position=g_list_nth(playlist,pos);
    if(get_input_playing())
    {
    input_stop();
    playlist_play();
    }
    else
    {
    mainwin_set_info_text();
    playlistwin_update_list();
    }
    }

    void playlist_eof_reached(void)
    {
    input_stop();

    if(!cfg.shuffle) {

    if(!g_list_next(playlist_position))
    {
    playlist_position=playlist;
    if(!cfg.repeat)
    {
    mainwin_set_song_info(0,0,0);
    mainwin_set_info_text();
    return;
    }
    }

    else
    playlist_position=g_list_next(playlist_position);
    }
    else
    playlist_position=g_list_nth(playlist,rand() % get_playlist_length());


    playlist_play();
    }

    gint get_playlist_length(void)
    {
    if(!playlist)
    return 0;
    return g_list_length(playlist);
    }

    gchar *playlist_get_info_text(void)
    {
    PlaylistEntry *entry;
    gchar *text=NULL,*title,*tmp,*tmp2;
    gint i;

    if(playlist)
    {
    entry=(PlaylistEntry *)playlist_position->data;
    if(entry->title)
    title=entry->title;
    else
    {
    title=strrchr(entry->filename,'/');
    if(!title)
    title=entry->filename;
    else
    title++;
    }
    text=g_malloc(strlen(title)+20);
    if(entry->length!=-1)
    sprintf(text,"%d. %s (%d:%-2.2d)",get_playlist_position()+1,title,entry ->length/60000,(entry->length/1000)%60);
    else
    sprintf(text,"%d. %s",get_playlist_position()+1,title);
    if(cfg.convert_underscore)
    while(tmp=strchr(text,'_'))
    *tmp=' ';
    if(cfg.convert_twenty)
    while(tmp=strstr(text,"%20"))
    {
    tmp2=tmp+3;
    *(tmp++)=' ';
    while(*tmp2)
    *(tmp++)=*(tmp2++);
    *tmp='\0';
    }



    }
    return text;
    }

    int playlist_get_current_length(void)
    {
    PlaylistEntry *entry;

    if(!playlist) return 0;

    entry=(PlaylistEntry *)playlist_position->data;
    return entry->length;
    }

    gboolean playlist_save(gchar *filename)
    {
    PlaylistEntry *entry;
    GList *node;
    FILE *file;
    gchar *ext;
    gboolean is_pls=FALSE;

    if(file=fopen(filename,"w"))
    {
    ext=strrchr(filename,'.');
    if(ext)
    if(!strcasecmp(ext,".pls"))
    {
    is_pls=TRUE;
    fprintf(file,"[playlist]\n");
    fprintf(file,"NumberOfEntries=%d\n",get_playlist_l ength());
    }
    node=playlist;
    while(node)
    {
    entry=(PlaylistEntry *)node->data;
    if(is_pls)
    fprintf(file,"File%d=%s\n",g_list_position(playlis t,node)+1,entry->filename);
    else
    fprintf(file,"%s\n",entry->filename);
    node=node->next;
    }
    fclose(file);
    return TRUE;
    }
    return FALSE;
    }

    gboolean playlist_load(gchar *filename)
    {
    FILE *file;
    gchar *line,*ext,key[10];
    gint i,noe;
    int linelen=1024;

    ext=strrchr(filename,'.');
    if(!ext) ext=".m3u";
    if(!strcasecmp(ext,".pls"))
    {
    if(line=read_ini_string(filename,"playlist","Numbe rOfEntries"))
    {
    noe=atoi(line);
    g_free(line);
    }
    else
    return FALSE;
    for(i=1;i=noe;i++)
    {
    g_snprintf(key,10,"File%d",i);
    if(line=read_ini_string(filename,"playlist",key))
    {
    playlist_add(line);
    g_free(line);
    }
    }
    return TRUE;
    }
    else
    {
    if(file=fopen(filename,"r"))
    {
    line=g_malloc(linelen);
    while(fgets(line,linelen,file))
    {
    while(strlen(line)==linelen-1&&line[strlen(line)-1 ]=='\n')
    {
    linelen+=1024;
    line=(gchar *)g_realloc(line,linelen);
    fgets(&line[strlen(line)],1024,file);
    }
    while(line[strlen(line)-1]=='\r'||line[strlen(line )-1]=='\n') line[strlen(line)-1]='\0';
    playlist_add(line);
    }
    fclose(file);
    return TRUE;
    }
    }
    return FALSE;
    }

    GList *get_playlist(void)
    {
    return playlist;
    }

    gint get_playlist_position(void)
    {
    return g_list_position(playlist,playlist_position);
    }

    gint playlist_sort_by_title_cmpfunc(PlaylistEntry *a,PlaylistEntry *b)
    {
    gchar *a_title=NULL,*b_title=NULL;
    if(a->title)
    a_title=a->title;
    else
    {
    if(a->filename[0]='/')
    a_title=strrchr(a->filename,'/')+1;
    if(!a_title)
    a_title=a->filename;
    }

    if(b->title)
    b_title=b->title;
    else
    {
    if(b->filename[0]='/')
    b_title=strrchr(b->filename,'/')+1;
    if(!b_title)
    b_title=b->filename;


    }
    return strcasecmp(a_title,b_title);
    }


    void playlist_sort_by_title(void)
    {
    playlist=g_list_sort(playlist,(GCompareFunc)playli st_sort_by_title_cmpfunc);
    }

    gint playlist_sort_by_filename_cmpfunc(PlaylistEntry *a,PlaylistEntry *b)
    {
    gchar *a_filename=NULL,*b_filename=NULL;
    if(a->filename[0]='/')
    a_filename=strrchr(a->filename,'/')+1;
    if(!a_filename)
    a_filename=a->filename;

    if(b->filename[0]='/')
    b_filename=strrchr(b->filename,'/')+1;
    if(!b_filename)
    b_filename=b->filename;

    return strcasecmp(a_filename,b_filename);
    }


    void playlist_sort_by_filename(void)
    {
    playlist=g_list_sort(playlist,(GCompareFunc)playli st_sort_by_filename_cmpfunc);
    }

    gint playlist_sort_by_path_cmpfunc(PlaylistEntry *a,PlaylistEntry *b)
    {
    return strcasecmp(a->filename,b->filename);
    }


    void playlist_sort_by_path(void)
    {
    playlist=g_list_sort(playlist,(GCompareFunc)playli st_sort_by_path_cmpfunc);
    }

    void playlist_reverse(void)
    {
    playlist=g_list_reverse(playlist);
    }
  • Look, this is really quite simple:
    1. x11amp is free
    2. Gtk+ 1.1.14 is pretty close to Gtk+ 1.2.0
    3. There are a fairly large number of differences between the two, depending on what you are doing.
    4. Pursuant to #4, if your code heavily uses the heavily affected areas, it will be a lot of work to switch.
    5. Seeing as how both 2 & 4 are true, it will minize your work the most to use Gtk+ 1.1 until 1.2 comes out.
    6. Seeing as how 1 & 5 are true, your best course of action is to use Gtk+ 1.1 until Gtk+ 1.2 comes out.
    7. Some users might complain that they don't get to use your bleeding edge program without using the bleeding edge libraries.
    8. Pursuant to 7, your best course of action is to politely point out the GPL on your program, and invite them to patch their copy to work with non-development libraries, and then distribute it if they wish.
    9. Some users won't do any work but sit around and complain that people aren't giving them free stuff exactly how they want it.
    10. Point out that they aren't really who are meant to get the software, they are just a sideeffect of the freedom involved.
    11. Also point out that a little humility and gratitude go a long way.
    12. Also point out that it is improper for a non-coder to criticise the ways of a coder, or for a beginning coder to criticize the decisions of a master coder.

    Look, it's one thing if you are poitning out some sort of moral issue, free versus proprietary, etc. That's everyone's duty to (a) complain about and (b) fix as best they can. Every good open source application that's written weakens the power of closed source software, and every voice that cries against proprietary software helps, too. The money that purchases open source CDs, hires open source programmers, reads open source magazines, buys computers from vendors who install open source operating systems, or purchases services and manuals from open source developers helps even more. This has absolutely nothing to do with that. Do you have something more valid to say than open source developers shouldn't develop for their target platforms, but instead for older ones? I bet, if you look at it, that X11amp will be in its stable version around the time that Gtk+ 1.2 comes out. Therefore that is probably its target platform. If there target platform is Gtk+ 1.2, it makes a hell of a lot more sense to develop on Gtk+ 1.1.x then 1.0.x. It's one thing to switch in the middle of a stable version, but you're complaining about a development version being in development?

    Lastly, x11amp is an mp3 player. This isn't the kernel or libc that we're talking about. you can (a) live without it for a few months and (b) choose another one. Just learn from the closing verse to MST3K's theme song, "Repeat to yourself 'It's just a show' - I should really just relax!"
  • And who exactly is going to bug-test the libraries? I mean - changing the source slightly when the nexts stable library comes out can't be that hard (Spoken with no experience whatsoever. Correct me if I'm wrong) It sounds as if it all works at the moment so stop fretting - just wait until it comes out in a nice stable package for your enjoyment. Thats generally what I do.
  • Thank you X11 Amp people. My linuxPPC box awaits your Glorious program!
  • forgot to compile X with threading support last time. damnit

8 Catfish = 1 Octo-puss

Working...