xfmusic4 alpha release

Brian J. Tarricone bjt23 at cornell.edu
Mon Jul 12 07:18:50 CEST 2004


hi all-

for the past few weeks i've been working on a simple music player for 
xfce4, and it's come along much nicer than i thought it would.  there 
are still a lot of issues to work out, and some things that don't work 
yet, but i think it's ready for a general alpha release.

you can grab a source tarball here:
http://spuriousinterrupt.org/xfce4/files/experimental/xfmusic4-4.1.2.tar.gz

if you want to see what it looks like first:
http://spuriousinterrupt.org/stuff/xfmusic-expanded-4.1.2.png
http://spuriousinterrupt.org/stuff/xfmusic-collapsed-4.1.2.png

unfortunately (for some of you), at this time, xfmusic4 (the GUI at 
least) requires gtk 2.4.0 or higher.  you also need either ALSA, esd, or 
libao for audio output.  or you can just write out wave files ^_~.

PLEASE read the toplevel README before asking me why file format X 
doesn't play.  the end of the ./configure output will be useful too.  i 
know there are bugs, and i know some things aren't finished yet, but 
please don't tell me about them unles it isn't listed in the toplevel 
TODO file.  otherwise, feedback would be much appreciated.  a word of 
warning: this is likely to change quite a bit, so i'd suggest installing 
it to its own prefix (such as /opt/xfmusic4).

there's no public CVS for this yet, but if olivier and the others 
approve, i'd like to import this into xfce CVS at some point.

enjoy - feel free to email questions and bug reports directly to me so 
as to keep the list open for "real" xfce traffic.

    -brian

p.s.  here's the part most of you won't care about, but if you're 
interested in how this thing is designed, read on.

the entire thing is based on a backend library (which contains no GUI 
code), called libxfmusic4.  the library can use 3 types of plugins - 
input, filter, and output plugins.

input plugins are there to get data from... wherever... and decode it 
depending on what format the data is (mp3, vorbis, wave, etc.).  so far, 
they can read data from files or streamed from stdin.  i'm planning on 
adding support for retrieving files via http, and maybe other network 
protocols.

filter plugins sit after the input plugins, and can modify the audio 
data in whatever way they want - or they can just watch the data go by 
and do something cool with it.  the idea here is that they can be 
activated and deactivated at will, and you can do things like 
resampling, audio effects, visualisation, etc.

finally we have the output plugins, and their responsibility is simply 
to get the data to your sound card.  they also have to look at the 
incoming audio format and possibly convert it to something else if the 
selected output device can't handle it.  i've also written a wave-out 
plugin, which can write any stream it can decode into a wave file.  the 
GUI can't make use of this yet, however (but the cmdline frontend can).

the library itself is multithreaded, using Glib's threading primitives, 
so all frontends must first call g_thread_init() (and g_type_init(), if 
it isn't a gtk+ frontend).  the design is relatively simple; there's the 
main processing thread, and the audio thread.  the audio thread just 
sits in a loop and grabs data from the selected input plugin, pushes it 
through any active filter plugins, and then sends it to the output 
plugin.  the main thread sends messages to the audio thread when it 
needs it to do something other than that.  the player engine itself 
(XfMusic) is wrapped in a GObject and can be instantiated, controlled, 
and destroyed like other glib or gtk objects.  the library is (as far as 
i know) thread-safe and reentrant, so you can have multiple XfMusic 
instances active in the same process if you wanted to.  theoretically, 
anyway.

that's about it, i think.



More information about the Xfce4-dev mailing list