XMMS meta-input plugin
----------------------

Description
-----------

  This plugin allows you to write XMMS plugins as Unix programs. You write
a program that understands the very simple commands on its command line
and outputs raw sound on its standard output and you're done with it.

  What's good (and in fact the purpose of this plugin) is that you can
write input plugins for XMMS in C shell or Bash! Of course, you won't
be able to do much number crunching in a shell script, but you can use
it to run other programs to do the actual playing.


Example:
You have just downloaded all these wonderful .murz sound files, and you
can play them on the command line with the mighty "murzplay" program,
but now that you come to think of it, it would be cool if you could play
them with XMMS just to be able to use your remote control, make playlists
and the like.

So if murzplay can output the sound to its standard output, all you have
to do is write a litte wrapper script around murzplay, move it to the
meta-input player directory and you can now play those .murz files with
XMMS :-)


The interface
-------------

  So what shoud the player (i.e. the shell script) be able to do to work
with this pluggin? First, it needs to tell the plugin when it knows a
file type. The plugin will run the player as follows

  murz-player isOurFile <filename>
  
and the player should return the value 0 in case it can play the file
and -1 if it cannot.

  Then it needs to do the actual playing:
  
  murz-player play <filename>
  
in which case, the player should output 44100 Hz, 16 bits stereo raw sound
to its standard output until the music is over.


  That's it. It's as simple as possible for the player, and that makes
it braindead easy to write a new player. Just look inside the Examples
directory to have a look by yourself. Also, those examples don't look
at a file's extension to know its type but use the "file" command on
them instead. It's slower, but it's one step away from Micro$oft 8+3
nonsense :-) Burn all your music CDs with extensionless files! Annoy
your Windos friends!


  The interface is going to evolve to allow a player to do more things
a regular C input plugin can do (like give the real name and length of
a file). But right now, it's sufficient and it will stay compatible since
the player just has to return -1 when asked to do something it doesn't
know about.


Know bugs
---------

It should be possible to tell
the plugin to limit the playing time of file types that keep looping
for ever. It should accept many sound types and not just 44100/16/2.
Etc, etc, etc.


  In case you want to know, I wrote this because I have CDs full of
zipped modules, and since the command line Mikmod can play zipped files,
I figured out I should do something to use it inside of xmms. I also
wanted to listen to midi files with all kind of weird command line
arguments to Timidity.


 23/05/2001
 Mikael Bouillot
 <mikael dot bouillot at bigfoot dot com>
 ICQ: 22190326
