changeset 1:183e7cbc1036

Initial revision
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 03 Jun 2003 10:23:04 +0000
parents 5ce0a94edc2e
children 041bebb28dc0
files .cvsignore .cvsignore AUTHORS AUTHORS BUGS BUGS COPYING COPYING ChangeLog ChangeLog INSTALL INSTALL Makefile.am Makefile.am NEWS NEWS README README README.bugreport README.bugreport README.songpos README.songpos TODO TODO acinclude.m4 acinclude.m4 acsidplay.m4 acsidplay.m4 autogen.sh autogen.sh configure.in configure.in src/.cvsignore src/.cvsignore src/.cvsignore src/Makefile.am src/Makefile.am src/Makefile.am src/xmms-sid-logo.xpm src/xmms-sid-logo.xpm src/xmms-sid-logo.xpm src/xmms-sid.cc src/xmms-sid.cc src/xmms-sid.cc src/xmms-sid.h src/xmms-sid.h src/xmms-sid.h src/xs_about.c src/xs_about.c src/xs_about.c src/xs_config.c src/xs_config.c src/xs_config.c src/xs_fileinfo.cc src/xs_fileinfo.cc src/xs_fileinfo.cc src/xs_init.c src/xs_init.c src/xs_init.c src/xs_stil.c src/xs_stil.c src/xs_stil.c xmms-sid.glade xmms-sid.glade xmms-songpos.patch-1.2.2 xmms-songpos.patch-1.2.2 xmms-songpos.patch-1.2.5 xmms-songpos.patch-1.2.5 xmms-songpos.patch-1.2.7 xmms-songpos.patch-1.2.7
diffstat 30 files changed, 7049 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.cvsignore	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,19 @@
+Makefile
+Makefile.in
+*.bak
+*.spec
+*.lsm
+config.*
+configure
+confdefs.h
+aclocal.m4
+stamp*
+libtool
+ltmain.sh
+ltconfig
+missing
+mkinstalldirs
+depcomp
+install-sh
+old
+pixmaps
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AUTHORS	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,10 @@
+xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+==============================================================
+
+Original xmms-sid author: Willem Monsuwe
+
+This branch (post v0.4) authored and maintained by
+Matti "ccr/TNSP" Hamalainen
+
+Special thanks to Michael Schwendt for making libsidplay.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BUGS	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,13 @@
+Known bugs
+==========
+
+* Not really xmms-sid bug, but since it affects us:
+
+  The default xmms-config script created by XMMS package is faulty.
+  It does not properly accept the --prefix parameter (it does not affect
+  the paths outputted by it) and therefore, due to how the rpm building
+  works (changes the --prefix to the build directory) it is impossible
+  (currently) to make a working RPM .spec-file without spurious kludging. 
+
+  I am not interested to make these kludges and so this is why the .spec
+  for xmms-sid does not produce a RPM package file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ChangeLog	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,353 @@
+2002-09-02  Matti Hämäläinen (ccr/TNSP)  <ccr@tnsp.org>
+
+	* version 0.7.4
+
+	* Patch from Euan MacGregor to fix bug with
+	"Determine filetype by contents" option enabled
+	crashing XMMS-SID when trying to play a file
+	that does not exist. Thanks!
+
+	* Fixed a bug in About-dialog, patch from OpenBSD
+	project's PortsPlus tree. Thanks BSD-guys! :)
+
+	* Fixed free() of internal Gtk-data in config-dialog,
+	which caused crash if opening+closing config-dialog
+	multiple times.
+
+	* Added in LE->NE 16-bit audioformat patch from
+	OpenBSD-project. I'm not entirely sure what's the
+	difference, but it did not break at least Linux/x86. :)
+
+	* Added in updated songpos-patch for XMMS 1.2.7
+	
+2002-02-26  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7.3
+
+	* Fixed to work with latest libsidplay, needed
+	to add linking to libstdc++.
+	
+2001-11-18  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7.2
+
+	* Updated libtool to v1.4
+
+	* Again fixed the song-pos patch. Sorry.	
+
+	* Minor fixes backported from 0.8-betas
+
+2001-07-20  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Uh oh. The v0.7 release version's song-position
+	patch (v1.2.4 one) was flawed. It was against CVS
+	repository and not a normal source tree.
+
+	A new stable v0.7.1 released to fix this issue.
+
+	Additionally the new v1.2.5 patch also fixes
+	(aka comments out) an unused(??) function that
+	caused trouble when compiling XMMS 1.2.5 under RH7.1.
+
+	* Fixed a bug in STIL COMMENT-parsing. There must be
+	a whitespace between after line end.
+
+2001-07-19  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Improved README, added "usage"-section.
+
+2001-07-16  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Improved README.songpos documentation.
+
+2001-06-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Started working on new version, 0.8beta0 ...
+
+	* Designed additions to configuration dialog.
+
+	* Drew new logo for about-box.
+
+	* Examined UADE subsong selector, planning
+	how to implement it in XMMS-SID (due to many
+	requests from users :-D )
+
+2001-05-28  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Sub-song name is now shown in the sub-song
+	selector of the file-information window.
+
+2001-05-26  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7 (final)
+
+	Enjoy this new release, see you in version 0.8
+	development stage!
+
+	- ccr/TNSP @ Relletti, Ruukki, Finland
+	Local    : Sat May 26 23:23:41 EEST 2001
+	Universal: Sat May 26 20:23:41 UTC 2001
+
+	* Added the file-selector (browse) to the STIL
+	configuration panel for selecting the database-file.
+
+	* Modularized and partially re-wrote the STIL-parsing
+	function, now handles multiple data-entries for one
+	sub-song and other improvements. Cleaned up the code too.
+
+2001-05-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* More comments
+
+	* Improved the SID-story-telling in README :)
+
+	* Fixed last remaining issues in file-info dialog.
+
+2001-04-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7beta9
+
+	* Fixed RedHat 7.x compability problems, should
+	now compile with RH's "gcc" "2.96" in 7.0 and 7.1.
+	(Don't know for sure, though, tested with 7.1)
+
+2001-04-22  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7beta8
+
+	* WHOA! A long time since last update!
+
+	* Fixed STIL parsing, should now work OK. The
+	STIL info-window is not yet finished.
+
+	* Makefile.am: Had forgot to include autogen.sh, added.
+
+	* configure.in: Fixed user-specified --libdir option.
+	(Was overwritten by AM_PATH_XMMS() previously)
+
+	* Few general bugfixes.
+
+	* Added the further improved XMMS songpos-patch
+	from Willem! Thanks and greets to him.
+
+2001-01-19  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Noticed several bugs in STIL parser, need to fix.
+
+2001-01-17  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Fixed probable bugs in STIL handling.
+
+2001-01-16  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7beta6
+
+	* Fixed few minor memory leaks.
+
+	* Changed XMMS-configuration file ident from "SID" to
+	"XMMS-SID" to prevent conflicting with the old (0.4
+	and older) XMMS-SID versions. (The values from old
+	configs could cause problems)
+
+	Not the 'cleanest' way to do it, as the old configs
+	stay on the config file, but detection routine for
+	old config would have been overkill.
+
+
+2001-01-15  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Cleaned up the error messages, now more informative.
+	Thanks to Willem for reminding me.
+
+	* Also macrofied the error printing not to repeat code.
+
+	* Now handles properly "no-previous-config" situation
+	instead of crashing. The values were initialized, but
+	got to nowhere. Fixed. Thanks to Willem for this one too.
+
+2001-01-13  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Improved speed of STIL support, simple "caching" now enabled.
+	(I just keep the previous tune's infos on memory
+	in case it gets reused)
+
+2001-01-12  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Lots of cleanups, re-wrote function and variable names
+	to match a 'standard', now nice.
+
+2001-01-12  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* xs_stil.c: added support for more information fields:
+	NAME, COMMENT
+
+	* xs_stil.c: fixed parser bug in case when STIL record
+	is the last on on file, found did not get set. (standard
+	STIL releases did not cause this bug to occur)
+
+2001-01-11  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Worked on the STIL handling code. Parser is in works,
+	will be able to get all relevant info. Supports both
+	DOS CR/LF and *NIX LF format STIL database files.
+
+2001-01-03  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Added (finally) the file-selector/browser for
+	the STIL database setting on the config panel.
+
+	* Worked on the fileinfo-dialog. (not yet on the
+	main source, just experimenting)
+
+2001-01-01  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7beta5 released
+
+	* Added BUGS (somehow got forgotten before) to
+	Makefile.am extradist.
+
+	* Updated docs and copyrights for 2001
+	(uhh, I am afraid that we don't see the intelligent
+	computers or even the first trip to Mars this year ;-)
+
+	* Added README.bugreport
+
+2000-12-25  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* New debugging macros.
+
+2000-12-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Added README.songpos
+
+2000-12-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* version 0.7beta4 (internal)
+
+	* Made songpos-patch compatible with XMMS 1.2.4.
+	(now available in two flawours: for 1.2.2 and 1.2.4)
+
+	* configure.in: more informational messages when
+	some library (or similar) is not found.
+
+2000-11-11  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* FINALLY updated the xmms-songpos.patch to work with
+	XMMS 1.2.2 and above.
+
+2000-11-07  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* INSTALL, README: fixes, changes, clarifications.
+
+	* Re-designed the fileinfo dialog. Now much more robust
+	and has needed fields for future enchantments.
+
+2000-11-05  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Released 0.7beta for limited public testing.
+
+	* xs_fileinfo.cc: Basics of the new fileinfo dialog.
+	Not quite how it will be when final.
+
+2000-11-04  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Started implementing new file information dialog.
+
+	* Version 0.7beta
+
+2000-10-01  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Version 0.6beta
+
+	* xmms-sid.cc: Now the file-description setting
+	(in configuration STIL panel) works and is parsed.
+
+	* Filter settings work.
+
+2000-09-29  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* xs_config.c: Configuration and aboutbox
+	work now fine.
+
+	* xs_config.c: Fixed loading and saving. The new
+	configuration system now works and it should be
+	easier to modify the variables, etc.
+
+2000-09-27  Matti (ccr/TNSP) Hamalainen  <mhamalai at ratol.fi>
+
+	* Configuration dialog: Added STIL settings.
+	Stil bugs somewhat, the cancel-button does not
+	work. (Does not close the window, but deletes
+	ITSELF instead!?! Hmmm... :-)
+
+2000-09-24  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* New aboutbox-dialog.
+
+	* New configuration dialog (bit buggy):
+		- Can set filter parameters
+
+	* Miscellaneous improvements.
+
+2000-09-19  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Fixed some bugs in .spec file.
+
+	* Created a logo for the aboutbox.
+
+	* Started creating a more flexible configuration file
+	reading and saving, etc. One can add new settings more
+	easily, without adding a bunch of xmms_cfg_read_XXX()'s.
+	Probably less error prone too. See xmms-sid.h for more.
+
+2000-09-18  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Added a preliminary .spec file for RPM generation.
+
+	* Fixed some bugs in documentations
+
+	* Started integrating the config panel into the source.
+	(Can't use the Glade generated code directly, it would
+	be too cumbersome due to the fact how Glade does it ;)
+
+	* Added autogen.sh to make world a better place ;)
+
+	* Working on a new configuration panel, with Glade.
+
+2000-09-17  Matti (ccr/TNSP) Hamalainen  <ccr@tnsp.org>
+
+	* Bumped up the version number to 0.5
+
+	* sidplay.cc, sid.c: combined and moved to xmms-sid.cc
+
+	* sid.h: Moved to xmms-sid.h
+
+	* Makefile.am: Updated to above changes.
+
+	* Cleaned up sources
+
+	* configure.in: Fixed bugs, cleaned up and changed
+	to use the XMMS_PATH() macro to get the Input plugin
+	path and other information instead of the Willem's
+	slightly hacky method. Set xmms require to v1.2.0.
+
+	* Fixed the STIL reading (still quite rudimentary)
+
+
+Mon Nov  1 05:08:06 CET 1999  Willem Monsuwe <willem@stack.nl>
+
+	* More clean split between C++ and C code.
+
+	* Rudimentary STIL support (dump entry in file info window)
+
+Mon Oct  1 16:32:34 CEST 1999  Willem Monsuwe <willem@stack.nl>
+        
+	* configure.in: --with-sidplay-* options
+
+	* configure.in: Better recognition of unusual install directories
+
+Sat Aug  7 03:29:44 CEST 1999  Willem Monsuwe <willem@stack.nl>
+	
+	* Finished the first package with configure script etc.
+
+	* ChangeLog: Started ChangeLog
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INSTALL	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,55 @@
+Requirements
+============
+- XMMS version 1.2.0 or later (http://www.xmms.org/)
+- libsidplay 1.36.xx or later (preferably latest version)
+- Gtk+ and Glib 1.2.2 or later (http://www.gtk.org/)
+
+
+Where to get XMMS?
+==================
+Latest version of XMMS should be available from
+
+	http://www.xmms.org/
+
+Please refer to XMMS documentation for information
+on it's usage and installation (etc).
+
+
+Where to get libsidplay?
+========================
+XMMS-SID requires the libsidplay to play the SID tunes
+(as XMMS-SID is just an "libsidplay interface for XMMS").
+
+The library is available at SIDPlay's homepage:
+
+http://www.geocities.com/SiliconValley/Lakes/5147/sidplay/
+
+You only need libsidplay, the sidplay-base is not necessary
+if you are sure that you don't need the commandline player.
+
+(NOTICE!!! XMMS-SID cannot use sidplay2 as it is completely
+different from sidplay v1!! Support may be added in future,
+however.)
+
+
+Installing xmms-sid
+===================
+
+Simply run the following commands:
+
+./configure
+make
+make install
+
+(Run "make install" as superuser/root if you are
+installing for the whole system.)
+
+
+Notes
+=====
+* If "configure" script is not present, run ./autogen.sh
+
+* The configure script uses xmms-config to guess the correct location
+  to install the plugin files (.so and .la). If you want to install them
+  to another place, run configure with --libdir=<path> option.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.am	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,20 @@
+# Require automake 1.4
+AUTOMAKE_OPTIONS = 1.4
+
+# Directories to be BUILT and INSTALLED
+SUBDIRS = src
+
+# Additional directories to be included in DISTRIBUTION
+DIST_SUBDIRS = $(SUBDIRS)
+
+# All the rest of the distributed files
+EXTRA_DIST =			\
+	xmms-songpos.patch-1.2.2	\
+	xmms-songpos.patch-1.2.5	\
+	xmms-songpos.patch-1.2.7	\
+	acsidplay.m4		\
+	xmms-sid.glade		\
+	README.songpos		\
+	README.bugreport	\
+	BUGS			\
+	autogen.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NEWS	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,58 @@
+xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+==============================================================
+List of user-visible changes in XMMS-SID (See ChangeLog for
+more complete listing of changes)
+
+Version 0.7
+===========
+* Much improved file information dialog. Now shows all relevant
+  info neatly and orderly. Parses STIL information and shows it
+  on fileinfo if enabled.
+
+* Updated the xmms song-position patch which makes possible
+  to use the position slider to change sub-tune SID and also
+  pattern position in MikMod plugin. Now patches and works
+  correctly with recent XMMS versions.
+
+* STIL-database file-selector in config dialog.
+
+* Additional improvements from Willem to the song-pos patch!
+
+* And the standard load of bugfixes and minor improvements.
+
+
+Version 0.6
+===========
+Improved configuration:
+
+ - Filters are now configurable, you can adjust all three
+   parameters of libsidplay: FS, FM and FT. See "Filter"
+   panel of configuration dialog.
+
+ - STIL database path can be set and STIL usage can be enabled
+   and disabled from configuration dialog's "STIL" panel.
+
+ - Songname / info is now configurable like in the mpg123 plugin,
+   with %1..%n, see the "STIL" panel of configuration dialog.
+
+
+Version 0.5
+===========
+This version is a "new branch" based on the original
+xmms-sid v0.4 by Willem Monsuwe.
+
+This development branch is maintained by Matti "ccr" Hamalainen of TNSP.
+
+Please consider that when thinking where to send bug reports.
+
+ - Few minor bugfixes.
+ - STIL support works now better (quite beta still, though)
+ - Cleaned up sources somewhat.
+ - Added a about dialog.
+ - Re-organized the source structure.
+ - Improved detection of the XMMS paths and stuff in configure.
+
+
+Version 0.4 
+===========
+ - First release, so nothing new.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,156 @@
+xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+==============================================================
+
+XMMS-SID is originally by Willem Monsuwe.
+Additional fixes, features added were added by
+Matti "ccr" Hamalainen of Tecnic Software productions (TNSP),
+who also nowadays maintains this package.
+
+!! NOTICE: Please do not contact Willem about this version,
+since the bugs and quirks are probably made by me (ccr) now. !!
+
+General Introduction
+====================
+XMMS-SID is a plugin for XMMS (X MultiMedia System) which provides
+support for playing the so-called "SID tunes". For the actual playing,
+XMMS-SID uses the excellent libsidplay SID-chip/6502 emulator engine.
+(See "INSTALL" where to get libsidplay)
+
+If you are not familiar with the term "SID tune" or "SID" concept at
+all, a short (yes it is! ;-) explanation follows:
+
+SID is the sound chip that was used in many of the old 8-bit home
+computers manufactured by Commodore Inc. in 1980's. Best known of
+those was the Commodore 64 home computer (aka C64 or CBM64, also
+known as VIC-64 in some countries).
+
+
+The Sound Interface Device (SID) was one of the most advanced sound
+chips at the time. It's capabilities surpassed all of the other chips
+on the 8-bit home computer market and even most of the ones used in
+arcade game systems. Thousands of games were produced for C=64 in
+1980's and beginning of 1990's, many of them having excellent musical
+score. Best of those tunes are still regarded at least legendary,
+such as songs by Martin Galway (for games Arkanoid, Green Beret,
+Yie Ar Kung Fu 1 & 2, Parallax...), Rob Hubbard (Commando, Auf
+Wiedersehen Monty, Monty on the Run, Warhawk, Sanxion, Delta...),
+Ben Daglish (Jack the Nipper 1&2, Way of the Tiger, Cobra, Avenger...)
+and numerous other legendary composers. Some of them quit their
+composing quickly after the 8-bit period, but some are still working
+in the computer music business. (Like Maniacs of Noise, Chris
+Huelsbeck, Richard Joseph and ex. MON member Charles Deenen who
+worked with Fallout 1's musical score)
+
+
+Today, years after the decline of 8-bit computers, many composers
+(mainly from C64 demoscene) continue to compose tunes for SID and
+get most amazing things out of it -- things that the designers of
+the SID would have never believed.
+
+For example: SID has only three sound channels, but there are tunes
+that use special techniques to "multiplex" them to sound like four
+or even six channels. Also these three channels are "limited" to
+synthesized sounds, kind like the FM sounds produced by old Sound Blaster
+cards on PC. But again, using a certain 'bug' in SID chip, composers
+were able to push the limits farther ... Martin Galway's very famous
+piece on Arkanoid game was the "first" (later it has been proven that
+Chris Huelsbeck's Bad Cat was the first but was released later) to
+feature DIGITIZED SAMPLES like speech, etc.
+
+...
+
+So this is the story in short. The "SID tunes" are usually understood
+to be the files that contain the C64 machine code and data that plays
+the music. SID players (or emulators) are programs that emulate the
+SID chip capabilities and other parts of C64 hardware to produce
+almost authentic re-creation of the original music. SID-files (aka
+SID tunes) can be created by ripping the music routines and data from
+some game or just composing the music with some editor.
+
+XMMS-SID is interface for one of those emulators, probably the best
+one: (lib)SIDPlay by Michael Schwendt.
+
+...
+
+Hopefully I didn't make you bored with my chit-chat :)
+
+-ccr/TNSP
+
+
+Where to get SID tunes?
+=======================
+There are many collections of SID tunes on the Internet, but
+probably the best one and best known one is the High Voltage
+SID Collection aka HVSC.
+
+It is available at: http://hvsc.c64.org/
+
+HVSC contains the tunes ripped from all legendary C64 games,
+loaders, etc. And more. There are over 15,000 tunes in the
+HVSC version 4.0 and more are coming. HVSC also contains the
+STIL database (SID Tune Information List) that contains lots
+of information about many of the tunes included in HVSC.
+XMMS-SID supports the STIL database and info about the playing
+tune can be viewed with the "XMMS fileinfo" window (CTRL+3).
+STIL information can contain comments from composers, information
+about if the tune is a cover and historically interesting facts
+about games, etc...
+
+
+Usage
+=====
+Using the plugin is quite simple, if you are familiar with XMMS,
+then you already know how to use XMMS-SID. The configuration of
+the plugin should be quite self-explanatory and the default settings
+are usually satisfactory. The only thing that you probably
+need to touch in the config dialog is the "STIL-database path"-setting,
+if you have the HVSC-collection and want to use STIL-database.
+
+Simply point the STIL-db path to "STIL.txt"-file that resides
+under "DOCUMENTS"-subdirectory of HVSC-rootdir. For example,
+I use the following path: "/usr/src/C64Music/DOCUMENTS/STIL.txt".
+(My HVSC resides under "/usr/src/C64Music")
+
+
+Notes
+=====
+* If the plugin doesn't recognize your sidtunes, try checking the
+  'Determine filetype by contents' option in the xmms-sid config window.
+  This is horrendously slow if you're reading a 10000-tune playlist,
+  though.
+
+* For those who don't know it: Autopanning and stereo are not native to
+  the original SID chip on C64&all, but are extra options implemented in
+  libsidplay. So if you think that the tune does not sound as it sounds
+  on the real C64 (or other SID using machine), use the Mono setting.
+
+* xmms-sid's configuration panel has been enchanged (from v0.6)
+  to have the libsidplay's SID filter configuration parameters. You
+  can tune them if you know what you're doing and maybe want to make
+  xmms-sid sound more like your own C64's SID (as some of you may
+  remember, the original SID 6580 had the infamous filter bug that
+  made every chip sound somewhat different!). If you don't know what
+  to do with these settings, just press the Reset Values button to
+  get the working defaults of libsidplay.
+
+* The "kb/s rate" box is actually the play rate in Hz, so you can
+  see if it's an NTSC or PAL song (if you haven't set the Force Speed
+  option).
+
+* Read file "README.songpos" for additional fun.
+
+
+Contacting and where to get new versions
+========================================
+New releases of this plugin should be available at TNSP's WWW
+homepages, see below for address. Bug reports, suggestions,
+patches, etc. should be sent to ccr.
+
+ccr's e-mail: mhamalai@ratol.fi
+
+	OR  : ccr@iobox.com (if the one above does not work)
+
+TNSP's WWW  : http://www.tnsp.org/
+
+TNSP e-mail : tnsp@iobox.com
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.bugreport	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,79 @@
+Making and sending bugreports
+=============================
+Consider the following things before writing a bug-report.
+
+1. Type of the bug:
+
+- Sound-distortion?
+
+  This may not be directly XMMS-SID bug, but more like SIDPlay bug.
+  Check the SID-tune with SIDPlay commandline player. If the problem
+  shows up there, you should check that the tune itself is not
+  corrupted (or it may even be that it _should_ sound like that).
+
+  The High Voltage SID Collection (HVSC) and SID Tune Information List
+  (STIL) homepages contain tips and guidelines for SID-tune rippers +
+  information on bugged tunes.
+
+  If the tune that sounds bad is available on HVSC, compare it with
+  the one available from latest version of HVSC. Read the HVSC buglists
+  and other informations (the STIL database contains info about bugged
+  tunes)
+
+  Ultimately you should check the tune on a REAL C64, but since many of
+  the younger computer users don't even have the real thing, this may
+  be impossible. (If the tune works on REAL C64, i.e. NOT EMULATOR!!!!
+  it may be a bug in SIDPlay)
+
+
+- Segfault?
+
+  Again, check the tune on commandline SIDPlay. If it also segfaults,
+  report the bug to SIDPlay author, Michael Schwendt.
+
+  If it does NOT segfault with commandline SIDPlay, report it to me (ccr).
+  See README for contacting information.
+
+- New feature?
+
+  Well, check on the commandl... ehh. :-)
+
+  Send the suggestions, shit, hatemail, patches and your valuables to
+  ccr/TNSP, contacting information available on README.
+
+
+
+2. Example-layout for bug-reports
+
+Here is an example layout for your bug-report. Feel free to
+use your own, or put in additional information.
+(Send it via e-mail, using subject: "XMMS-SID BUG")
+
+
+Operating system   :		(uname -a)
+Version/release    :
+Vendor             :
+
+
+XMMS-SID version   :		(XMMS plugin preferences panel)
+
+libsidplay version :		(sidplay -h)
+
+XMMS version       :		(xmms --version)
+
+Are you using songpos-patch?	(if you applied the patch, answer yes)
+
+
+Description of the bug?
+-----------------------
+
+
+How to reproduce the bug?
+-------------------------
+
+
+Other information
+-----------------
+
+[If the bug is/causes a segfault, include a backtrace if possible.]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.songpos	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,46 @@
+Introduction
+============
+The XMMS-SID plugin will work much better if you install the song
+position patch ("xmms-songpos.patch*") which makes it possible for
+the plugin to use the position slider to choose subtunes. 
+
+It also patches some other plugins (like MikMod plugin) for
+improved features. Additionally, the patch for XMMS 1.2.5
+has a dirty hack fix 
+
+Patching
+========
+Short instructions of patching XMMS for the uninitiated ;-)
+
+(Substitute the 1.2.5 version number with the appropriate version)
+
+1) Unpack the XMMS source distribution:
+
+	tar -xzvf xmms-1.2.5.tar.gz
+
+2) cd xmms-1.2.5
+
+3) Choose appropriate patch:
+   If you have XMMS version 1.2.0-1.2.3, choose patch version 1.2.2
+   With 1.2.4 and later, choose patch version 1.2.5!
+
+4) Patch the XMMS (with the selected patch file)
+
+   patch -p1 < /some/where/xmms-songpos.patch.1.2.5
+
+5) If the patch succeeded (no failures, no .rej files), you
+   can now compile and install the XMMS. (Read through XMMS
+   documentation how to do it if you don't already know)
+
+   If some part of the patch does not succeed, you may need
+   to fix it by hand. Or you could just not use the patch :)
+
+   (See the TODO-file for what I have planned to remedy this patch with!)
+
+
+NOTICE
+======
+If you patched and recompiled XMMS _after_ you had already used
+XMMS-SID, you need to re-compile XMMS-SID too to make it use the
+patch features!
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TODO	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,45 @@
+xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+==============================================================
+
+- [for v0.8 ?]
+  Some way to determine if a tune has stopped playing (yeah, right..)
+  Implementation suggestions:
+  * Use HVSC length database (from SIDPlay's homepage)
+  * For looping tunes, use configurable "max playing time"
+  * User should be able to turn length-detection off/on
+  * Maybe also somekind "silence treshold" detection scheme?
+  * Combination of all those methods above?
+
+  Any of the above methods don't provide an 'exact' result due to
+  various reasons:
+
+  a) It is fundamentally impossible to get the _RIGHT_ length
+     automatically, since you can't just wait for the "silent" part.
+     (Only 'real' way is to listen all the songs and determine the
+     time manually aka HVSC length db)
+
+  b) Some tunes are 'looping' in nature, so there is no "real
+     length".
+
+- Add alternative sub-song selection method, UADE-style pop-up.
+
+- Coloring to fileinfo window (to separate multiple
+  "artist"/"comment"/"name"/"title" fields)
+
+- [for v1.0 ?]
+
+  * SIDPlay 2 support (when it gets mature enough)
+
+  * Possibly: Song "pre-rendering" support+position selector
+    work like it "should". Option for those who have the
+    CPU power (or patience) and enough RAM to spare for
+    the whole song. NOTE: This depends on the song-length
+    detection support!
+
+INTERNAL:
+
+- Rewrite the callbacks/etc to work in "the Right Way of Glade"
+  so that editing the GUI would be easier. (probably not)
+
+- Add STIL-database indexing for faster searches?
+  (may not be real issue)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/acinclude.m4	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,167 @@
+dnl Some handy functions
+
+dnl Try a list of directories, set the first one found
+dnl Usage: AC_CHECK_DIRS(DIRECTORY..., ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
+
+AC_DEFUN(AC_CHECK_DIRS,
+[
+for ac_dir in $1
+do
+AC_MSG_CHECKING([for directory ${ac_dir}])
+if test -d ${ac_dir}
+then
+  AC_MSG_RESULT(yes)
+  ifelse([$2], , :, [$2])
+  break
+else
+  AC_MSG_RESULT(no)
+fi
+done
+if test ! -d ${ac_dir}
+then
+  ifelse([$3], , :, [$3])
+fi
+])
+
+# sidplay.m4  sidplay checks
+
+AC_DEFUN(AC_FIND_FILE,
+    [
+	$3=NO
+	for i in $2;
+	do
+	  for j in $1;
+	  do
+	    if test -r "$i/$j"; then
+		  $3=$i
+		  break 2
+		fi
+	  done
+	done
+    ]
+)
+
+AC_DEFUN(AC_PATH_LIBSIDPLAY,
+[
+AC_MSG_CHECKING([for SIDPLAY includes and library])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_sidplay_cflags=NO
+ac_sidplay_library=NO
+sidplay_cflags=""
+sidplay_library=""
+
+AC_ARG_WITH(sidplay-prefix,
+  [  --with-sidplay-prefix=DIR
+                          where the sidplay includes and library are located],
+  [ac_sidplay_cflags="${withval}/include"
+   ac_sidplay_library="${withval}/lib"
+  ])
+
+AC_ARG_WITH(sidplay-includes,
+  [  --with-sidplay-includes=DIR
+                          where the sidplay includes are located],
+  [ac_sidplay_cflags="$withval"
+  ])
+
+AC_ARG_WITH(sidplay-library,
+  [  --with-sidplay-library=DIR
+                          where the sidplay library is installed],
+  [ac_sidplay_library="$withval"
+  ])
+
+if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
+#search common locations
+
+AC_CACHE_VAL(ac_cv_have_sidplay,
+[
+sidplay_incdirs="$ac_sidplay_cflags /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include"
+AC_FIND_FILE(sidplay/sidtune.h,$sidplay_incdirs,sidplay_foundincdir)
+ac_sidplay_cflags=$sidplay_foundincdir
+
+sidplay_libdirs="$ac_sidplay_library /usr/lib /usr/local/lib /usr/lib/sidplay /usr/local/lib/sidplay"
+AC_FIND_FILE(libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37,$sidplay_libdirs,sidplay_foundlibdir)
+ac_sidplay_library=$sidplay_foundlibdir
+
+if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
+  ac_cv_have_sidplay="have_sidplay=no"
+  ac_sidplay_notfound=""
+  if test "$ac_sidplay_cflags" = NO; then
+    if test "$ac_sidplay_library" = NO; then
+      ac_sidplay_notfound="(headers and library)";
+    else
+      ac_sidplay_notfound="(headers)";
+    fi
+  else
+    ac_sidplay_notfound="(library)";
+  fi
+  eval "$ac_cv_have_sidplay"
+  AC_MSG_RESULT([$have_sidplay])
+else
+  have_sidplay=yes
+fi
+
+])  dnl AC_CACHE_VAL(ac_cv_have_sidplay,
+else
+  have_sidplay=yes
+fi  dnl if (have_to_search)
+
+eval "$ac_cv_have_sidplay"
+
+if test "$have_sidplay" != yes; then
+  AC_MSG_RESULT([$have_sidplay]);
+else
+  ac_cv_have_sidplay="have_sidplay=yes \
+    ac_sidplay_cflags=$ac_sidplay_cflags ac_sidplay_library=$ac_sidplay_library"
+  AC_MSG_RESULT([library $ac_sidplay_library, headers $ac_sidplay_cflags])
+  
+  sidplay_library=$ac_sidplay_library
+  sidplay_cflags=$ac_sidplay_cflags
+  
+  SIDPLAY_LIBS="-L$sidplay_library -lsidplay"
+  all_libraries="$SIDPLAY_LIBS $all_libraries"
+  SIDPLAY_CFLAGS="-I$sidplay_cflags"
+  all_includes="$SIDPLAY_CFLAGS $all_includes"
+fi
+
+dnl Test compilation.
+
+AC_MSG_CHECKING([whether -lsidplay works])
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+CXXFLAGS="$CXXFLAGS -I$sidplay_cflags"
+LDFLAGS="$LDFLAGS -L$sidplay_library"
+LIBS="-lsidplay"
+
+AC_CACHE_VAL(ac_cv_sidplay_works,
+[
+    AC_TRY_LINK(
+	    [#include <sidplay/sidtune.h>],
+		[sidTune* myTest;],
+		[ac_cv_sidplay_works=yes],
+		[ac_cv_sidplay_works=no]
+   )
+])
+
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_MSG_RESULT([$ac_cv_sidplay_works])
+if test "$ac_cv_sidplay_works" != yes; then
+  have_sidplay=no
+fi
+
+dnl
+
+AC_SUBST(SIDPLAY_CFLAGS)
+AC_SUBST(SIDPLAY_LIBS)
+
+AC_SUBST(sidplay_library)
+AC_SUBST(sidplay_cflags)
+
+AC_LANG_RESTORE
+
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/acsidplay.m4	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,142 @@
+# sidplay.m4  sidplay checks
+
+AC_DEFUN(AC_FIND_FILE,
+    [
+	$3=NO
+	for i in $2;
+	do
+	  for j in $1;
+	  do
+	    if test -r "$i/$j"; then
+		  $3=$i
+		  break 2
+		fi
+	  done
+	done
+    ]
+)
+
+AC_DEFUN(AC_PATH_LIBSIDPLAY,
+[
+AC_MSG_CHECKING([for SIDPLAY includes and library])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_sidplay_cflags=NO
+ac_sidplay_library=NO
+sidplay_cflags=""
+sidplay_library=""
+
+AC_ARG_WITH(sidplay-prefix,
+  [  --with-sidplay-prefix=DIR
+                          where the sidplay includes and library are located],
+  [ac_sidplay_cflags="${withval}/include"
+   ac_sidplay_library="${withval}/lib"
+  ])
+
+AC_ARG_WITH(sidplay-includes,
+  [  --with-sidplay-includes=DIR
+                          where the sidplay includes are located],
+  [ac_sidplay_cflags="$withval"
+  ])
+
+AC_ARG_WITH(sidplay-library,
+  [  --with-sidplay-library=DIR
+                          where the sidplay library is installed],
+  [ac_sidplay_library="$withval"
+  ])
+
+if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
+#search common locations
+
+AC_CACHE_VAL(ac_cv_have_sidplay,
+[
+sidplay_incdirs="$ac_sidplay_cflags /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include"
+AC_FIND_FILE(sidplay/sidtune.h,$sidplay_incdirs,sidplay_foundincdir)
+ac_sidplay_cflags=$sidplay_foundincdir
+
+sidplay_libdirs="$ac_sidplay_library /usr/lib /usr/local/lib /usr/lib/sidplay /usr/local/lib/sidplay"
+AC_FIND_FILE(libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37,$sidplay_libdirs,sidplay_foundlibdir)
+ac_sidplay_library=$sidplay_foundlibdir
+
+if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
+  ac_cv_have_sidplay="have_sidplay=no"
+  ac_sidplay_notfound=""
+  if test "$ac_sidplay_cflags" = NO; then
+    if test "$ac_sidplay_library" = NO; then
+      ac_sidplay_notfound="(headers and library)";
+    else
+      ac_sidplay_notfound="(headers)";
+    fi
+  else
+    ac_sidplay_notfound="(library)";
+  fi
+  eval "$ac_cv_have_sidplay"
+  AC_MSG_RESULT([$have_sidplay])
+else
+  have_sidplay=yes
+fi
+
+])  dnl AC_CACHE_VAL(ac_cv_have_sidplay,
+else
+  have_sidplay=yes
+fi  dnl if (have_to_search)
+
+eval "$ac_cv_have_sidplay"
+
+if test "$have_sidplay" != yes; then
+  AC_MSG_RESULT([$have_sidplay]);
+else
+  ac_cv_have_sidplay="have_sidplay=yes \
+    ac_sidplay_cflags=$ac_sidplay_cflags ac_sidplay_library=$ac_sidplay_library"
+  AC_MSG_RESULT([library $ac_sidplay_library, headers $ac_sidplay_cflags])
+  
+  sidplay_library=$ac_sidplay_library
+  sidplay_cflags=$ac_sidplay_cflags
+  
+  SIDPLAY_LIBS="-L$sidplay_library -lsidplay"
+  all_libraries="$SIDPLAY_LIBS $all_libraries"
+  SIDPLAY_CFLAGS="-I$sidplay_cflags"
+  all_includes="$SIDPLAY_CFLAGS $all_includes"
+fi
+
+dnl Test compilation.
+
+AC_MSG_CHECKING([whether -lsidplay works])
+ac_cxxflags_safe=$CXXFLAGS
+ac_ldflags_safe=$LDFLAGS
+ac_libs_safe=$LIBS
+
+CXXFLAGS="$CXXFLAGS -I$sidplay_cflags"
+LDFLAGS="$LDFLAGS -L$sidplay_library"
+LIBS="-lsidplay"
+
+AC_CACHE_VAL(ac_cv_sidplay_works,
+[
+    AC_TRY_LINK(
+	    [#include <sidplay/sidtune.h>],
+		[sidTune* myTest;],
+		[ac_cv_sidplay_works=yes],
+		[ac_cv_sidplay_works=no]
+   )
+])
+
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_MSG_RESULT([$ac_cv_sidplay_works])
+if test "$ac_cv_sidplay_works" != yes; then
+  have_sidplay=no
+fi
+
+dnl
+
+AC_SUBST(SIDPLAY_CFLAGS)
+AC_SUBST(SIDPLAY_LIBS)
+
+AC_SUBST(sidplay_library)
+AC_SUBST(sidplay_cflags)
+
+AC_LANG_RESTORE
+
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/autogen.sh	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+echo "**************************************************"
+echo "** Generating build information                 **"
+echo "** This may take a while, please be patient ... **"
+echo "**************************************************"
+
+rm -f config.cache config.log
+
+# Touch the timestamps on all the files since CVS messes them up
+directory=`dirname $0`
+touch $directory/configure.in
+
+# Regenerate configuration files
+echo "* aclocal"
+aclocal -I .
+
+echo "* automake"
+automake --foreign -v
+
+echo "* autoconf"
+autoconf
+
+# Run configure for this platform
+./configure $*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.in	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,71 @@
+dnl ***
+dnl *** Process this file with autoconf to produce a configure script.
+dnl ***
+
+AC_INIT(README)
+AM_INIT_AUTOMAKE(xmms-sid, 0.7.4)
+
+dnl ***
+dnl *** Some general checks
+dnl ***
+AC_DISABLE_STATIC
+AC_LIBTOOL_DLOPEN
+AM_PROG_LIBTOOL
+
+
+dnl ***
+dnl *** Checks for programs
+dnl ***
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_HEADER_STDC
+
+AC_PATH_LIBSIDPLAY
+
+AM_PATH_XMMS(1.2.0, [
+# Check if the libdir has been set by user
+#if test "x$libdir" = "x$exec_prefix/lib"; then
+	libdir=$XMMS_INPUT_PLUGIN_DIR
+#fi
+], 
+AC_MSG_ERROR([*** XMMS >= 1.2.0 not found. You need XMMS v1.2.0 or later to use XMMS-SID plugin.]
+))
+
+
+
+dnl ***
+dnl *** Checks for libraries.
+dnl ***
+AM_PATH_GLIB(1.2.2,,AC_MSG_ERROR([*** GLIB >= 1.2.2 not found. You either don't have GLIB at all or your GLIB is too old. Latest GLIB can be found from Gtk+ homepages (http://www.gtk.org/)]))
+
+AM_PATH_GTK(1.2.2,,AC_MSG_ERROR([*** Gtk+ >= 1.2.2 not found. You either don't have Gtk+ at all or your Gtk+ is too old. Latest Gtk+ can be found from Gtk+ homepages (http://www.gtk.org/)]), gthread)
+
+
+dnl ***
+dnl *** Song position patch check
+dnl ***
+AC_MSG_CHECKING([for song position patch])
+dnl botte hack
+tmp_CPPFLAGS=$CPPFLAGS
+if test -d "$prefix" ;then
+  CPPFLAGS="$CPPFLAGS -I${prefix}/include"
+fi
+
+AC_EGREP_HEADER(set_song_position,xmms/plugin.h,
+	AC_DEFINE(HAVE_SONG_POSITION)
+	AC_MSG_RESULT(yes),AC_MSG_RESULT(no))
+
+CPPFLAGS=$tmp_CPPFLAGS
+
+
+dnl ***
+dnl *** And finally, output the all generatable files!
+dnl ***
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+dnl xmms-sid.spec
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/.cvsignore	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,3 @@
+*.txt
+Makefile
+Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile.am	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,23 @@
+# Generated libraries
+lib_LTLIBRARIES = libsid.la
+
+# Generals
+
+CFLAGS   = -O2 -W -Wall -I$(top_builddir) -I$(top_srcdir) -I$(includedir) -D_REENTRANT @GTK_CFLAGS@ @SIDPLAY_CFLAGS@ -lstdc++
+CXXFLAGS = $(CFLAGS)
+LIBS     = -lsidplay
+
+libsid_la_LDFLAGS = -module -avoid-version
+libsid_la_LIBADD  = @GTK_LIBS@ @PTHREAD_LIBS@
+
+# Plugin sources
+libsid_la_SOURCES =	\
+	xmms-sid.cc	\
+	xs_init.c	\
+	xs_config.c	\
+	xs_fileinfo.cc	\
+	xs_stil.c	\
+	xs_about.c	\
+	xmms-sid.h	\
+	xmms-sid-logo.xpm
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xmms-sid-logo.xpm	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,142 @@
+/* XPM */
+static char * xmms_sid_logo_xpm[] = {
+"180 90 49 1",
+" 	c None",
+".	c #020202",
+"+	c #969FA4",
+"@	c #7C7C7C",
+"#	c #606060",
+"$	c #484848",
+"%	c #323232",
+"&	c #222222",
+"*	c #E1F3FB",
+"=	c #C7D5DE",
+"-	c #1A1A1A",
+";	c #BCC8D1",
+">	c #121212",
+",	c #919293",
+"'	c #B1BCC3",
+")	c #0E0E0E",
+"!	c #747474",
+"~	c #A9B3B9",
+"{	c #8B8C8D",
+"]	c #5A5A5A",
+"^	c #0A0A0A",
+"/	c #A0A9AE",
+"(	c #383838",
+"_	c #6E6E6E",
+":	c #545454",
+"<	c #2E2E2E",
+"[	c #E6ECEF",
+"}	c #848484",
+"|	c #404040",
+"1	c #686868",
+"2	c #060606",
+"3	c #E2E2E2",
+"4	c #282828",
+"5	c #F2F2F2",
+"6	c #D5E4EE",
+"7	c #A6A6A6",
+"8	c #91989C",
+"9	c #4E4E4E",
+"0	c #C9CACB",
+"a	c #BDBFC0",
+"b	c #EBFBFE",
+"c	c #ABACAD",
+"d	c #D4D8DB",
+"e	c #B3B4B5",
+"f	c #9FA0A1",
+"g	c #161616",
+"h	c #989898",
+"i	c #1E1E1E",
+"j	c #FCFDFD",
+"........................................22...........2.....................2.................................22...........................................2.....2...................",
+"....................................................^.....................2..................................22..........................................2......2...................",
+"^.................................2...2^...........^2...................2^2.................................)^..........................................2^....2^2...................",
+"2)2...............................^^22)^..........^)..................^)g).................................>>2....^^.....2..............................).....^^....................",
+".^)2..............................2)>gg^.........^g^..................^g4^................................^-)......)2....2^...........................2)^....^).....................",
+"..>>2.........2....................)4%g.........2->...................^44g...............................2&i^......^>2....^^..........................)g2...2>^.....................",
+"..^-g..........22....2.............)(|i.........-&2..................^g&&4>.............................2-<-........)g2...2>^.........^.....2........^-^....g-......................",
+"...>&-..........^2..^)...........22g<<<i^......g<>....2).....2.......-4)2i4>..............2......22.....g(4^........2>-2...)i).......2>^....^)......2i-....>&2......................",
+"...2i<g.........^)^.^>.....2....2)g4&>%(i.....^<42...2))....^^......)4i..>44).............^^....))2....^%|-..........2ig....g&^......2>^....gg.....^&4^...>4g.......................",
+"....^4(>.........^g)>>2...)).....i%4^.-|(>....4%>.....g-2...>).....g44^..2-%<)............))...2>>....24|42...........)4-...2i4^.....2-^....-i.....4%>...^4i........................",
+".....>((>.........gii-2...>-2...^(|-..)%$()..-(i.....^i-...2>^....><(g....2&|(^..........^-g...2gg....i$(>.............g<g...^442....^i^...2&i....>|<2...4%)........................",
+"......-$|).........&(4^..^->....49(^..>-(9(^2||^.....^&i2..)g....2<$%......2(9<2.........^4i...>-)...^|:4...............i%>...g%42...2&>...)<i...2($>...-|&.........................",
+".......49(^........)||>..)4i...g$]&...ii)(:((:&......)4&2..-i....4]9g.......>|:<2........)4i...i4)..2(#9)...............24(>...-|4...^4)...g|i...&#(...)||^.........................",
+".......)(:(2.......2<9(2.g4-..2|]|>..2&-.-$11%.......)4&2.2ii...-:]42........-::&........><&..^&4)..i::&.................>((^..2(9i..^4>...i(&..)9#>...<:i2......2..................",
+"........>$#(.......24|:%)44^.2%1#<^..g4).2<}{(.......>%42.>4)..2|19g.2^.......4##&.......g<&..g<&..>:_(2..............^...g9|)..^|:i.^<>..>%(&..(_|...&:(2>^....^)..................",
+".........i#1<......2&($:((<).&#1%%-..-%^.^|!@#4......)<(g.-%)..41#42.)........^|1]i......)(%).&(&..|_:)..............2^2...4#|2..>::g^442.>(%<^4#:4..>:$^)>2...2>^..................",
+".........2%1#&......-9$$#94^g:!9)((2^<&.2<19$!:g2.....%:(2<42.i:!$)2^^......22.>9!9)22....(:4^((g.41_<..........2)2.2^2^^..2(#%22.4#$)4$>2<<i$(]1|>.2|14^g^...2>)...................",
+"..........^|@1&)2...g:9&1!|-|@_-.|$2g|-.i]1-)]@:i)....(#|>|&.^$@#42^)........2^.-]!$->2...$#%g||)g]@$^...........^>^)2.2>^..^$1<^)2%_|(]i^(%g:#_:|).41$)-g....>-2...................",
+"...........^:@]4>...-:9i:!#$!@$2.$:^&|g)$!|..&1@$i2...|#$-|g.<!!|)2g2.........)^241!$&>...$#(4$%^$@_&............2g4g...^-^..>]1&g^2|_]#4-|4-1}:|%2>##&g&2...)i>....................",
+"............-#}#4g..i]9(9]!}}#->.$:)|(^(!:2...4!}:&2..(1$(|2-#@#g.g)..........2>^.<!@$4>..$1||$&4@@(..............)4i2...>i^..&1#4i2):}!(||^4{!($-29!<)4>...2&i.....................",
+"............24@}:4).&#:|#$_f{9g>)$:>9$&1_4^^2.)$}@$g..$!:$$)$@_(^)-.........^^.2g2):}!$42.91|9](#{#^............^^-gig...2gi2.2(@:<-24@{$::):,:4:&4!])4&2..2&<)....2................",
+".....2.......2|}}:4241#:]9@h{#(^-]#%9|#@94i>22g-:{@$g-:!#:%|}@9g^i)2....2)-4-)2.^-2>#{@$i2:!]]:#}_4....22...2>-&-&i2g4g...^4&2..$@:%>29h@_$(@{||$41!&&<g^)-4(422)g>^................",
+"......2.....2.^:{{:g411##1{_!}1<&11$#:{@%g)2^-&>-!h{$i9!_:(!{142i&g)2)-4%%&g^....>-2-!,@|>:!1#]}}|>..)--))g4%%&>g4>..-<-^..)<i2.):}]4^|},{#!}@$:|:}$&(<&%%4((&i&g^..................",
+")gg>^^)^....^>-<1h}|(1!1@{@<(@}_|1@!},{(^.^-&-4%%9}f!4$!!#1,{$)-|4-g4$]#:<g2.....2ig2<@,_%:!!!{{_)g)i4&i%$$|4)2244i44i%|444i4(-..-1}:i$_@h{{1!9#1}!<9#$$<i(]|<i^2...................",
+".>-4||(%4)...^g49{f}1@}@,,9)<1h,@}h,{h@:$|$(%$]$4&|{f1:@}1{{1449(%$#]|%4(9##$%i^..2&g^|{h!1@@}h}<>%|$|:##|i2...-&2)-4(:1]||($##(i)4@}9:__hc{]!!!{{#_!:|(%:1$i2......................",
+"...2>49#_#:|)...>|{7h,hhh!4(]!{7f{}{h!4:@}}@@#|-.)g$hh!},{h@9|#11!1|-^..2>4|1@!_]%^>4>)]fh}}hf,:4$11_!#|&^....)<)....>-|!@1##$1@#]:1{}1!@{ff!}{hh@_@1]::]]$g........................",
+".......2%1_@,{!(4-|fcccccf,{,}1@77ff,#]!{}}@!{h}:|4&!fc7c7f{!}h{_$<i^.......24#!{hf,_94i_7eccch@{{{!94.^)....^%4....^>&(:!@@!}{,@@!@he7hhh!hcecc,!{h{!1(|]i.........................",
+".........g<(|#{fh@!e000ehf7cf{1!c0aah{hefh{}1$]@hh{!@c00aaaf{,hh{{}142.....241}{,f}@h7h}he0afhha'{1%)..>>....&(^...>(#}}!@},{@#!fh}{7a0ach{c000aea0ef,{@}1i2........................",
+".........2&42^)i]}h0f}}h7@|<(!{ae@@,h@h{1#1!h(%4>|@,f0h}{{hh]1}1__!{:>.....)#{1!!@,%-|{a0h_{ccc,_@{:&22-^...)|-...i#h@:1},8{#!{#91}{e7}{c}hee}}}@@@111]]},#<).......................",
+"..........^<<2...)#a7,8hh@#:g)]e!8h'c_h18+++{:(i.gi|h0!~~e'h#!!86==71-2....&}15jjjh4^i!h@c5jjjjjj0}}]i>&...2(<2..-#{#{';;;;==~!@#$#9,}88e!{ch{++f+8+8888{1@_<^......................",
+"...........)(42g9@h7e{8h7f{f,h0}{+7d@{e!8+++f}((>%!hah{''''c!7{/=66;,4^...2(}_jjjj74-_c@[jjj3dd5jj5e}|&&...4|2..2|{1'===;;a;;'~+}:@fc@+fa!fe,,+f//+/ff+88,}@#&2.....................",
+"............%]_h7h}},h{8h{{,e0c}f7dh!@}1++///,]!}f7fc@/''''f${}/=66*h$g...)#}cjjjjc${a{dj5decc7{h0jje}@:%gg$4...g1}+66afh{,{8fc/f}}hc@+ca_{{{{/~a,hf+f+c+{,{}$g.....................",
+"..........g|1,h}!9(@8f,8h+h,fc1+/a'@,ff1//e/c/{h7f,!h@c''';7<$_+===*a{]$g2i!10j3jja_f7!5jdc!!@!]_!djdh@ff}@1i...&!]=*;f|-g-%!}+/eh#}c}/ca1{f{{+c7#1!!!!},{{},@<2....................",
+".......2g:1!!]1_<&#}{+f{8hfff]8f~0@}}7e!/c'/~e}!}@fcc@';~';7$9_+==/66h1}{@!f#j505ja$1}@j[01{h!}}#@}j5c(&:}hh{!:4%@#b6c:->i|_}8@''a1}c}/~e]{7{{+f~1:%@}!!{,}{8h_1$i>2................",
+".....2>4|]9|%<49$$},hfhf@+h{:!+70@1#&17!c~e/e'h#%(,~{+'dc';7#1_+6=,66{:(|#7ffj5a5jc(|@@j57{hf1_}}@}eaa<2g:((|]@}@{16=,@#1!@::!8~00]!h@/ce]{f{{+fe#1!!&)%98#},+#9#!](4g..............",
+"...2>4|(&>g4g^^<@,h{!{h,}{8+@8f'f$!#i#7!c~'e~'c_$$fa1;;'+;;7#{@+6;e'*~1&41e!3jaf5jc<<!}[j3_hc}@{h,!:$9<2$$^..^>i9{{'=a_{f@!_}f@#11:@{_+/'1@{{{8fe9!h]2..g]!},f!|$(|:$||4>2..........",
+".2g&<&>..2^^g4$#@h!11@8}@@,888/a#9@}_!,_/~'7h'e{#@ce{==f{d=f:,}/6=a{*={:_}f!jjf_5je||_,ejj5e}@,},ah#&(>4:g.....2)${8666/!1,}}c@||@{@@!+fa_1,{{+fc$}{:).2-:8!8+{(|(((i4%4<%&>^.......",
+"gi&>2....2g<|9(|1!@_:1{@_+#,8+e{]1h@(4_1//eh@''f:}a@c=08{66+|@}~*=/1[*e:$1@{j[c#5jc%<_{,a5jjj[dc{!,,:$-](^..2)>-%:@{~666d;'8@1!@|1h}{!+/a__f{{+cc:{#]|i<|]@_+ff%-^>)i&i--gg&&->^....",
+"&2)g>^^>-<(%i2-9:<:{##{}{@_888h@_#@#-<##f/~c#~e7!h0@;=0f}66f9@}'j3e_dbc#|@@0jaa#5j7<<##1hfd35jjjjja},1#!$|$$:#11::9_8+';;;;'a'f!}!!,+@/~a_,c}{/~'_1|$!#|<$}!8f7i2.....2)>)^..^))^...",
+"..2^)4($$(&2.2(:(^(}@1{ff#8888+h@_{!|%##+/c'#+ccfcc@';0}@d6f:}@'jde!fjd,1f#[5af]5jc|#!::@!!7ea0jjjj3ffh,!!!@@@},#|9_!!@+c~';;;;',}9}c@~'a1f/}{c~a_####19$_{_8+7i2...................",
+"...^g---4<|$|%:9g>|]_{f'_{8/fhh7h!{,@1{1f/ce{{~'ca{+';=@}==f$!@~b3c}1jjhf{}jd0@]5j79}h,f71(###},70jj[ce17ccec~cf+@!}}$4|:18/7'==;f_}e}~'a1hc{{/ca#::##!_]1{!8f+-2...................",
+".^>>^2....g4(!@#(|]$(h0,@8+0c@++{!1#$@/_/ccec1~'ee1e;0c@}==h(:!/bdch][j7e:0j0c@#5jc],}@{7!1@!$<(_hh5jef#5jjjjjj0a1!!{]-^)-%$!h8;0'}}e}cea_@/,,/ce#!@!]|(|!_}8/_g....................",
+".2..........4$((#_@@#77!,,ea@_{++{@#4i11//~cf}f'e}@a;0{@}=684$_/b6c@@7j0,9jje{!#5jc#,]35e_<#,}##],}3j0f!a000000aa:[[e!i2..2^41}/;'c{~@/~;!hc,,/c'!@:&)2-]f9,,/:>....................",
+"...........)<4^..<]#}a@{{7;:%!!88h,@(^:]+/ch@+{c'1,';f#_}==,4$_/bdf#,153#@j5c9_15je$__0jd}(|@!$:!e}3jdh:_}}}}}}!1#abd}$i^2.^&}@+a'c!c@c~a!,c,{/ca$<4)^><{{_,+c$^....................",
+"..........2i<g..^<(9c!}{80!:$:{@88h,9i]#8+/}_f{/c_c~0,!}};;,&$_+6=h$!!3j10j0h(__5jc%9hhj5{@1}!%$fa!5jd{]9&gggg>g({}b*,@:(&&(_e#~a'@#f}/~a!hc8{//0@@1$|:}8:8,/{&2....................",
+"..........g&>2..&9!e{@}{af:#1{{{},8h@|!#8fcc}~{+//~~e!7+{;;h(:_/6dh<1{ej35jc|4_!5j744_@3j5!{,{,f,10j509#!{@$4i^2i#@;*6@@@_!{{:8;;01{c@/~;!hc{,f/c},hh++#]{,fe$>.....................",
+".........2--2.i(#}hc1}{/a#42i:#,},8+{@~@++cc!f{8/~~''#_8{;=c1{@c*dfi|@}jjj[a&41!5j74>$}h5j5af}@}75jjd,<^&|$!!1$|4(}}[*6c{1_1{';;0c!@{@7ca!@@{{+7,}@}}}{,88/;!-2.....................",
+".........>-i<9::9#,]@}+0_|]i2--|}188fc0@8/~h#{~@~~'01:]@{==c#f{'*d74<@1jjj0@-i!@5jc4^i:}h35jj55jjj5df99-.2^^)-:#]##}};6==;;;;;;0e#1}7{/~01}h{{/+++++8888+/0,1#<>^...................",
+"........^<(:$(4&<|!@+/0/$i9$&-^-9@8~'a{!+~a@1_{{~';d||1{8';c%#{/=df##1@e0da9>g_{ada&)%:1}{c03333d0e,|49$)......2i(|1@{/';;;;;aeh:_{}+f/ad#}+h8e~c~c/f//eaf!##1@_:(4^................",
+"......24($|-g>g>i4$_!!!1924$|i>|1!!}@!$9]!_#!1!}@@@!]|$!!@_|>i$:_1]11!!1!_]&^)(]11:(|::%%$:_hece,19](2<|%2........2-%$1!haa~{__#1:|1@!!}@#@{}!,@!@}!_1#]:|]#]]:|:1]$(&^.............",
+"...2g<|%4^.2^^.^)^<$&|:!$.)(]1111::#|&>-i-%#91@@!:$!#](919&>22ggg>^.-(|$:||(4gg&4(|%4>)^>g><9$(|&|&:(.>4|4.........)<9#]$||:##](^)$_$:91@!]1}!@:4(:]%gg)^2..i%%||<%$((|%i>^.........",
+".^-4%&>2.........)(4>|:!$)(]_!]$%g4$i222.>$9&#11{9|!$#:|##-...........2gg&%|<($||<-^..22...i$$|&>(g9%.2i4(i......>($]$4i<$::(4&-)&]9&:|1h1<]!@h:^&(::-.........>-i4<444i44i>)2......",
+"4&i>............24%.i%|!1$$9$|$-..>(g...2(:-%1<:@i&#<|:]:]%...............2>%((%4ig)^......g|]%.&<.9<..2-i%>..^i($|<>g($|(g.....g$:&(9-!h|g:$#h1^^i%$$>.............)ig--))g)))^....",
+"&^..............>%>.4$9@#<4gigi4^.>(>...i9%^|#g:}-i9gi<:]|(-............^gii>).^^^)222.....>$9g.44.$4...))i4g&%(4->-%(<i).......&$4^%9&@{4-9%${_&.)i4$<2..............2^^^^..22.2...",
+"2..............^4i)4|||1|>2..))&&.)4)..^(|)&:():_>i$2g-%#|-4).........^g>g^2...............-:(224>.|4...2gi||4g))-44i^.........)|(2^(((@@&4|-$@#|>.>g4|&............................",
+"...............i<i-&|-4:(....2^2i-)4>..i|g)($&.##>-$.^)g$:&g&2.....2^>^^2..................4|4^)<..|4..2>&i-4->-gg)............4|g.g|%|114(4.%!$(%)^>^&(g...........................",
+"..............-%-)^g42g9|2....2.^i>&42)<&2i<|-.]#)g|..224:|)gg....2^2.....................)44%i>4..%&2)g)^2.>4i)2.............g(i..-$|49#|$4.41$4<&222^44)..........................",
+".............2i>...->.)(#-.......^g442i4^>i4(&49!]-|(...g|$-^>).....>((>...g.2---g....g--i4>&$4-g..-$>2.....2)g2....2>.......^442..<$<>41#%>.>#14>4g2..24i..........................",
+".............^g2...-^.)41-........^44>i)2g^4!a00dd@@}...>%<4)2)^...4fcce$.ih.4aa0ah&.if0a0c|4h$i^..^:g........))....(!2......-4)..21,>.-!_%2..#!4.>&)...)&>.........................",
+"............2>2....g2.^4]i.........i4i).>>)4&>40}]^{f>&)>4i4|g2)2.2{1)^$cg40.(a>)g_ei&c<-&1c(e9-)i44$-2..^2...)g442.$f)^...))i44g)-||^)i@@<...]!i..>-2...^i)........................",
+"............)^....^)..^4:-.........-4-22).gi^.g0@$.{0fc74&1ee7(2^.)7#..^(^40.(e...2f#4c&>^ia(e:&@cce1$1.21%...1}ca!)$fi!-..{%<7ecf9#_-{@0d_2..:1-..2>>....)g2.......................",
+"............2.....)^..2i9g.........g4>.^..>&2^>0!$.{d|4c1|'|4!f>^^.:0e@4).&0.%a....]{4c(ig9a(e:$c&&{740&&c4...f'%(e|$h4c4..0(@,493__h40@@,a&..91-....)^....^>.......................",
+"...........2......^...2-$>........2i-222.2>>.^^a_|.{f..!@#0_1@a4.2..(!7dh)40.(e....:h<0ec7c:ic:)|9_a7g7:$7>...h_.2!@$f4c4..0(e(.^c1#h40i#1c&..$]>....2......2.......................",
+"...........2......2...2g(g.........g>2...2-^.)201|.},..!@#0}}}!-..242.^(a$&0.(e....@@4e:<%g.-e$|af}h7)1h}!....h:..#{9h4c4.204a<..c##,40g##c4..|:g...................................",
+".................2.....>%).........^^....2g2.^.0#(.}{..!@|e4.<@)..ge9..)c$40.(e..2%a(&7i....gc9{!.gff^<0a(....hh^-7:$h4c(.(04,_240]#h&0>::c&..|$)...................................",
+".......................24>...............22..2.a]<.},..!@g}aha!2..2:a@1fc>&0.(3hh70_^4c&....>c|]ahed7>^f0)....f0cef-$fghaf{d4(07e5::h40g$$74..(|2...................................",
+".......................2i^.....................$(4.(|..44.2%:%^.....4!}:-.^|.>:::$&..^(^....2(>2%:<i:>.{@.....f#||^.g%2^($>|)i(9(c$-<)|)(%(^..<(2...................................",
+"........................g^.....................2<&.gg..............................................2&i#a&.....h:.............1h]@a)....2(i....4%....................................",
+"........................>2......................4-.>>...............................................i>44......&).............)<4<4.....24-....i4....................................",
+"........................^2......................--.)^..............................................2g2.................................^4g....g&2...................................",
+"........................^2......................g-.^)...............................................>^.................................2--....>&^...................................",
+"........................2g........2g^...........)<&2>2.>....^g....g).......2)....).2g2...)>.........^g.).)............g<4^..............>4^...24g...................................",
+"........................2>.......)!c$...........)(,4>^$!^...#c(..>c!^......(!.(4>@&|e9..){,g........2g4@g@i..........|ccc{&............i942...24g...................................",
+".........................).......%'$>.g-2..2)-2.2&1,-%'|....}3!..$dc>2...2.$f2f]2i2:3f..%'04..g-2...i<|c)&^.2--)....ic|>-@{2^...^.2-g2.:f%^.--^i-^2-^.gg............................",
+".........................^.......c3f&:ee}4)!h7|.2--f@f1.....}hc>2{hcg#%..#|9f$da4_i:70i.#h0&>!cc}^.:cafeg_->!cehi...<e<..g(>_g.g!)@c7#2a3!-!ee!44{}c{#7c$...........................",
+".........................^.......]a$|'|4{{-0@4>.2>^437g.....}}e<ge]c-h:..h]$7-a@&c<:hc92,]0&9c|(c]ga:(7aie<$e44f!...),0h:)22,1.#,40||fi!e|#c<<e1(3:|ah<:c>..........................",
+".........................2.......4c-1}..4e<7%....^2(dc-.....}_,#|c|c-h9..,#$7.f$g7<:h_{ie<0&hh]]{c:h.2$a-c<)($]a@....^:,ad#.$e)c$g0h:&2$h4f{#],h|ag.79.ieg..........................",
+".........................2.......4ci_}..4c%c%....^-c1h!.....{1#,!}(cgh9..h]9f.f9-c<:h(7]c>0&ha,,,1#{22(c&c<|'7{7}...)&2.g10^>a:a).|}0e49f4c7{{,#%eg.f$.ia-..........................",
+".................................47-97>.:7&c%....^@,^ic|....}1(0c:%cg,1.>e]9f.79gc4:h&ee@.04_{)2:](ei^1a&c(h1^>f@...(e-..%a).{d{.4!)ic$$fg}@)^#:<e>.7$.ieg..........................",
+".................................4cighc,a:gc%....|a4..$ci...{12a04%cg#0{ha]$7.he(c<:,^,3|.0&4efh0|2,e{daie<#a{cd{...>,f1#c{..|5#.iafh7i$01%af,e$4eg.f9.&eg..........................",
+".................................)|^.>$#422|>....|%...^|4...%4.($2>|^^<#%|4-|.&]4|>&(.4]^.:^.-:]<..)|#<|^|>^|#|4|....>9{{$)..&a4..&#]g.2$$.-:1i^)|2.|-.)$2..........................",
+"...........................................................................................................................2%@{^....................................................",
+"...........................................................................................................................2&(i.....................................................",
+"....................................................................................................................................................................................",
+"....................................................................................................................................................................................",
+"....................................................................................................................................................................................",
+"....................................................................................................................................................................................",
+"....................................................................................................................................................................................",
+"....................................................................................................................................................................................",
+"...................................................................................................................................................................................."};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xmms-sid.cc	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,425 @@
+/*
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   Main source file
+
+   Originally by Willem Monsuwe <willem@stack.nl>
+   Additions, fixes, etc by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "xmms-sid.h"
+#include <sidplay/player.h>
+#include <sidplay/myendian.h>
+#include <sidplay/fformat.h>
+
+
+extern "C" {
+#include <pthread.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <xmms/plugin.h>
+#include <xmms/util.h>
+}
+
+
+/*
+ *	General variables
+ */
+static struct emuConfig	xs_emuConf;
+static emuEngine	xs_emuEngine;
+static pthread_t	xs_decode_thread;
+static int		xs_error = 0, xs_going = 0, xs_songs = 0;
+struct T_sid_cfg	xs_cfg;
+
+
+/*
+ *	Initialize xmms-sid plugin
+ */
+void xs_init(void)
+{
+
+	if (!xs_emuEngine) {
+		xs_error = 1;
+		XSERR("Couldn't start SIDPlay emulator engine!\n");
+		return;
+	}
+
+	if (!xs_emuEngine.verifyEndianess()) {
+		xs_error = 1;
+		XSERR("Wrong hardware endianess (SIDPlay error)!\n");
+		return;
+	}
+
+	// Initialize STIL structures
+	memset(&xs_stil_info, 0, sizeof(xs_stil_info));
+	xs_stil_clear();
+
+	// Get configuration
+	xs_get_configure();
+}
+
+
+/*
+ *	Special, custom hand-made strcpy with smooth leather coating.
+ */
+int xs_strcpy(char *dest, const char *src, unsigned int *j)
+{
+ unsigned int i;
+
+ if ((dest == NULL) || (src == NULL)) return -1;
+
+ for (i = 0; i < strlen(src); i++) {
+	dest[(*j)++] = src[i];
+	}
+
+ return 0;
+}
+
+
+/*
+	Create the SID-tune description string from the
+	tune's information formatted by the user-specified
+	format-string.
+*/
+static char * xs_make_filedesc(struct sidTuneInfo *s)
+{
+	unsigned int i, len, j;
+	char *result;
+
+	/* Check the info strings */
+	if (s->numberOfInfoStrings != 3) {
+		if (s->numberOfInfoStrings < 1) {
+			return 0;
+		}
+		return g_strdup(s->infoString[0]);
+	}
+
+	/* Check the format-string for NULL */
+	if (xs_cfg.fileInfo == NULL) {
+		return g_strdup_printf("%s - %s", s->nameString, s->authorString);
+		}
+
+	/* Pre-calculate the length of the result-string */
+	len = 2;
+	for (i = 0; i < strlen(xs_cfg.fileInfo); i++) {
+	if (xs_cfg.fileInfo[i] == '%') {
+		switch (xs_cfg.fileInfo[++i]) {
+		case '1': len += strlen(s->authorString); break;
+		case '2': len += strlen(s->nameString); break;
+		case '3': len += strlen(s->copyrightString); break;
+		case '4': len += strlen(s->formatString); break;
+		}
+	} else len++;
+	}
+
+	/* Allocate the result-string */
+	result = (char *) g_malloc(len);
+
+	/* Construct the final result info */
+	j = 0;
+	for (i = 0; i < strlen(xs_cfg.fileInfo); i++) {
+
+	if (xs_cfg.fileInfo[i] == '%') {
+		switch (xs_cfg.fileInfo[++i]) {
+		case '1': xs_strcpy(result, s->authorString, &j); break;
+		case '2': xs_strcpy(result, s->nameString, &j); break;
+		case '3': xs_strcpy(result, s->copyrightString, &j); break;
+		case '4': xs_strcpy(result, s->formatString, &j); break;
+		}
+
+		} else {
+		result[j++] = xs_cfg.fileInfo[i];
+		} /* if */
+
+	} /* for */
+
+	result[j] = '\0';
+
+	return result;
+}
+
+
+/*
+ *	Check whether the given file is handled by this plugin
+ */
+int xs_is_our_file(char *filename) 
+{
+	if (xs_cfg.detectMagic) {
+		sidTune *t = new sidTune(filename);
+
+		if (!t->getStatus()) {
+			delete t;
+			return FALSE;
+			}
+
+		delete t;
+		return TRUE;
+	}
+
+	char *ext = strrchr(filename, '.');
+	if (ext) {
+		ext++;
+		if (!strcasecmp(ext, "psid")) return TRUE;
+		if (!strcasecmp(ext, "sid")) return TRUE;
+		if (!strcasecmp(ext, "dat")) return TRUE;
+		if (!strcasecmp(ext, "inf")) return TRUE;
+		if (!strcasecmp(ext, "info")) return TRUE;
+	}
+	return FALSE;
+}
+
+
+/*
+ *	Playing thread loop function
+ */
+static void * xs_play_loop(void *arg)
+{
+	sidTune *tune = (sidTune *)arg;
+	char data[XMMS_SID_BUFSIZE];
+	int fxlen, tn;
+	struct sidTuneInfo sidInf;
+	char *name;
+	enum AFormat fmt = (xs_emuConf.bitsPerSample == 16) ? FMT_S16_NE : FMT_U8;
+	gint chn = xs_emuConf.channels;
+
+	tune->getInfo(sidInf);
+	name = xs_make_filedesc(&sidInf);
+
+play_loop_new_tune:
+	tn = xs_going;
+	if (tn <= 0) tn = 1;
+	if (!xmms_sid_ip.output->open_audio(fmt, xs_emuConf.frequency, chn))
+	{
+		xs_error = 1;
+		XSERR("Couldn't open XMMS audio output!\n");
+		delete tune;
+		pthread_exit(NULL);
+		xs_stop();
+	}
+
+	if (!sidEmuInitializeSong(xs_emuEngine, *tune, tn)) {
+		xs_error = 1;
+		XSERR("Couldn't initialize SIDPlay emulator engine!\n");
+		delete tune;
+		pthread_exit(NULL);
+		xs_stop();
+	}
+
+	tune->getInfo(sidInf);
+
+	xmms_sid_ip.set_info(name, -1,
+		1000 * (sidInf.songSpeed ? sidInf.songSpeed : (sidInf.clockSpeed == SIDTUNE_CLOCK_NTSC) ? 60 : 50),
+		xs_emuConf.frequency, chn);
+
+	while (xs_going == tn)
+	{
+		fxlen = XMMS_SID_BUFSIZE;
+		sidEmuFillBuffer(xs_emuEngine, *tune, data, fxlen);
+
+		xmms_sid_ip.add_vis_pcm(xmms_sid_ip.output->written_time(),
+					fmt, chn, fxlen, data);
+
+		while ((xs_going == tn) && (xmms_sid_ip.output->buffer_free() < fxlen))
+			xmms_usleep(10000);
+
+		if (xs_going == tn)
+			xmms_sid_ip.output->write_audio(data, fxlen);
+	}
+
+	/* Exit the playing thread */
+	xmms_sid_ip.output->close_audio();
+
+	if (xs_going) goto play_loop_new_tune;
+
+	g_free(name);
+
+	delete tune;
+
+	pthread_exit(NULL);
+}
+
+
+/*
+ *	Start playing the given file
+ */
+void xs_play_file(char *filename)
+{
+	sidTune *tune = new sidTune(filename);
+	struct sidTuneInfo sidInf;
+
+	/* Get current configuration */
+	xs_emuEngine.getConfig(xs_emuConf);
+
+	/* Configure channels and stuff */
+	switch (xs_cfg.channels) {
+
+	case XMMS_SID_CHN_AUTOPAN:
+		xs_emuConf.channels = SIDEMU_STEREO;
+		xs_emuConf.autoPanning = SIDEMU_CENTEREDAUTOPANNING;
+		xs_emuConf.volumeControl = SIDEMU_FULLPANNING;
+		break;
+
+	case XMMS_SID_CHN_STEREO:
+		xs_emuConf.channels = SIDEMU_STEREO;
+		xs_emuConf.autoPanning = SIDEMU_NONE;
+		xs_emuConf.volumeControl = SIDEMU_NONE;
+		break;
+
+	case XMMS_SID_CHN_MONO:
+		xs_emuConf.channels = SIDEMU_MONO;
+		xs_emuConf.autoPanning = SIDEMU_NONE;
+		xs_emuConf.volumeControl = SIDEMU_NONE;
+		break;
+
+	default:xs_error = 1;
+		XSERR("Internal: Invalid channels setting. Please report to author!\n");
+		delete tune;
+		break;
+	}
+
+	/* Memory mode settings */
+	switch (xs_cfg.memoryMode) {
+	case XMMS_SID_MPU_BANK_SWITCHING:
+		xs_emuConf.memoryMode = MPU_BANK_SWITCHING;
+		break;
+
+	case XMMS_SID_MPU_TRANSPARENT_ROM:
+		xs_emuConf.memoryMode = MPU_TRANSPARENT_ROM;
+		break;
+
+	case XMMS_SID_MPU_PLAYSID_ENVIRONMENT:
+		xs_emuConf.memoryMode = MPU_PLAYSID_ENVIRONMENT;
+		break;
+
+	default:xs_error = 1;
+		XSERR("Internal: Invalid memoryMode setting. Please report to author!\n");
+		delete tune;
+		break;
+	}
+
+
+	/* Clockspeed settings */
+	switch (xs_cfg.clockSpeed) {
+	case XMMS_SID_CLOCK_PAL:
+		xs_emuConf.clockSpeed = SIDTUNE_CLOCK_PAL;
+		break;
+
+	case XMMS_SID_CLOCK_NTSC:
+		xs_emuConf.clockSpeed = SIDTUNE_CLOCK_NTSC;
+		break;
+
+	default:xs_error = 1;
+		XSERR("Internal: Invalid clockSpeed setting. Please report to author!\n");
+		delete tune;
+		break;
+	}
+
+	/* Configure rest of the paske */
+	xs_emuConf.bitsPerSample	= xs_cfg.bitsPerSample;
+	xs_emuConf.frequency		= xs_cfg.frequency;
+	xs_emuConf.sampleFormat		= SIDEMU_SIGNED_PCM;
+	xs_emuConf.mos8580		= xs_cfg.mos8580;
+	xs_emuConf.emulateFilter	= xs_cfg.emulateFilter;
+	xs_emuConf.filterFs		= xs_cfg.filterFs;
+	xs_emuConf.filterFm		= xs_cfg.filterFm;
+	xs_emuConf.filterFt		= xs_cfg.filterFt;
+
+	/* Now set the emulator configuration */
+	xs_emuEngine.setConfig(xs_emuConf);
+	tune->getInfo(sidInf);
+	xs_error = 0;
+	xs_going = sidInf.startSong;
+	xs_songs = sidInf.songs;
+
+	/* Start the playing thread! */
+	if (pthread_create(&xs_decode_thread, NULL, xs_play_loop, tune) < 0) {
+		xs_error = 1;
+		XSERR("Couldn't start playing thread!\n");
+		delete tune;
+	}
+}
+
+
+/*
+ *	Stop playing
+ */
+void xs_stop(void)
+{
+	if (xs_going)
+	{
+		xs_going = 0;
+		pthread_join(xs_decode_thread, NULL);
+	}
+}
+
+
+/*
+ *	Pause the playing
+ */
+void xs_pause(short p)
+{
+	xmms_sid_ip.output->pause(p);
+}
+
+
+/*
+ *	Set the time-seek position
+ *	(the playing thread will do the "seeking" aka song-change)
+ */
+void xs_seek(int time)
+{
+	if ((time > 0) && (time <= xs_songs)) {
+		xs_going = time;
+	}
+}
+
+
+/*
+ *	Return the playing "position/time" aka song number
+ */
+int xs_get_time(void)
+{
+	if (xs_error) return -2;
+	if (!xs_going) return -1;
+#ifdef HAVE_SONG_POSITION
+	set_song_position(xs_going, 1, xs_songs);
+#endif
+	return xmms_sid_ip.output->output_time();
+}
+	
+
+/*
+ *	Return song information
+ */
+void xs_get_song_info(char *filename, char **title, int *length)
+{
+	struct sidTuneInfo sidInf;
+	sidTune t(filename);
+
+	if (!t) return;
+
+	t.getInfo(sidInf);
+
+	*title = xs_make_filedesc(&sidInf);
+
+	*length = -1;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xmms-sid.h	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,151 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   Main header file
+
+   Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+   (few bits may still be by Willem Monsuwe)
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+/*
+ #define DEBUG
+*/
+
+#ifndef _XMMS_SID_H
+#define _XMMS_SID_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <glib.h>
+#include <xmms/plugin.h>
+
+extern InputPlugin xmms_sid_ip;
+
+/*
+ *	Configuration structure
+ */
+#define XMMS_SID_CONFIG_IDENT		"XMMS-SID"
+#define XMMS_SID_BUFSIZE		4096
+#define XMMS_SID_NAME			"xmms-sid"
+
+#define XMMS_SID_CHN_MONO		0
+#define XMMS_SID_CHN_STEREO		1
+#define XMMS_SID_CHN_AUTOPAN		2
+
+#define XMMS_SID_CLOCK_PAL		1
+#define XMMS_SID_CLOCK_NTSC		2
+
+#define XMMS_SID_DEFAULT_FILTERFS	400.0
+#define XMMS_SID_DEFAULT_FILTERFM	60.0
+#define XMMS_SID_DEFAULT_FILTERFT	0.05
+
+#define XMMS_SID_MPU_BANK_SWITCHING		1
+#define XMMS_SID_MPU_TRANSPARENT_ROM		2
+#define XMMS_SID_MPU_PLAYSID_ENVIRONMENT	3
+
+extern struct T_sid_cfg {
+	gint bitsPerSample;
+	gint channels;
+	gint frequency;
+	gboolean mos8580;
+	gboolean emulateFilter;
+	gfloat filterFs;
+	gfloat filterFm;
+	gfloat filterFt;
+	gint memoryMode;
+	gint clockSpeed;
+	gboolean forceSpeed;
+	gboolean detectMagic;
+	gboolean usestil;
+	gchar *stilpath;
+	gchar *fileInfo;
+} xs_cfg;
+
+
+/*
+ *	Configuration specific stuff
+ */
+enum {
+	ATYPE_INT = 1,
+	ATYPE_FLOAT,
+	ATYPE_STR,
+	ATYPE_BOOL
+};
+
+
+typedef struct {
+	int	atype;
+	void	*adata;
+	gchar	*aname;
+} T_sid_cfg_entry;
+
+
+/*
+ *	General plugin function prototypes
+ */
+void	xs_init(void);
+int	xs_is_our_file(char *);
+void	xs_play_file(char *);
+void	xs_stop(void);
+void	xs_pause(short);
+void	xs_seek(int);
+int	xs_get_time(void);
+void	xs_get_song_info(char *, char **, int *);
+void	xs_file_info_box(char *);
+void	xs_configure(void);
+void	xs_get_configure(void);
+void	xs_aboutbox(void);
+int	xs_stil_get(gchar *);
+
+int	xs_strcalloc(gchar **, gchar *);
+void	xs_stil_clear(void);
+
+/*
+ *	STIL information specific
+ */
+#define XMMS_SID_STIL_MAXENTRY	64
+
+typedef struct {
+	gchar *title;
+	gchar *name;
+	gchar *artist;
+	gchar *comment;
+} T_sid_stil_subtune;
+
+
+extern struct T_sid_stil_info {
+	T_sid_stil_subtune subtune[XMMS_SID_STIL_MAXENTRY];	
+} xs_stil_info;
+
+
+/*
+ * Debugging and error handling macros
+ */
+#ifdef DEBUG
+#define XSDEBUG(x...) { fprintf(stderr, "XSDEBUG [%s:%d]: ", __FILE__, (int) __LINE__); fprintf(stderr, ## x); }
+#else
+#define XSDEBUG(x...) /* foo */
+#endif
+
+#define XSERR(x...) { fprintf(stderr, XMMS_SID_NAME ": "); fprintf(stderr, ## x); }
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _XMMS_SID_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_about.c	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,125 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   Aboutbox dialog
+   
+   Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+   (Created with Glade, the Gtk+ interface builder, but edited
+   by hand afterwards to make it work here)
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "xmms-sid.h"
+#include <gtk/gtk.h>
+#include "xmms-sid-logo.xpm"
+
+
+static GtkWidget *xs_aboutwin = NULL;
+
+int xs_aboutwin_ok(void)
+{
+ gtk_widget_destroy(xs_aboutwin);
+ return 0;
+}
+
+
+/*
+ * Execute the aboutbox
+ */
+void xs_aboutbox(void)
+{
+	GtkWidget *vbox1, *hbox1, *frame1, *pixmapwid;
+	GtkWidget *label1, *hbuttonbox1, *about_ok;
+	GdkPixmap *pixmap;
+	GdkBitmap *pixmask;
+	GtkStyle  *style;
+	
+	/* Check if there already is an open about window */
+	if (xs_aboutwin != NULL) {
+		gdk_window_raise(xs_aboutwin->window);
+		return;
+		}
+
+	/* No, create one ... */	
+	xs_aboutwin = gtk_dialog_new();
+	gtk_object_set_data(GTK_OBJECT(xs_aboutwin), "xs_aboutwin", xs_aboutwin);
+	gtk_window_set_title(GTK_WINDOW(xs_aboutwin), "About xmms-sid SIDPlay plugin");
+	gtk_window_set_policy(GTK_WINDOW(xs_aboutwin), FALSE, FALSE, FALSE);
+	gtk_window_set_position(GTK_WINDOW(xs_aboutwin), GTK_WIN_POS_MOUSE);
+	gtk_signal_connect(GTK_OBJECT(xs_aboutwin), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &xs_aboutwin);
+	gtk_container_border_width(GTK_CONTAINER(xs_aboutwin), 10);
+
+	vbox1 = GTK_DIALOG(xs_aboutwin)->vbox;
+	gtk_object_set_data(GTK_OBJECT(xs_aboutwin), "vbox1", vbox1);
+	gtk_widget_show(vbox1);
+/*	gtk_container_add(GTK_CONTAINER(xs_aboutwin), vbox1);
+*/
+	hbox1 = gtk_hbox_new(FALSE, 0);
+	gtk_object_set_data(GTK_OBJECT(xs_aboutwin), "hbox1", hbox1);
+	gtk_widget_show (hbox1);
+	gtk_box_pack_start(GTK_BOX(vbox1), hbox1, TRUE, TRUE, 0);
+
+	frame1 = gtk_frame_new (NULL);
+	gtk_object_set_data (GTK_OBJECT (xs_aboutwin), "frame1", frame1);
+	gtk_widget_show (frame1);
+	gtk_box_pack_start (GTK_BOX (hbox1), frame1, TRUE, TRUE, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
+
+	gtk_widget_realize (xs_aboutwin);
+
+	/* The pixmap */
+	style = gtk_widget_get_style (xs_aboutwin);
+	pixmap = gdk_pixmap_create_from_xpm_d(xs_aboutwin->window, &pixmask,
+						&style->bg[GTK_STATE_NORMAL],
+						(gchar **) xmms_sid_logo_xpm);
+	
+	pixmapwid = gtk_pixmap_new(pixmap, pixmask);
+	gtk_widget_show (pixmapwid);
+	gtk_container_add (GTK_CONTAINER (frame1), pixmapwid);
+	gtk_misc_set_padding (GTK_MISC (pixmapwid), 4, 4);
+
+	label1 = gtk_label_new (
+	"XMMS-SID SIDPlay plugin v" VERSION "\n"
+	"for X MultiMedia System\n"
+	"by Willem Monsuwe and\n"
+	"Matti \"ccr\" H\344m\344l\344inen\n\n"
+	"libSIDPlay by Michael Schwendt");
+	
+	gtk_object_set_data (GTK_OBJECT (xs_aboutwin), "label1", label1);
+	gtk_widget_show (label1);
+	gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);
+	gtk_misc_set_padding (GTK_MISC (label1), 8, 0);
+
+	hbuttonbox1 = gtk_hbutton_box_new ();
+	gtk_object_set_data (GTK_OBJECT (xs_aboutwin), "hbuttonbox1", hbuttonbox1);
+	gtk_widget_show (hbuttonbox1);
+	gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
+
+	/* OK-button */
+	about_ok = gtk_button_new_with_label("OK");
+
+	gtk_signal_connect (GTK_OBJECT (about_ok), "clicked",
+				GTK_SIGNAL_FUNC(xs_aboutwin_ok),
+				NULL);
+
+	gtk_object_set_data (GTK_OBJECT (xs_aboutwin), "about_ok", about_ok);
+	gtk_widget_show (about_ok);
+	gtk_container_add (GTK_CONTAINER (hbuttonbox1), about_ok);
+	GTK_WIDGET_SET_FLAGS (about_ok, GTK_CAN_DEFAULT);
+
+	gtk_widget_show(xs_aboutwin);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_config.c	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,863 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   Configuration dialog
+   
+   Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+   (Interface created with Glade, the Gtk+ interface builder,
+   code edited by hand afterwards to make it work here)
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "xmms-sid.h"
+#include <xmms/configfile.h>
+#include <gtk/gtk.h>
+#include <stdio.h>
+
+
+/*
+ * General stuff
+ */
+static GtkWidget *xs_configwin = NULL;
+static GtkWidget *xs_fileselector = NULL;
+
+static GtkObject *cfg_samplerate_adj, *cfg_filt_fm_adj, *cfg_filt_ft_adj, *cfg_filt_fs_adj;
+static GtkWidget *cfg_res_8bit, *cfg_res_16bit, *cfg_checkfilecontent, *cfg_chn_mono;
+static GtkWidget *cfg_chn_stereo, *cfg_chn_autopan, *cfg_mem_banksw, *cfg_mem_transrom, *cfg_mem_playsid;
+static GtkWidget *cfg_songnameformat, *cfg_clock_pal, *cfg_clock_ntsc, *cfg_clock_force, *cfg_ok, *cfg_cancel;
+static GtkWidget *cfg_wav_mos6581, *cfg_wav_mos8580, *cfg_emufilters, *cfg_stil_browse, *cfg_stil_use, *cfg_stil_path;
+
+
+
+/*
+ * Configuration specific stuff
+ */
+#define XS_CFGTABLE_MAX	15
+
+T_sid_cfg_entry xs_cfgtable[XS_CFGTABLE_MAX] = {
+	{ ATYPE_INT,	&xs_cfg.bitsPerSample,	"bitsPerSample",},
+	{ ATYPE_INT,	&xs_cfg.channels,	"channels"	},
+	{ ATYPE_INT,	&xs_cfg.frequency,	"frequency"	},
+	{ ATYPE_BOOL,	&xs_cfg.mos8580,	"mos8580",	},
+	{ ATYPE_BOOL,	&xs_cfg.emulateFilter,	"emulateFilter"	},
+	{ ATYPE_FLOAT,	&xs_cfg.filterFs,	"filterFs"	},
+	{ ATYPE_FLOAT,	&xs_cfg.filterFm,	"filterFm"	},
+	{ ATYPE_FLOAT,	&xs_cfg.filterFt,	"filterFt"	},
+	{ ATYPE_INT,	&xs_cfg.memoryMode,	"memoryMode"	},
+	{ ATYPE_INT,	&xs_cfg.clockSpeed,	"clockSpeed"	},
+	{ ATYPE_BOOL,	&xs_cfg.forceSpeed,	"forceSpeed"	},
+	{ ATYPE_BOOL,	&xs_cfg.detectMagic,	"detectMagic"	},
+	{ ATYPE_STR,	&xs_cfg.stilpath,	"STILpath"	},
+	{ ATYPE_BOOL,	&xs_cfg.usestil,	"useSTIL"	},
+	{ ATYPE_STR,	&xs_cfg.fileInfo,	"fileInfo"	}
+};
+
+
+
+/*
+ * Get the configuration (from file or default)
+ */
+void xs_cfg_filter_reset(void)
+{
+	/* Reset filter values */
+	xs_cfg.filterFs = XMMS_SID_DEFAULT_FILTERFS;
+	xs_cfg.filterFm = XMMS_SID_DEFAULT_FILTERFM;
+	xs_cfg.filterFt = XMMS_SID_DEFAULT_FILTERFT;
+}
+
+
+void xs_get_configure(void)
+{
+	gchar *cfg_fn, *tmpstr;
+	ConfigFile *cfg_file;
+	gint i;
+	
+	/* Pre-initialize configuration structure */
+	xs_cfg.bitsPerSample	= 16;
+	xs_cfg.channels		= XMMS_SID_CHN_MONO;
+	xs_cfg.frequency	= 44100;
+	xs_cfg.mos8580		= FALSE;
+	xs_cfg.emulateFilter	= TRUE;
+	xs_cfg.memoryMode	= XMMS_SID_MPU_BANK_SWITCHING;
+	xs_cfg.clockSpeed	= XMMS_SID_CLOCK_PAL;
+	xs_cfg.forceSpeed	= FALSE;
+	xs_cfg.detectMagic	= FALSE;
+	xs_strcalloc(&xs_cfg.stilpath, "~/C64Music/DOCUMENTS/STIL.txt");
+	xs_cfg.usestil		= FALSE;
+	xs_strcalloc(&xs_cfg.fileInfo, "%1 - %2");
+
+	xs_cfg_filter_reset();
+
+	
+	/* Try to open the XMMS configuration file */
+	cfg_fn = g_strconcat(g_get_home_dir(), "/.xmms/config", NULL);
+	cfg_file = xmms_cfg_open_file(cfg_fn);
+	g_free(cfg_fn);
+	if (cfg_file == 0) return;
+
+	/* Read the new settings from XMMS configuration file */
+	
+	/* WARNING: Some "goto magic" coming up! */
+
+	for (i = 0; i < XS_CFGTABLE_MAX; i++) {
+	
+		switch (xs_cfgtable[i].atype) {
+		case ATYPE_INT:		if (!xmms_cfg_read_int(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, (gint *) xs_cfgtable[i].adata)) goto rexit;
+					break;
+										
+		case ATYPE_BOOL:	if (!xmms_cfg_read_boolean(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, (gboolean *) xs_cfgtable[i].adata)) goto rexit;
+					break;
+					
+		case ATYPE_FLOAT:	if (!xmms_cfg_read_float(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, (gfloat *) xs_cfgtable[i].adata)) goto rexit;
+					break;
+					
+		case ATYPE_STR:		if (!xmms_cfg_read_string(cfg_file, XMMS_SID_CONFIG_IDENT,
+						xs_cfgtable[i].aname, &tmpstr)) goto rexit;
+
+					/* Read was successfull */
+					xs_strcalloc((gchar **) xs_cfgtable[i].adata, tmpstr);
+
+					g_free(tmpstr);
+					
+					break;
+
+		default:		XSERR("Internal: Unsupported setting type found while reading configuration file. Please report to author!\n");
+					break;
+		}
+
+		}
+
+rexit:
+	/* Free the config file */
+	xmms_cfg_free(cfg_file);
+}
+
+
+/*
+ * Configuration panel was canceled
+ */
+void xs_configure_cancel(void)
+{
+	gtk_widget_destroy(xs_configwin);
+}
+
+
+/*
+ * Configuration was accepted (OK), save the settings
+ */
+void xs_configure_ok(void)
+{
+	ConfigFile *cfg_file;
+	gchar *cfg_fn;
+	gint i;
+	
+	/* Check the resolution settings */	
+	if (GTK_TOGGLE_BUTTON(cfg_res_16bit)->active)
+		xs_cfg.bitsPerSample = 16;
+	else if (GTK_TOGGLE_BUTTON(cfg_res_8bit)->active)
+		xs_cfg.bitsPerSample = 8;
+
+	if (GTK_TOGGLE_BUTTON(cfg_chn_mono)->active)
+		xs_cfg.channels = XMMS_SID_CHN_MONO;
+	else if (GTK_TOGGLE_BUTTON(cfg_chn_stereo)->active)
+		xs_cfg.channels = XMMS_SID_CHN_STEREO;
+	else if (GTK_TOGGLE_BUTTON(cfg_chn_autopan)->active)
+		xs_cfg.channels = XMMS_SID_CHN_AUTOPAN;
+	
+	xs_cfg.frequency = (gint)GTK_ADJUSTMENT(cfg_samplerate_adj)->value;
+	
+
+	/* Memorymode settings */
+	if (GTK_TOGGLE_BUTTON(cfg_mem_banksw)->active)
+		xs_cfg.memoryMode = XMMS_SID_MPU_BANK_SWITCHING;
+	else if (GTK_TOGGLE_BUTTON(cfg_mem_transrom)->active)
+		xs_cfg.memoryMode = XMMS_SID_MPU_TRANSPARENT_ROM;
+	else if (GTK_TOGGLE_BUTTON(cfg_mem_playsid)->active)
+		xs_cfg.memoryMode = XMMS_SID_MPU_PLAYSID_ENVIRONMENT;
+
+	
+	/* Clockspeed settings */
+	if (GTK_TOGGLE_BUTTON(cfg_clock_pal)->active)
+		xs_cfg.clockSpeed = XMMS_SID_CLOCK_PAL;
+	else if (GTK_TOGGLE_BUTTON(cfg_clock_ntsc)->active)
+		xs_cfg.clockSpeed = XMMS_SID_CLOCK_NTSC;
+
+	xs_cfg.forceSpeed = GTK_TOGGLE_BUTTON(cfg_clock_force)->active;
+
+
+	/* Filter and waveform settings */
+	xs_cfg.mos8580 = ((GTK_TOGGLE_BUTTON(cfg_wav_mos8580)->active) && (!GTK_TOGGLE_BUTTON(cfg_wav_mos6581)->active));
+		
+	xs_cfg.emulateFilter = GTK_TOGGLE_BUTTON(cfg_emufilters)->active;
+	xs_cfg.filterFs = GTK_ADJUSTMENT(cfg_filt_fs_adj)->value;
+	xs_cfg.filterFm = GTK_ADJUSTMENT(cfg_filt_fm_adj)->value;
+	xs_cfg.filterFt = GTK_ADJUSTMENT(cfg_filt_ft_adj)->value;
+	
+
+	/* STIL and miscellaneous settings */	
+	xs_cfg.detectMagic = GTK_TOGGLE_BUTTON(cfg_checkfilecontent)->active;
+	xs_cfg.usestil = GTK_TOGGLE_BUTTON(cfg_stil_use)->active;
+
+	xs_strcalloc(&xs_cfg.stilpath, gtk_entry_get_text(GTK_ENTRY(cfg_stil_path)));
+	xs_strcalloc(&xs_cfg.fileInfo, gtk_entry_get_text(GTK_ENTRY(cfg_songnameformat)));
+		
+
+	/* Try to open the XMMS configuration file */
+	cfg_fn = g_strconcat(g_get_home_dir(),"/.xmms/config",NULL);
+	cfg_file = xmms_cfg_open_file(cfg_fn);
+	if (!cfg_file) cfg_file = xmms_cfg_new();
+
+
+	/* Write the new settings to XMMS configuration file */
+	for (i = 0; i < XS_CFGTABLE_MAX; i++) {
+
+		switch (xs_cfgtable[i].atype) {
+		case ATYPE_INT:		xmms_cfg_write_int(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, * (gint *) xs_cfgtable[i].adata);
+					break;
+					
+		case ATYPE_BOOL:	xmms_cfg_write_boolean(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, * (gboolean *) xs_cfgtable[i].adata);
+					break;
+
+		case ATYPE_FLOAT:	xmms_cfg_write_float(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, * (gfloat *) xs_cfgtable[i].adata);
+					break;
+
+		case ATYPE_STR:		xmms_cfg_write_string(cfg_file, XMMS_SID_CONFIG_IDENT,
+					xs_cfgtable[i].aname, * (gchar **) xs_cfgtable[i].adata);
+					break;
+
+		default:	XSERR("Internal: Unsupported setting type found while writing configuration file. Please report to author!\n");
+				break;
+		}
+		
+		}		
+
+	xmms_cfg_write_file(cfg_file, cfg_fn);
+
+	xmms_cfg_free(cfg_file);
+
+	g_free(cfg_fn);
+
+	gtk_widget_destroy(xs_configwin);
+}
+
+
+/*
+ * Update filter setting sliders
+ */
+static void xs_cfg_filt_update(void)
+{
+	gtk_adjustment_set_value(GTK_ADJUSTMENT(cfg_filt_fs_adj), xs_cfg.filterFs);
+	gtk_adjustment_set_value(GTK_ADJUSTMENT(cfg_filt_fm_adj), xs_cfg.filterFm);
+	gtk_adjustment_set_value(GTK_ADJUSTMENT(cfg_filt_ft_adj), xs_cfg.filterFt);
+}
+
+
+/*
+ * Reset filter settings to defaults
+ */
+static void xs_cfg_filt_reset(void)
+{
+	xs_cfg_filter_reset();
+	xs_cfg_filt_update();
+}
+
+
+/*
+ * STIL-database file selector response-functions
+ */
+void xs_cfg_fs_ok(void)
+{
+	/* Selection was accepted! */
+	gtk_entry_set_text(
+		GTK_ENTRY(cfg_stil_path), 
+		gtk_file_selection_get_filename(GTK_FILE_SELECTION (xs_fileselector))
+		);
+
+	/* Close file selector window */
+	gtk_widget_destroy(xs_fileselector);
+	xs_fileselector = NULL;
+}
+
+
+void xs_cfg_fs_cancel(void)
+{
+	/* Close file selector window */
+	gtk_widget_destroy(xs_fileselector);
+	xs_fileselector = NULL;
+}
+
+
+/*
+ * Open up a file-selection dialog for browsing STIL-database file
+ */
+void xs_cfg_stil_browse(void)
+{
+  GtkWidget *fs_but_ok, *fs_but_cancel;
+
+  /* Check if the window already exists */
+  if (xs_fileselector != NULL) {
+	gdk_window_raise(xs_fileselector->window);
+	return;
+	}
+
+  /* No, create a new one */
+  xs_fileselector = gtk_file_selection_new ("Select STIL Database-File");
+  gtk_signal_connect(GTK_OBJECT(xs_fileselector),"destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed),&xs_fileselector);
+
+  gtk_object_set_data (GTK_OBJECT (xs_fileselector), "xs_fileselector", xs_fileselector);
+  gtk_container_set_border_width (GTK_CONTAINER (xs_fileselector), 10);
+  GTK_WINDOW (xs_fileselector)->type = GTK_WINDOW_DIALOG;
+  gtk_window_set_position (GTK_WINDOW (xs_fileselector), GTK_WIN_POS_MOUSE);
+  gtk_window_set_modal (GTK_WINDOW (xs_fileselector), TRUE);
+  gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (xs_fileselector));
+
+  fs_but_ok = GTK_FILE_SELECTION (xs_fileselector)->ok_button;
+  gtk_object_set_data (GTK_OBJECT (xs_fileselector), "fs_but_ok", fs_but_ok);
+  gtk_widget_show (fs_but_ok);
+  GTK_WIDGET_SET_FLAGS (fs_but_ok, GTK_CAN_DEFAULT);
+
+  fs_but_cancel = GTK_FILE_SELECTION (xs_fileselector)->cancel_button;
+  gtk_object_set_data (GTK_OBJECT (xs_fileselector), "fs_but_cancel", fs_but_cancel);
+  gtk_widget_show (fs_but_cancel);
+  GTK_WIDGET_SET_FLAGS (fs_but_cancel, GTK_CAN_DEFAULT);
+
+
+  /* Connect signals */
+  gtk_signal_connect (GTK_OBJECT (fs_but_ok), "clicked",
+                      GTK_SIGNAL_FUNC (xs_cfg_fs_ok),
+                      NULL);
+
+  gtk_signal_connect (GTK_OBJECT (fs_but_cancel), "clicked",
+                      GTK_SIGNAL_FUNC (xs_cfg_fs_cancel),
+                      NULL);
+
+  /* Show the dialog */
+  gtk_widget_show(xs_fileselector);
+}
+
+
+/*
+ * Execute the configuration panel
+ */
+void xs_configure(void)
+{
+  GSList *resolution_group = NULL;
+  GSList *channels_group = NULL;
+  GSList *speed_group = NULL;
+  GSList *waveforms_group = NULL;
+  GSList *memorymode_group = NULL;
+  GtkWidget *vbox1, *cfg_notebook, *vbox6, *hbox2, *frame4, *vbox9, *frame5, *vbox10;
+  GtkWidget *frame8, *alignment4, *hbox4, *label8, *label1, *vbox2, *hbox1, *frame2, *vbox4, *frame3;
+  GtkWidget *vbox3, *frame1, *vbox5, *label2, *vbox7, *frame7, *vbox8, *hbox3, *label4, *alignment2;
+  GtkWidget *alignment1, *frame9, *vbox11, *alignment3, *label7, *label3, *fixed1,*label9, *frame12;
+  GtkWidget *cfg_frm2, *cfg_frm1, *label6, *hbuttonbox1;
+  GtkWidget *cfg_filt_reset, *cfg_samplerate, *cfg_filt_fm,*cfg_filt_fs, *cfg_filt_ft;
+  GtkTooltips *tooltips;
+
+  /* Check if the window already exists */
+  if (xs_configwin != NULL) {
+	gdk_window_raise(xs_configwin->window);
+	return;
+	}
+
+
+  /* No, create a new one */
+  tooltips = gtk_tooltips_new ();
+
+  xs_configwin = gtk_window_new (GTK_WINDOW_DIALOG);
+  gtk_signal_connect(GTK_OBJECT(xs_configwin),"destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed),&xs_configwin);
+  gtk_object_set_data (GTK_OBJECT (xs_configwin), "xs_configwin", xs_configwin);
+  gtk_window_set_title (GTK_WINDOW (xs_configwin), "xmms-sid configuration");
+  gtk_window_set_policy (GTK_WINDOW (xs_configwin), FALSE, FALSE, FALSE);
+  gtk_window_set_position (GTK_WINDOW(xs_configwin), GTK_WIN_POS_MOUSE);
+  
+  /* Start creating the widgets ! */
+  vbox1 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox1);
+  gtk_widget_show (vbox1);
+  gtk_container_add (GTK_CONTAINER (xs_configwin), vbox1);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 8);
+
+  cfg_notebook = gtk_notebook_new ();
+  gtk_widget_ref (cfg_notebook);
+  gtk_widget_show (cfg_notebook);
+  gtk_box_pack_start (GTK_BOX (vbox1), cfg_notebook, TRUE, TRUE, 0);
+
+  vbox6 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox6);
+  gtk_widget_show (vbox6);
+  gtk_container_add (GTK_CONTAINER (cfg_notebook), vbox6);
+
+  hbox2 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_ref (hbox2);
+  gtk_widget_show (hbox2);
+  gtk_box_pack_start (GTK_BOX (vbox6), hbox2, TRUE, TRUE, 0);
+
+  frame4 = gtk_frame_new ("Resolution:");
+  gtk_widget_ref (frame4);
+  gtk_widget_show (frame4);
+  gtk_box_pack_start (GTK_BOX (hbox2), frame4, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame4), 4);
+
+  vbox9 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox9);
+  gtk_widget_show (vbox9);
+  gtk_container_add (GTK_CONTAINER (frame4), vbox9);
+
+  cfg_res_8bit = gtk_radio_button_new_with_label (resolution_group, "8-bit");
+  resolution_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_res_8bit));
+  gtk_widget_ref (cfg_res_8bit);
+  gtk_widget_show (cfg_res_8bit);
+  gtk_box_pack_start (GTK_BOX (vbox9), cfg_res_8bit, FALSE, FALSE, 0);
+
+  cfg_res_16bit = gtk_radio_button_new_with_label (resolution_group, "16-bit");
+  resolution_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_res_16bit));
+  gtk_widget_ref (cfg_res_16bit);
+  gtk_widget_show (cfg_res_16bit);
+  gtk_box_pack_start (GTK_BOX (vbox9), cfg_res_16bit, FALSE, FALSE, 0);
+
+  frame5 = gtk_frame_new ("Channels:");
+  gtk_widget_ref (frame5);
+  gtk_widget_show (frame5);
+  gtk_box_pack_start (GTK_BOX (hbox2), frame5, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame5), 4);
+
+  vbox10 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox10);
+  gtk_widget_show (vbox10);
+  gtk_container_add (GTK_CONTAINER (frame5), vbox10);
+
+  cfg_chn_mono = gtk_radio_button_new_with_label (channels_group, "Mono");
+  channels_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_chn_mono));
+  gtk_widget_ref (cfg_chn_mono);
+  gtk_widget_show (cfg_chn_mono);
+  gtk_box_pack_start (GTK_BOX (vbox10), cfg_chn_mono, FALSE, FALSE, 0);
+
+  cfg_chn_stereo = gtk_radio_button_new_with_label (channels_group, "Stereo");
+  channels_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_chn_stereo));
+  gtk_widget_ref (cfg_chn_stereo);
+  gtk_widget_show (cfg_chn_stereo);
+  gtk_box_pack_start (GTK_BOX (vbox10), cfg_chn_stereo, FALSE, FALSE, 0);
+
+  cfg_chn_autopan = gtk_radio_button_new_with_label (channels_group, "Autopanning");
+  channels_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_chn_autopan));
+  gtk_widget_ref (cfg_chn_autopan);
+  gtk_widget_show (cfg_chn_autopan);
+  gtk_box_pack_start (GTK_BOX (vbox10), cfg_chn_autopan, FALSE, FALSE, 0);
+
+  frame8 = gtk_frame_new ("Samplerate:");
+  gtk_widget_ref (frame8);
+  gtk_widget_show (frame8);
+  gtk_box_pack_start (GTK_BOX (vbox6), frame8, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame8), 4);
+
+  alignment4 = gtk_alignment_new (0.04, 0, 0.12, 0.5);
+  gtk_widget_ref (alignment4);
+  gtk_widget_show (alignment4);
+  gtk_container_add (GTK_CONTAINER (frame8), alignment4);
+
+  hbox4 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_ref (hbox4);
+  gtk_widget_show (hbox4);
+  gtk_container_add (GTK_CONTAINER (alignment4), hbox4);
+
+  cfg_samplerate_adj = gtk_adjustment_new (44100, 4000, 48000, 100, 1000, 0);
+  cfg_samplerate = gtk_spin_button_new (GTK_ADJUSTMENT (cfg_samplerate_adj), 1, 0);
+  gtk_widget_ref (cfg_samplerate);
+  gtk_widget_show (cfg_samplerate);
+  gtk_box_pack_start (GTK_BOX (hbox4), cfg_samplerate, TRUE, TRUE, 0);
+
+  label8 = gtk_label_new ("Hz");
+  gtk_widget_ref (label8);
+  gtk_widget_show (label8);
+  gtk_box_pack_start (GTK_BOX (hbox4), label8, FALSE, TRUE, 4);
+
+  cfg_checkfilecontent = gtk_check_button_new_with_label ("Determine filetype by contents (slower)");
+  gtk_widget_ref (cfg_checkfilecontent);
+  gtk_widget_show (cfg_checkfilecontent);
+  gtk_box_pack_start (GTK_BOX (vbox6), cfg_checkfilecontent, FALSE, FALSE, 0);
+
+  label1 = gtk_label_new ("Audio");
+  gtk_widget_ref (label1);
+  gtk_widget_show (label1);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 0), label1);
+
+  vbox2 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox2);
+  gtk_widget_show (vbox2);
+  gtk_container_add (GTK_CONTAINER (cfg_notebook), vbox2);
+
+  hbox1 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_ref (hbox1);
+  gtk_widget_show (hbox1);
+  gtk_box_pack_start (GTK_BOX (vbox2), hbox1, TRUE, TRUE, 0);
+
+  frame2 = gtk_frame_new ("Clock Speed:");
+  gtk_widget_ref (frame2);
+  gtk_widget_show (frame2);
+  gtk_box_pack_start (GTK_BOX (hbox1), frame2, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
+
+  vbox4 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox4);
+  gtk_widget_show (vbox4);
+  gtk_container_add (GTK_CONTAINER (frame2), vbox4);
+
+  cfg_clock_pal = gtk_radio_button_new_with_label (speed_group, "PAL");
+  speed_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_clock_pal));
+  gtk_widget_ref (cfg_clock_pal);
+  gtk_widget_show (cfg_clock_pal);
+  gtk_box_pack_start (GTK_BOX (vbox4), cfg_clock_pal, FALSE, FALSE, 0);
+
+  cfg_clock_ntsc = gtk_radio_button_new_with_label (speed_group, "NTSC");
+  speed_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_clock_ntsc));
+  gtk_widget_ref (cfg_clock_ntsc);
+  gtk_widget_show (cfg_clock_ntsc);
+  gtk_box_pack_start (GTK_BOX (vbox4), cfg_clock_ntsc, FALSE, FALSE, 0);
+
+  cfg_clock_force = gtk_check_button_new_with_label ("Force speed");
+  gtk_widget_ref (cfg_clock_force);
+  gtk_widget_show (cfg_clock_force);
+  gtk_box_pack_start (GTK_BOX (vbox4), cfg_clock_force, FALSE, FALSE, 0);
+
+  frame3 = gtk_frame_new ("Waveforms:");
+  gtk_widget_ref (frame3);
+  gtk_widget_show (frame3);
+  gtk_box_pack_start (GTK_BOX (hbox1), frame3, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame3), 4);
+
+  vbox3 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox3);
+  gtk_widget_show (vbox3);
+  gtk_container_add (GTK_CONTAINER (frame3), vbox3);
+
+  cfg_wav_mos6581 = gtk_radio_button_new_with_label (waveforms_group, "MOS 6581");
+  waveforms_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_wav_mos6581));
+  gtk_widget_ref (cfg_wav_mos6581);
+  gtk_widget_show (cfg_wav_mos6581);
+  gtk_box_pack_start (GTK_BOX (vbox3), cfg_wav_mos6581, FALSE, FALSE, 0);
+
+  cfg_wav_mos8580 = gtk_radio_button_new_with_label (waveforms_group, "MOS 8580");
+  waveforms_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_wav_mos8580));
+  gtk_widget_ref (cfg_wav_mos8580);
+  gtk_widget_show (cfg_wav_mos8580);
+  gtk_box_pack_start (GTK_BOX (vbox3), cfg_wav_mos8580, FALSE, FALSE, 0);
+
+  cfg_emufilters = gtk_check_button_new_with_label ("Emulate filters");
+  gtk_widget_ref (cfg_emufilters);
+  gtk_widget_show (cfg_emufilters);
+  gtk_box_pack_start (GTK_BOX (vbox3), cfg_emufilters, FALSE, FALSE, 0);
+
+  frame1 = gtk_frame_new ("Memory Mode:");
+  gtk_widget_ref (frame1);
+  gtk_widget_show (frame1);
+  gtk_box_pack_start (GTK_BOX (vbox2), frame1, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
+
+  vbox5 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox5);
+  gtk_widget_show (vbox5);
+  gtk_container_add (GTK_CONTAINER (frame1), vbox5);
+
+  cfg_mem_banksw = gtk_radio_button_new_with_label (memorymode_group, "Bank switching");
+  memorymode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_mem_banksw));
+  gtk_widget_ref (cfg_mem_banksw);
+  gtk_widget_show (cfg_mem_banksw);
+  gtk_box_pack_start (GTK_BOX (vbox5), cfg_mem_banksw, FALSE, FALSE, 0);
+
+  cfg_mem_transrom = gtk_radio_button_new_with_label (memorymode_group, "Transparent ROM");
+  memorymode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_mem_transrom));
+  gtk_widget_ref (cfg_mem_transrom);
+  gtk_widget_show (cfg_mem_transrom);
+  gtk_box_pack_start (GTK_BOX (vbox5), cfg_mem_transrom, FALSE, FALSE, 0);
+
+  cfg_mem_playsid = gtk_radio_button_new_with_label (memorymode_group, "PlaySID environment");
+  memorymode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (cfg_mem_playsid));
+  gtk_widget_ref (cfg_mem_playsid);
+  gtk_widget_show (cfg_mem_playsid);
+  gtk_box_pack_start (GTK_BOX (vbox5), cfg_mem_playsid, FALSE, FALSE, 0);
+
+  label2 = gtk_label_new ("Emulation");
+  gtk_widget_ref (label2);
+  gtk_widget_show (label2);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 1), label2);
+
+  vbox7 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox7);
+  gtk_widget_show (vbox7);
+  gtk_container_add (GTK_CONTAINER (cfg_notebook), vbox7);
+
+  frame7 = gtk_frame_new ("STIL Configuration:");
+  gtk_widget_ref (frame7);
+  gtk_widget_show (frame7);
+  gtk_box_pack_start (GTK_BOX (vbox7), frame7, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame7), 4);
+
+  vbox8 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox8);
+  gtk_widget_show (vbox8);
+  gtk_container_add (GTK_CONTAINER (frame7), vbox8);
+
+  cfg_stil_use = gtk_check_button_new_with_label ("Use STIL information database");
+  gtk_widget_ref (cfg_stil_use);
+  gtk_widget_show (cfg_stil_use);
+  gtk_box_pack_start (GTK_BOX (vbox8), cfg_stil_use, TRUE, FALSE, 0);
+
+  hbox3 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_ref (hbox3);
+  gtk_widget_show (hbox3);
+  gtk_box_pack_start (GTK_BOX (vbox8), hbox3, TRUE, TRUE, 0);
+
+  label4 = gtk_label_new ("STIL path:");
+  gtk_widget_ref (label4);
+  gtk_widget_show (label4);
+  gtk_box_pack_start (GTK_BOX (hbox3), label4, FALSE, FALSE, 0);
+  gtk_misc_set_padding (GTK_MISC (label4), 4, 0);
+
+  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_ref (alignment2);
+  gtk_widget_show (alignment2);
+  gtk_box_pack_start (GTK_BOX (hbox3), alignment2, TRUE, TRUE, 4);
+
+  cfg_stil_path = gtk_entry_new ();
+  gtk_widget_ref (cfg_stil_path);
+  gtk_widget_show (cfg_stil_path);
+  gtk_container_add (GTK_CONTAINER (alignment2), cfg_stil_path);
+
+  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 0.300001);
+  gtk_widget_ref (alignment1);
+  gtk_widget_show (alignment1);
+  gtk_box_pack_end (GTK_BOX (hbox3), alignment1, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment1), 4);
+
+  cfg_stil_browse = gtk_button_new_with_label ("Browse");
+  gtk_widget_ref (cfg_stil_browse);
+  gtk_widget_show (cfg_stil_browse);
+  gtk_container_add (GTK_CONTAINER (alignment1), cfg_stil_browse);
+
+  frame9 = gtk_frame_new ("Songname (Fileinfo) format:");
+  gtk_widget_ref (frame9);
+  gtk_widget_show (frame9);
+  gtk_box_pack_start (GTK_BOX (vbox7), frame9, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame9), 4);
+
+  vbox11 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox11);
+  gtk_widget_show (vbox11);
+  gtk_container_add (GTK_CONTAINER (frame9), vbox11);
+
+  alignment3 = gtk_alignment_new (0.5, 0.5, 0.96, 1);
+  gtk_widget_ref (alignment3);
+  gtk_widget_show (alignment3);
+  gtk_box_pack_start (GTK_BOX (vbox11), alignment3, FALSE, FALSE, 0);
+
+  cfg_songnameformat = gtk_entry_new ();
+  gtk_widget_ref (cfg_songnameformat);
+  gtk_widget_show (cfg_songnameformat);
+  gtk_container_add (GTK_CONTAINER (alignment3), cfg_songnameformat);
+
+  label7 = gtk_label_new (
+  "%1 - Composer\n"
+  "%2 - Song name (title)\n"
+  "%3 - Copyright\n"
+  "%4 - SID-file type");
+  gtk_widget_ref (label7);
+  gtk_widget_show (label7);
+  gtk_box_pack_start (GTK_BOX (vbox11), label7, TRUE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label7), 0.04, 0.5);
+
+  label3 = gtk_label_new ("STIL");
+  gtk_widget_ref (label3);
+  gtk_widget_show (label3);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 2), label3);
+
+  fixed1 = gtk_fixed_new ();
+  gtk_widget_ref (fixed1);
+  gtk_widget_show (fixed1);
+  gtk_container_add (GTK_CONTAINER (cfg_notebook), fixed1);
+  gtk_tooltips_set_tip (tooltips, fixed1, "Reset filter to default values", NULL);
+
+  cfg_filt_reset = gtk_button_new_with_label ("Reset values");
+  gtk_widget_ref (cfg_filt_reset);
+  gtk_widget_show (cfg_filt_reset);
+  gtk_fixed_put (GTK_FIXED (fixed1), cfg_filt_reset, 224, 16);
+  gtk_widget_set_uposition (cfg_filt_reset, 224, 16);
+  gtk_widget_set_usize (cfg_filt_reset, 120, 32);
+
+  label9 = gtk_label_new (
+  "These sliders affect the emulated SID's filter values.\n"
+  "Defaults are what the libsidplay sets them on init.");
+  gtk_widget_ref (label9);
+  gtk_widget_show (label9);
+  gtk_fixed_put (GTK_FIXED (fixed1), label9, 224, 56);
+  gtk_widget_set_uposition (label9, 224, 56);
+  gtk_widget_set_usize (label9, 136, 104);
+  gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_LEFT);
+  gtk_label_set_line_wrap (GTK_LABEL (label9), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label9), 0.5, 7.45058e-09);
+
+  frame12 = gtk_frame_new ("FT");
+  gtk_widget_ref (frame12);
+  gtk_widget_show (frame12);
+  gtk_fixed_put (GTK_FIXED (fixed1), frame12, 160, 16);
+  gtk_widget_set_uposition (frame12, 160, 16);
+  gtk_widget_set_usize (frame12, 48, 152);
+
+  cfg_filt_ft_adj = gtk_adjustment_new (0, 0, 1, 0.01, 0.1, 0);
+  cfg_filt_ft = gtk_vscale_new (GTK_ADJUSTMENT (cfg_filt_ft_adj));
+  gtk_widget_ref (cfg_filt_ft);
+  gtk_widget_show (cfg_filt_ft);
+  gtk_container_add (GTK_CONTAINER (frame12), cfg_filt_ft);
+  gtk_scale_set_digits (GTK_SCALE (cfg_filt_ft), 2);
+
+  cfg_frm2 = gtk_frame_new ("FM");
+  gtk_widget_ref (cfg_frm2);
+  gtk_widget_show (cfg_frm2);
+  gtk_fixed_put (GTK_FIXED (fixed1), cfg_frm2, 88, 16);
+  gtk_widget_set_uposition (cfg_frm2, 88, 16);
+  gtk_widget_set_usize (cfg_frm2, 48, 152);
+
+  cfg_filt_fm_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 0);
+  cfg_filt_fm = gtk_vscale_new (GTK_ADJUSTMENT (cfg_filt_fm_adj));
+  gtk_widget_ref (cfg_filt_fm);
+  gtk_widget_show (cfg_filt_fm);
+  gtk_container_add (GTK_CONTAINER (cfg_frm2), cfg_filt_fm);
+
+  cfg_frm1 = gtk_frame_new ("FS");
+  gtk_widget_ref (cfg_frm1);
+  gtk_widget_show (cfg_frm1);
+  gtk_fixed_put (GTK_FIXED (fixed1), cfg_frm1, 16, 16);
+  gtk_widget_set_uposition (cfg_frm1, 16, 16);
+  gtk_widget_set_usize (cfg_frm1, 56, 152);
+
+  cfg_filt_fs_adj = gtk_adjustment_new (0, 0, 1000, 1, 100, 0);
+  cfg_filt_fs = gtk_vscale_new (GTK_ADJUSTMENT (cfg_filt_fs_adj));
+  gtk_widget_ref (cfg_filt_fs);
+  gtk_widget_show (cfg_filt_fs);
+  gtk_container_add (GTK_CONTAINER (cfg_frm1), cfg_filt_fs);
+
+  label6 = gtk_label_new ("Filters");
+  gtk_widget_ref (label6);
+  gtk_widget_show (label6);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 3), label6);
+
+  hbuttonbox1 = gtk_hbutton_box_new ();
+  gtk_widget_ref (hbuttonbox1);
+  gtk_widget_show (hbuttonbox1);
+  gtk_box_pack_end (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 0);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END);
+  gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox1), 85, 30);
+
+  cfg_ok = gtk_button_new_with_label ("OK");
+  gtk_widget_ref (cfg_ok);
+  gtk_widget_show (cfg_ok);
+  gtk_container_add (GTK_CONTAINER (hbuttonbox1), cfg_ok);
+  GTK_WIDGET_SET_FLAGS (cfg_ok, GTK_CAN_DEFAULT);
+  gtk_tooltips_set_tip (tooltips, cfg_ok, "Accept and update changes", NULL);
+
+  cfg_cancel = gtk_button_new_with_label ("Cancel");
+  gtk_widget_ref (cfg_cancel);
+  gtk_widget_show (cfg_cancel);
+  gtk_container_add (GTK_CONTAINER (hbuttonbox1), cfg_cancel);
+  GTK_WIDGET_SET_FLAGS (cfg_cancel, GTK_CAN_DEFAULT);
+  gtk_tooltips_set_tip (tooltips, cfg_cancel, "Cancel any changes", NULL);
+
+
+	/* Set the states of widgets */
+
+	/* Sound resolution settings */
+	switch (xs_cfg.bitsPerSample) {
+	case 16:	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_res_16bit), TRUE); break;
+	case 8:		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_res_8bit), TRUE); break;
+	}
+
+	gtk_adjustment_set_value(GTK_ADJUSTMENT(cfg_samplerate_adj), xs_cfg.frequency);
+	
+	/* Channel settings */
+	switch (xs_cfg.channels) {
+	case 0:	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_chn_mono), TRUE); break;
+	case 1:	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_chn_stereo), TRUE); break;
+	case 2:	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_chn_autopan), TRUE); break;
+	}
+	
+	/* Memorymode settings */
+	switch (xs_cfg.memoryMode) {
+	case XMMS_SID_MPU_BANK_SWITCHING:
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_mem_banksw), TRUE);
+		break;
+		
+	case XMMS_SID_MPU_TRANSPARENT_ROM:
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_mem_transrom), TRUE);
+		break;
+	
+	case XMMS_SID_MPU_PLAYSID_ENVIRONMENT:
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_mem_playsid), TRUE);
+		break;
+	}
+
+
+	/* Filter and waveform settings */
+	if (xs_cfg.mos8580) {
+  		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_wav_mos8580), TRUE);
+  		} else {
+  		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_wav_mos6581), TRUE);
+  		}
+  	
+
+	if (xs_cfg.emulateFilter) {
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_emufilters), TRUE);
+		}
+
+	xs_cfg_filt_update();
+	
+
+	/* STIL and miscellaneous settings */
+	if (xs_cfg.usestil) {
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_stil_use), TRUE);
+		}
+
+	if (xs_cfg.detectMagic) {
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfg_checkfilecontent), TRUE);
+		}
+
+	if (xs_cfg.stilpath != NULL) {
+		gtk_entry_set_text(GTK_ENTRY(cfg_stil_path), xs_cfg.stilpath);
+		}
+
+	if (xs_cfg.fileInfo != NULL) {
+		gtk_entry_set_text(GTK_ENTRY(cfg_songnameformat), xs_cfg.fileInfo);
+		}
+
+	/* Connect the signals */
+	gtk_signal_connect (GTK_OBJECT (cfg_stil_browse), "clicked", GTK_SIGNAL_FUNC (xs_cfg_stil_browse), NULL);
+
+	gtk_signal_connect (GTK_OBJECT (cfg_filt_reset), "clicked", GTK_SIGNAL_FUNC (xs_cfg_filt_reset), NULL);
+	
+	gtk_signal_connect (GTK_OBJECT (cfg_ok), "clicked", GTK_SIGNAL_FUNC (xs_configure_ok), NULL);
+	
+	gtk_signal_connect (GTK_OBJECT (cfg_cancel), "clicked", GTK_SIGNAL_FUNC (xs_configure_cancel), NULL);
+
+	gtk_object_set_data (GTK_OBJECT (xs_configwin), "tooltips", tooltips);
+
+	gtk_widget_show(xs_configwin);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_fileinfo.cc	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,372 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   SIDTune file information dialog
+   
+   Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+   (Interface created with Glade, the Gtk+ interface builder)
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+
+#include "xmms-sid.h"
+#include <gtk/gtk.h>
+#include <sidplay/sidtune.h>
+#include <stdio.h>
+#include <string.h>
+
+static GtkWidget *xs_fileinfowin = NULL;
+static GtkWidget *fileinfo_filename, *fileinfo_songname, *fileinfo_composer;
+static GtkWidget *fileinfo_copyright, *fileinfo_ok, *fileinfo_sub_comment;
+static GtkWidget *fileinfo_sub_tune, *fileinfo_sub_tune_menu, *fileinfo_sub_artist, *fileinfo_sub_title;
+
+
+/*
+ * Close the fileinfo
+ */
+void xs_fileinfo_ok(void)
+{
+  gtk_widget_destroy(xs_fileinfowin);
+}
+
+
+/*
+ * Update the sub-tune information
+ */
+void xs_fileinfo_sub_tune(GtkWidget *widget, void *data)
+{
+ T_sid_stil_subtune *a_tune;
+ GtkWidget *a_item;
+ gint a_index;
+
+ 
+ /* Get number of subtune */
+ a_item  = gtk_menu_get_active(GTK_MENU(fileinfo_sub_tune_menu));
+ a_index = g_list_index(GTK_MENU_SHELL(fileinfo_sub_tune_menu)->children, a_item);
+
+ a_tune = &xs_stil_info.subtune[a_index];
+
+
+ /* Get and set subtune information */
+ if (a_tune->artist != NULL)
+ gtk_entry_set_text (GTK_ENTRY (fileinfo_sub_artist), a_tune->artist);
+
+ if (a_tune->title != NULL)
+ gtk_entry_set_text (GTK_ENTRY (fileinfo_sub_title), a_tune->title);
+
+ if (a_tune->comment != NULL) {
+
+	/* Freeze the widget for update */
+	gtk_text_freeze(GTK_TEXT(fileinfo_sub_comment));
+
+	/* Delete the old comment */
+	gtk_text_set_point(GTK_TEXT(fileinfo_sub_comment), 0);
+
+	gtk_text_forward_delete(GTK_TEXT(fileinfo_sub_comment),
+	gtk_text_get_length(GTK_TEXT(fileinfo_sub_comment)));
+
+	/* Put in the new comment */	
+	gtk_text_insert (GTK_TEXT (fileinfo_sub_comment), NULL, NULL, NULL,
+	a_tune->comment, strlen(a_tune->comment));
+
+	/* Un-freeze the widget */
+	gtk_text_thaw(GTK_TEXT(fileinfo_sub_comment));
+	}
+}
+
+
+/*
+ * Execute the file-info dialog
+ */
+void xs_file_info_box(char *filename)
+{
+  GtkWidget *vbox14, *table1, *label16, *label17, *label18, *label19;
+  GtkWidget *frame14, *vbox15, *glade_menuitem, *frame15, *alignment5;
+  GtkWidget *table2, *label21, *label22, *scrolledwindow2;
+  gint n;
+  gchar tempstr[128];
+
+  /* Get sidtune information */
+  sidTune t(filename);
+  if (!t) return;
+  struct sidTuneInfo sidInf;
+  t.getInfo(sidInf);
+
+  /* Check if therea already is an open fileinfo window */
+  if (xs_fileinfowin != NULL) {
+	gdk_window_raise (xs_fileinfowin->window);
+	return;
+	}
+
+  /* If not, create a new one */
+  xs_fileinfowin = gtk_window_new (GTK_WINDOW_DIALOG);
+  gtk_signal_connect(GTK_OBJECT(xs_fileinfowin),"destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &xs_fileinfowin);
+  gtk_object_set_data (GTK_OBJECT (xs_fileinfowin), "xs_fileinfowin", xs_fileinfowin);
+  gtk_widget_set_usize (xs_fileinfowin, 400, 350);
+  gtk_window_set_title (GTK_WINDOW (xs_fileinfowin), "xmms-sid fileinfo");
+  gtk_window_set_position (GTK_WINDOW (xs_fileinfowin), GTK_WIN_POS_MOUSE);
+
+  /* Start creating the widgets ! */
+  vbox14 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox14);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "vbox14", vbox14, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox14);
+  gtk_container_add (GTK_CONTAINER (xs_fileinfowin), vbox14);
+
+
+  /* Song information */
+  frame14 = gtk_frame_new ("Song Information:");
+  gtk_widget_ref (frame14);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "frame14", frame14, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame14);
+  gtk_box_pack_start (GTK_BOX (vbox14), frame14, FALSE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame14), 4);
+
+  table1 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_ref (table1);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "table1", table1, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table1);
+  gtk_container_add (GTK_CONTAINER (frame14), table1);
+  gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
+  gtk_table_set_row_spacings (GTK_TABLE (table1), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table1), 4);
+
+  label16 = gtk_label_new ("Filename:");
+  gtk_widget_ref (label16);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label16", label16, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label16);
+  gtk_table_attach (GTK_TABLE (table1), label16, 0, 1, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label17 = gtk_label_new ("Songname:");
+  gtk_widget_ref (label17);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label17", label17,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label17);
+  gtk_table_attach (GTK_TABLE (table1), label17, 0, 1, 1, 2,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label18 = gtk_label_new ("Composer:");
+  gtk_widget_ref (label18);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label18", label18,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label18);
+  gtk_table_attach (GTK_TABLE (table1), label18, 0, 1, 2, 3,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label19 = gtk_label_new ("Copyright:");
+  gtk_widget_ref (label19);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label19", label19,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label19);
+  gtk_table_attach (GTK_TABLE (table1), label19, 0, 1, 3, 4,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  fileinfo_filename = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_filename);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_filename", fileinfo_filename,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_filename);
+  gtk_table_attach (GTK_TABLE (table1), fileinfo_filename, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_filename), FALSE);
+
+  fileinfo_songname = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_songname);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_songname", fileinfo_songname,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_songname);
+  gtk_table_attach (GTK_TABLE (table1), fileinfo_songname, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_songname), FALSE);
+
+  fileinfo_composer = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_composer);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_composer", fileinfo_composer,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_composer);
+  gtk_table_attach (GTK_TABLE (table1), fileinfo_composer, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_composer), FALSE);
+
+  fileinfo_copyright = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_copyright);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_copyright", fileinfo_copyright,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_copyright);
+  gtk_table_attach (GTK_TABLE (table1), fileinfo_copyright, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_copyright), FALSE);
+
+
+  /* Tune information */
+  frame15 = gtk_frame_new ("Tune Information:");
+  gtk_widget_ref (frame15);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "frame15", frame15,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame15);
+  gtk_box_pack_start (GTK_BOX (vbox14), frame15, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame15), 4);
+
+  vbox15 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_ref (vbox15);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "vbox15", vbox15, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox15);
+  gtk_container_add (GTK_CONTAINER (frame15), vbox15);
+
+  /* Sub-tune selection menu */
+  fileinfo_sub_tune = gtk_option_menu_new ();
+  gtk_widget_ref (fileinfo_sub_tune);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_sub_tune", fileinfo_sub_tune, (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_sub_tune);
+//  gtk_box_pack_start (GTK_BOX (vbox15), fileinfo_sub_tune, FALSE, TRUE, 2);
+  gtk_box_pack_start (GTK_BOX (vbox15), fileinfo_sub_tune, FALSE, FALSE, 2);
+
+  /* -------------- */
+  table2 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_ref (table2);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "table2", table2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table2);
+  gtk_box_pack_start (GTK_BOX (vbox15), table2, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (table2), 4);
+
+  label21 = gtk_label_new ("Title:");
+  gtk_widget_ref (label21);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label21", label21,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label21);
+  gtk_table_attach (GTK_TABLE (table2), label21, 0, 1, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label22 = gtk_label_new ("Artist:");
+  gtk_widget_ref (label22);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "label22", label22,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label22);
+  gtk_table_attach (GTK_TABLE (table2), label22, 0, 1, 1, 2,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  fileinfo_sub_artist = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_sub_artist);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_sub_artist", fileinfo_sub_artist,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_sub_artist);
+  gtk_table_attach (GTK_TABLE (table2), fileinfo_sub_artist, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_sub_artist), FALSE);
+
+  fileinfo_sub_title = gtk_entry_new ();
+  gtk_widget_ref (fileinfo_sub_title);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_sub_title", fileinfo_sub_title,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_sub_title);
+  gtk_table_attach (GTK_TABLE (table2), fileinfo_sub_title, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_entry_set_editable (GTK_ENTRY (fileinfo_sub_title), FALSE);
+
+  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_ref (scrolledwindow2);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "scrolledwindow2", scrolledwindow2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (scrolledwindow2);
+  gtk_box_pack_start (GTK_BOX (vbox15), scrolledwindow2, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow2), 4);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+
+  fileinfo_sub_comment = gtk_text_new (NULL, NULL);
+  gtk_widget_ref (fileinfo_sub_comment);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_sub_comment", fileinfo_sub_comment,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_sub_comment);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow2), fileinfo_sub_comment);
+
+  alignment5 = gtk_alignment_new (0.5, 0.5, 0.1, 1);
+  gtk_widget_ref (alignment5);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "alignment5", alignment5,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alignment5);
+  gtk_box_pack_start (GTK_BOX (vbox14), alignment5, FALSE, FALSE, 0);
+
+  fileinfo_ok = gtk_button_new_with_label ("Close");
+  gtk_widget_ref (fileinfo_ok);
+  gtk_object_set_data_full (GTK_OBJECT (xs_fileinfowin), "fileinfo_ok", fileinfo_ok,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fileinfo_ok);
+  gtk_container_add (GTK_CONTAINER (alignment5), fileinfo_ok);
+  GTK_WIDGET_SET_FLAGS (fileinfo_ok, GTK_CAN_DEFAULT);
+
+  gtk_widget_grab_default (fileinfo_ok);
+
+
+  /* Set the song informations */
+  gtk_entry_set_text (GTK_ENTRY (fileinfo_filename), filename);
+  gtk_entry_set_text (GTK_ENTRY (fileinfo_songname), sidInf.infoString[0]);
+  gtk_entry_set_text (GTK_ENTRY (fileinfo_composer), sidInf.infoString[1]);
+  gtk_entry_set_text (GTK_ENTRY (fileinfo_copyright), sidInf.infoString[2]);
+
+
+  /* Sub-tune menu items */
+  fileinfo_sub_tune_menu = gtk_menu_new ();
+
+  /* "main tune" - the pseudo tune */
+  glade_menuitem = gtk_menu_item_new_with_label ("General info");
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (fileinfo_sub_tune_menu), glade_menuitem);
+  gtk_signal_connect (GTK_OBJECT (glade_menuitem), "activate",
+			GTK_SIGNAL_FUNC (xs_fileinfo_sub_tune), fileinfo_sub_tune_menu);
+
+  /* Other menu items */
+  for (n = 1; n <= sidInf.songs; n++) {
+
+	snprintf(tempstr, sizeof(tempstr), "Tune #%i", n);
+	glade_menuitem = gtk_menu_item_new_with_label (tempstr);
+	gtk_widget_show (glade_menuitem);
+	gtk_menu_append (GTK_MENU (fileinfo_sub_tune_menu), glade_menuitem);
+
+	gtk_signal_connect (GTK_OBJECT (glade_menuitem), "activate",
+			GTK_SIGNAL_FUNC (xs_fileinfo_sub_tune), fileinfo_sub_tune_menu);
+	}
+
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (fileinfo_sub_tune), fileinfo_sub_tune_menu);
+
+  /* Check if user wants STIL info */
+  if (xs_cfg.usestil)
+	xs_stil_get(filename);
+
+  /* Set the sub-tune information */
+  xs_fileinfo_sub_tune(NULL, fileinfo_sub_tune_menu);
+
+  /* Connect the signals */
+  gtk_signal_connect (GTK_OBJECT (fileinfo_ok), "clicked",
+                      GTK_SIGNAL_FUNC (xs_fileinfo_ok),
+                      NULL);
+
+  /* Show the window */
+  gtk_widget_show(xs_fileinfowin);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_init.c	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,57 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   Plugin initialization point
+   
+   Written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "xmms-sid.h"
+
+
+InputPlugin xmms_sid_ip =
+{
+	NULL,
+	NULL,
+	"xmms-sid SIDPlay plugin " VERSION,
+	xs_init,
+	xs_aboutbox,
+	xs_configure,
+	xs_is_our_file,
+	NULL,
+	xs_play_file,
+	xs_stop,
+	xs_pause,
+	xs_seek,
+	NULL,		/*	mpg123_set_eq, */
+	xs_get_time,
+	NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL,
+	xs_get_song_info,
+	xs_file_info_box,
+	NULL
+};
+
+
+
+/*
+ * Return xmms-sid plugin information
+ */	
+InputPlugin * get_iplugin_info(void)
+{
+	return &xmms_sid_ip;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xs_stil.c	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,583 @@
+/*  
+   xmms-sid - SIDPlay input plugin for X MultiMedia System (XMMS)
+
+   STIL-database parsing functions
+   
+   Mostly written by Matti "ccr" Hamalainen <mhamalai@ratol.fi>,
+   some parts written by Willem Monsuwe <willem@stack.nl>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "xmms-sid.h"
+#include <glib.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+
+/* Variables and constants */
+#define XMMS_SID_MAX_BUFSIZE	2048
+struct T_sid_stil_info	xs_stil_info;
+
+/*
+ * Utility routines
+ */
+int xs_strcalloc(gchar **result, gchar *str)
+{
+ if ((result == NULL) || (str == NULL)) return -1;
+ 
+ if (*result != NULL) g_free(*result);
+ 
+ *result = (gchar *) g_malloc(strlen(str)+1);
+ 
+ if (*result == NULL) return -2;
+ 
+ strcpy(*result, str);
+
+ return 0;
+}
+
+
+int xs_strcat(gchar **result, gchar *str)
+{
+ if ((result == NULL) || (str == NULL)) return -1;
+
+ *result = (gchar *) g_realloc(*result, strlen(*result) + strlen(str) + 1);
+ 
+ if (*result == NULL) return -2;
+
+ strcat(*result, str);
+
+ return 0;
+}
+
+
+/*
+ *	Make lowercase, strip evt. extension
+ */
+static gchar * uncase_strip_fn(gchar *str)
+{
+	gchar *res;
+	gint i, l;
+	
+	l = str ? strlen(str) : 0;
+
+	res = strrchr(str, '/');
+
+	if (res) res = strrchr(res, '.');
+
+	if (res) l = (res - str);
+
+	res = g_new(gchar, l + 1);
+
+	for (i = 0; i < l; i++) {
+		res[i] = tolower(str[i]);
+		}
+
+	res[i] = '\0';
+	
+	return res;
+}
+
+
+static gchar * xs_get_hvscname(gchar *fname)
+{
+	gchar *p, *q, *r;
+	
+	p = xs_cfg.stilpath;
+	
+	q = r = fname;   
+
+	while (*p == *q) {
+		if (*q == '/') r = q + 1;
+		p++; q++;
+	}
+
+	return r;
+}
+
+
+/*
+ * Get line (string) from given file to given buffer.
+ * Takes care of winDOS CR/LF and *NIX LF formats.
+ */
+void stil_get_line(gchar *buf, gint bufsize, FILE *f)
+{
+	gint i;
+	
+	/* Get the string */
+	fgets(buf, bufsize-1, f);
+
+	/* The file may be in DOS CR-LF format,
+	   so check for the line endings and
+	   remove the \n and \r accordingly
+	*/
+	i = strlen(buf);
+	if (i > 0) {
+	if (buf[i-2] == '\r')
+		buf[i-2] = '\0';
+		else
+		buf[i-1] = '\0';
+	}
+}
+
+
+/*
+	xs_token_skipsp(buf, j);
+	token2 = xs_token_getcopy(buf, j, ')');
+*/
+gint stil_token_skipsp(gchar *buf, gint i)
+{
+ gint len = strlen(buf);
+ 
+ while ((i < len) && ((buf[i] == 32) || (buf[i] == '\t'))) i++;
+
+ return i;
+}
+
+
+gchar * stil_token_get(gchar *buf, gint i, gchar c)
+{
+ gint j, len = strlen(buf);
+ gchar *res;
+  
+ /* Find out the end place */
+ j = i;
+ while ((buf[j] != c) && (j < len)) j++;
+ 
+ /* Malloc some memory */
+ len = (j - i);
+ res = (gchar *) g_malloc(len+1);
+ if (res == NULL) return NULL;
+ 
+ /* Return the token */
+ strncpy(res, &buf[i], len);
+ res[len] = '\0';
+ 
+ return res;
+}
+
+
+/*
+ * Clear the informations
+ */
+void xs_stil_clearone(T_sid_stil_subtune *tune)
+{
+ xs_strcalloc(&tune->title,   "\0");
+ xs_strcalloc(&tune->name,    "\0");
+ xs_strcalloc(&tune->artist,  "\0");
+ xs_strcalloc(&tune->comment, "\0");
+}
+
+void xs_stil_clear(void)
+{
+ int i;
+
+ for (i = 0; i < XMMS_SID_STIL_MAXENTRY; i++)
+	xs_stil_clearone(&xs_stil_info.subtune[i]);
+}
+
+
+/*
+ * Simple string-list handling functions
+ */
+typedef struct {
+	gint	nitems;
+	gchar * * items;
+} T_stringlist;
+
+
+int sl_insert(T_stringlist *list, gchar *str)
+{
+ gchar *res;
+ 
+ /* Check the list pointer */
+ if (list == NULL) return -1;
+ if (str == NULL) return -2;
+
+ /* Increase the space in pointer list */
+ list->nitems++;
+
+ list->items = (gchar * *) g_realloc(list->items, (sizeof(gchar **) * list->nitems));
+ if (list->items == NULL) return -3;
+ 
+ /* Allocate space for the string */
+ res = (gchar *) g_malloc(strlen(str) + 1);
+ if (res == NULL) return -4;
+ 
+ /* Put the data in */
+ strcpy(res, str);
+ list->items[(list->nitems - 1)] = res;
+
+ /* Return number of items */
+ return (list->nitems);
+}
+
+
+gchar * sl_getitem(T_stringlist *list, gint n)
+{
+ /* Check the list pointer */
+ if (list == NULL) return NULL;
+ if (list->items == NULL) return NULL;
+
+ /* Check the argument */
+ if ((n >= 0) && (n < list->nitems)) return (list->items[n]);
+ 
+ return NULL;
+}
+
+
+int sl_clear(T_stringlist *list)
+{
+ /* Check the list pointer */
+ if (list == NULL) return -1;
+
+ /* Clear the variables */
+ list->nitems = 0;
+ list->items = NULL; 
+
+ return 0;
+}
+
+
+int sl_free(T_stringlist *list)
+{
+ gint i;
+
+ /* Check the list pointer */
+ if (list == NULL) return -1;
+
+ /* Check the items */
+ if (list->items != NULL)
+ {
+  /* Free all strings in list, if any */
+  for (i = 0; i < list->nitems; i++)
+  	{
+  	if (list->items[i] != NULL)
+  		free(list->items[i]);
+  	}
+  	
+  /* Free the list itself */
+  free(list->items);
+ }
+
+ /* Clear the data */
+ list->nitems = 0;
+ list->items = NULL;
+ 
+ return 0;
+}
+
+
+/*
+ * "Submit" all gathered "lists" to given tunedef
+ */
+void xs_stil_submit(T_sid_stil_subtune *tune, T_stringlist *iartist,
+		   T_stringlist *icomment, T_stringlist *iname, T_stringlist *ititle)
+{
+ gchar *tmpstr;
+ gint i, ok;
+
+ /* Clear the data */
+ xs_stil_clearone(tune);
+
+ /* "Submit" lists to tunedata */
+ if ((iartist->nitems > 1) ||
+     (icomment->nitems > 1) ||
+     (iname->nitems > 1) ||
+     (ititle->nitems > 1))
+	{
+	/* Multiple items per category */
+	i = 0;
+	ok = 1;
+	while (ok) {
+		/* Clear the flag */
+		ok = 0;
+
+		/* Get items from lists */		
+		tmpstr = sl_getitem(iartist, i);
+		if (tmpstr != NULL) {
+			xs_strcat(&tune->comment, "\nArtist: ");
+			xs_strcat(&tune->comment, tmpstr);
+			ok = 1;
+			}
+		
+		tmpstr = sl_getitem(icomment, i);
+		if (tmpstr != NULL) {
+			xs_strcat(&tune->comment, "\nComment: ");
+			xs_strcat(&tune->comment, tmpstr);
+			ok = 1;
+			}
+		
+		tmpstr = sl_getitem(iname, i);
+		if (tmpstr != NULL) {
+			xs_strcat(&tune->comment, "\nName: ");
+			xs_strcat(&tune->comment, tmpstr);
+			ok = 1;
+			}
+		
+		tmpstr = sl_getitem(ititle, i);
+		if (tmpstr != NULL) {
+			xs_strcat(&tune->comment, "\nTitle: ");
+			xs_strcat(&tune->comment, tmpstr);
+			ok = 1;
+			}
+		
+		/* Next one */	
+		i++;				
+		}
+	} else
+	{
+	/* Only one item or none */ 
+	tmpstr = sl_getitem(iartist, 0);
+	if (tmpstr != NULL) xs_strcalloc(&tune->artist, tmpstr);
+
+	tmpstr = sl_getitem(icomment, 0);
+	if (tmpstr != NULL) xs_strcalloc(&tune->comment, tmpstr);
+
+	tmpstr = sl_getitem(iname, 0);
+	if (tmpstr != NULL) xs_strcalloc(&tune->name, tmpstr);
+
+	tmpstr = sl_getitem(ititle, 0);
+	if (tmpstr != NULL) xs_strcalloc(&tune->title, tmpstr);
+	}
+
+ /* Free the lists */
+ sl_free(iartist);
+ sl_free(icomment);
+ sl_free(iname);
+ sl_free(ititle);
+}
+
+
+/*
+ * Parse all STIL data for one song (subsongs, etc)
+ */
+int xs_stil_parse_entry(FILE *stilf, gchar *buf, gint bufsize)
+{
+	T_stringlist iartist, icomment, iname, ititle;
+	gchar *token1, *token2, *tmpbuf;
+	gint ntune, found, found2;
+	gint i, j;
+
+	XSDEBUG("token '%s':\n", buf);
+
+	/* Clear and initialize variables */
+	ntune = 0;
+
+	sl_clear(&iartist);
+	sl_clear(&icomment);
+	sl_clear(&iname);
+	sl_clear(&ititle);
+
+	tmpbuf = NULL;
+	
+	/* Ok, it was found! Now get and parse the data */
+	found = ntune = 0;
+
+	while ((!feof(stilf)) && (found == 0)) {
+	/* Get line from file */
+	stil_get_line(buf, bufsize, stilf);
+
+nreadln:
+  
+	/* Check for empty (end of STIL record) */
+	if (buf[0] == '\0') found = 1; else
+			
+	{
+	/* Skip whitespaces and get first token */
+	j = 0;
+	token1 = (gchar *) (buf);
+
+	/* Check for data types and act accordingly */
+	if (token1[0] == '(') {
+		j = stil_token_skipsp(buf, j+1);
+		if (buf[j] == '#') {
+			token2 = stil_token_get(buf, j+1, ')');
+			i = atoi(token2);
+
+			if ((i >= 1) || (i < XMMS_SID_STIL_MAXENTRY)) {
+
+				xs_stil_submit(&xs_stil_info.subtune[ntune],
+					&iartist,
+					&icomment,
+					&iname,
+					&ititle);
+
+				ntune = i;
+
+				XSDEBUG("tune_num: '%d'\n", ntune);
+				}
+						
+			g_free(token2);
+			}
+		} else
+
+	if (!strncmp(token1, "COMMENT:", 8)) {
+		j = stil_token_skipsp(buf, j + 8);
+		token1 = (gchar *) (buf + j);
+
+		if (xs_strcalloc(&tmpbuf, token1)) return -4;
+
+		found2 = 0;
+		while ((!feof(stilf)) && (found2 == 0)) {
+
+			/* Read next entry line */
+			j = 0;
+			stil_get_line(buf, bufsize, stilf);
+
+			/* Check if the comment continues? */
+			if (strncmp("         ", buf, 9) != 0) {
+			found2 = 1;
+			} else {
+
+			/* Get the comment line and parse it */
+			j = stil_token_skipsp(buf, j + 9);
+			token1 = (gchar *) (buf + j);
+
+			/* Cat to the end */
+			if (xs_strcat(&tmpbuf, " ") < 0) return -4;
+			if (xs_strcat(&tmpbuf, token1) < 0) return -4;
+
+			} /* if..else */
+		} /* while */
+
+
+		/* Insert the result */
+		XSDEBUG("comment: '%s'\n", tmpbuf);
+		sl_insert(&icomment, tmpbuf);
+
+		if (tmpbuf != NULL) free(tmpbuf);
+		tmpbuf = NULL;
+
+		goto nreadln;	/* EVIL GOTO! */
+		} else
+
+	if (!strncmp(token1, "  TITLE:", 8)) {
+		j = stil_token_skipsp(buf, j + 8);
+		token1 = (gchar *) (buf + j);
+			
+		XSDEBUG("title  : '%s'\n", token1);
+		sl_insert(&ititle, token1);
+		} else
+
+	if (!strncmp(token1, " ARTIST:", 8)) {
+		j = stil_token_skipsp(buf, j + 8);
+		token1 = (gchar *) (buf + j);
+
+		XSDEBUG("artist : '%s'\n", token1);
+		sl_insert(&iartist, token1);
+		} else
+
+	if (!strncmp(token1, "   NAME:", 8)) {
+		j = stil_token_skipsp(buf, j + 8);
+		token1 = (gchar *) (buf + j);
+			
+		XSDEBUG("name   : '%s'\n", token1);
+		sl_insert(&iname, token1);
+		}
+	}
+			
+	} /* while */
+
+
+	/* Submit the last entry */
+	xs_stil_submit(&xs_stil_info.subtune[ntune],
+			&iartist,
+			&icomment,
+			&iname,
+			&ititle);
+
+			
+	XSDEBUG("end of tunedef.\n");
+	return 0;
+}
+
+
+/*
+ * Main routine for searching the STIL-database file
+ */
+int xs_stil_get(gchar *sidfn)
+{
+	FILE *stilf;
+	gchar *e, *a, *buf;
+	guint bufsize;
+	gint found, i, result;
+	struct stat stilst;
+
+
+	/* Clear the STIL info */
+	xs_stil_clear();
+
+	/* Check the given STIL database filename */
+	if ((!xs_cfg.stilpath || !xs_cfg.stilpath[0])) return -1;
+
+	/* Check if the STIL database file exists */
+	if (stat(xs_cfg.stilpath, &stilst) < 0) return -1;
+
+	/* Try to allocate the temporary buffer */
+	bufsize = (XMMS_SID_MAX_BUFSIZE + 1);
+	buf = (gchar *) g_malloc(bufsize);
+	if (buf == NULL) return -2;
+
+
+	/* Try to open the STIL database file */
+	stilf = fopen(xs_cfg.stilpath, "r");
+	if (!stilf) return -3;
+
+	/* -- */
+	e = uncase_strip_fn(xs_get_hvscname(sidfn));
+	XSDEBUG("sfn = '%s'\n", e);
+
+	result = found = 0;
+
+	while ((!feof(stilf)) && (found == 0)) {
+
+		stil_get_line(buf, bufsize, stilf);
+		
+		/* Ignore everything else until a filename is found */
+		if (buf[0] == '/') {
+		
+			/* Check against our sidname */
+			a = uncase_strip_fn((gchar *) (buf+1));
+			i = strcmp(a, e);
+			g_free(a);
+
+			/* Parse entry if found */
+			if (!i) {
+				result = xs_stil_parse_entry(stilf, buf, bufsize);
+				found = 1;
+				}
+				
+		} /* if (buf[0]... */
+		
+	} /* while */
+	
+	/* Shutdown & close */
+	g_free(e);
+	g_free(buf);
+	
+	if (!fclose(stilf)) return -3;
+
+	/* Successful return ?? */
+	if ((found) && (result >= 0))
+		return 0;
+		else
+		return 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmms-sid.glade	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,1546 @@
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+  <name>paske</name>
+  <program_name>paske</program_name>
+  <directory></directory>
+  <source_directory>src</source_directory>
+  <pixmaps_directory>pixmaps</pixmaps_directory>
+  <language>C</language>
+  <gnome_support>False</gnome_support>
+  <gettext_support>False</gettext_support>
+</project>
+
+<widget>
+  <class>GtkWindow</class>
+  <name>sid_configwin</name>
+  <title>xmms-sid configuration</title>
+  <type>GTK_WINDOW_DIALOG</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>False</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>False</allow_grow>
+  <auto_shrink>False</auto_shrink>
+
+  <widget>
+    <class>GtkVBox</class>
+    <name>vbox1</name>
+    <border_width>8</border_width>
+    <homogeneous>False</homogeneous>
+    <spacing>0</spacing>
+
+    <widget>
+      <class>GtkNotebook</class>
+      <name>cfg_notebook</name>
+      <can_focus>True</can_focus>
+      <show_tabs>True</show_tabs>
+      <show_border>True</show_border>
+      <tab_pos>GTK_POS_TOP</tab_pos>
+      <scrollable>False</scrollable>
+      <tab_hborder>2</tab_hborder>
+      <tab_vborder>2</tab_vborder>
+      <popup_enable>False</popup_enable>
+      <child>
+	<padding>0</padding>
+	<expand>True</expand>
+	<fill>True</fill>
+      </child>
+
+      <widget>
+	<class>GtkVBox</class>
+	<name>vbox6</name>
+	<homogeneous>False</homogeneous>
+	<spacing>0</spacing>
+
+	<widget>
+	  <class>GtkHBox</class>
+	  <name>hbox2</name>
+	  <homogeneous>False</homogeneous>
+	  <spacing>0</spacing>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkFrame</class>
+	    <name>frame4</name>
+	    <border_width>4</border_width>
+	    <label>Resolution:</label>
+	    <label_xalign>0</label_xalign>
+	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	    <child>
+	      <padding>0</padding>
+	      <expand>True</expand>
+	      <fill>True</fill>
+	    </child>
+
+	    <widget>
+	      <class>GtkVBox</class>
+	      <name>vbox9</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_res_8bit</name>
+		<can_focus>True</can_focus>
+		<label>8-bit</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>resolution</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_res_16bit</name>
+		<can_focus>True</can_focus>
+		<label>16-bit</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>resolution</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+	    </widget>
+	  </widget>
+
+	  <widget>
+	    <class>GtkFrame</class>
+	    <name>frame5</name>
+	    <border_width>4</border_width>
+	    <label>Channels:</label>
+	    <label_xalign>0</label_xalign>
+	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	    <child>
+	      <padding>0</padding>
+	      <expand>True</expand>
+	      <fill>True</fill>
+	    </child>
+
+	    <widget>
+	      <class>GtkVBox</class>
+	      <name>vbox10</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_chn_mono</name>
+		<can_focus>True</can_focus>
+		<label>Mono</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>channels</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_chn_stereo</name>
+		<can_focus>True</can_focus>
+		<label>Stereo</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>channels</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_chn_autopan</name>
+		<can_focus>True</can_focus>
+		<label>Autopanning</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>channels</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+	    </widget>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>frame8</name>
+	  <border_width>4</border_width>
+	  <label>Samplerate:</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkAlignment</class>
+	    <name>alignment4</name>
+	    <xalign>0.04</xalign>
+	    <yalign>0</yalign>
+	    <xscale>0.12</xscale>
+	    <yscale>0.5</yscale>
+
+	    <widget>
+	      <class>GtkHBox</class>
+	      <name>hbox4</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+
+	      <widget>
+		<class>GtkSpinButton</class>
+		<name>cfg_samplerate</name>
+		<can_focus>True</can_focus>
+		<signal>
+		  <name>changed</name>
+		  <handler>on_cfg_samplerate_changed</handler>
+		  <last_modification_time>Mon, 18 Sep 2000 17:52:20 GMT</last_modification_time>
+		</signal>
+		<climb_rate>1</climb_rate>
+		<digits>0</digits>
+		<numeric>False</numeric>
+		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
+		<snap>False</snap>
+		<wrap>False</wrap>
+		<value>44100</value>
+		<lower>4000</lower>
+		<upper>48000</upper>
+		<step>100</step>
+		<page>1000</page>
+		<page_size>0</page_size>
+		<child>
+		  <padding>0</padding>
+		  <expand>True</expand>
+		  <fill>True</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkLabel</class>
+		<name>label8</name>
+		<label>Hz</label>
+		<justify>GTK_JUSTIFY_CENTER</justify>
+		<wrap>False</wrap>
+		<xalign>0.5</xalign>
+		<yalign>0.5</yalign>
+		<xpad>0</xpad>
+		<ypad>0</ypad>
+		<child>
+		  <padding>4</padding>
+		  <expand>False</expand>
+		  <fill>True</fill>
+		</child>
+	      </widget>
+	    </widget>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkCheckButton</class>
+	  <name>cfg_checkfilecontent</name>
+	  <can_focus>True</can_focus>
+	  <signal>
+	    <name>toggled</name>
+	    <handler>on_cfg_checkfilecontent_toggled</handler>
+	    <last_modification_time>Mon, 18 Sep 2000 17:51:55 GMT</last_modification_time>
+	  </signal>
+	  <label>Determine filetype by contents (slower)</label>
+	  <active>False</active>
+	  <draw_indicator>True</draw_indicator>
+	  <child>
+	    <padding>0</padding>
+	    <expand>False</expand>
+	    <fill>False</fill>
+	  </child>
+	</widget>
+      </widget>
+
+      <widget>
+	<class>GtkLabel</class>
+	<child_name>Notebook:tab</child_name>
+	<name>label1</name>
+	<label>Audio</label>
+	<justify>GTK_JUSTIFY_CENTER</justify>
+	<wrap>False</wrap>
+	<xalign>0.5</xalign>
+	<yalign>0.5</yalign>
+	<xpad>0</xpad>
+	<ypad>0</ypad>
+      </widget>
+
+      <widget>
+	<class>GtkVBox</class>
+	<name>vbox2</name>
+	<homogeneous>False</homogeneous>
+	<spacing>0</spacing>
+
+	<widget>
+	  <class>GtkHBox</class>
+	  <name>hbox1</name>
+	  <homogeneous>False</homogeneous>
+	  <spacing>0</spacing>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkFrame</class>
+	    <name>frame2</name>
+	    <border_width>4</border_width>
+	    <label>Clock Speed:</label>
+	    <label_xalign>0</label_xalign>
+	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	    <child>
+	      <padding>0</padding>
+	      <expand>True</expand>
+	      <fill>True</fill>
+	    </child>
+
+	    <widget>
+	      <class>GtkVBox</class>
+	      <name>vbox4</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_clock_pal</name>
+		<can_focus>True</can_focus>
+		<label>PAL</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>speed</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_clock_ntsc</name>
+		<can_focus>True</can_focus>
+		<label>NTSC</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>speed</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkCheckButton</class>
+		<name>cfg_clock_force</name>
+		<can_focus>True</can_focus>
+		<signal>
+		  <name>toggled</name>
+		  <handler>on_cfg_clock_force_toggled</handler>
+		  <last_modification_time>Mon, 18 Sep 2000 17:51:45 GMT</last_modification_time>
+		</signal>
+		<label>Force speed</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+	    </widget>
+	  </widget>
+
+	  <widget>
+	    <class>GtkFrame</class>
+	    <name>frame3</name>
+	    <border_width>4</border_width>
+	    <label>Waveforms:</label>
+	    <label_xalign>0</label_xalign>
+	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	    <child>
+	      <padding>0</padding>
+	      <expand>True</expand>
+	      <fill>True</fill>
+	    </child>
+
+	    <widget>
+	      <class>GtkVBox</class>
+	      <name>vbox3</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_wav_mos6581</name>
+		<can_focus>True</can_focus>
+		<label>MOS 6581</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>waveforms</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkRadioButton</class>
+		<name>cfg_wav_mos8580</name>
+		<can_focus>True</can_focus>
+		<label>MOS 8580</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<group>waveforms</group>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkCheckButton</class>
+		<name>cfg_emufilters</name>
+		<can_focus>True</can_focus>
+		<signal>
+		  <name>toggled</name>
+		  <handler>on_cfg_emufilters_toggled</handler>
+		  <last_modification_time>Mon, 18 Sep 2000 17:51:41 GMT</last_modification_time>
+		</signal>
+		<label>Emulate filters</label>
+		<active>False</active>
+		<draw_indicator>True</draw_indicator>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+	    </widget>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>frame1</name>
+	  <border_width>4</border_width>
+	  <label>Memory Mode:</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkVBox</class>
+	    <name>vbox5</name>
+	    <homogeneous>False</homogeneous>
+	    <spacing>0</spacing>
+
+	    <widget>
+	      <class>GtkRadioButton</class>
+	      <name>cfg_mem_banksw</name>
+	      <can_focus>True</can_focus>
+	      <label>Bank switching</label>
+	      <active>False</active>
+	      <draw_indicator>True</draw_indicator>
+	      <group>memorymode</group>
+	      <child>
+		<padding>0</padding>
+		<expand>False</expand>
+		<fill>False</fill>
+	      </child>
+	    </widget>
+
+	    <widget>
+	      <class>GtkRadioButton</class>
+	      <name>cfg_mem_transrom</name>
+	      <can_focus>True</can_focus>
+	      <label>Transparent ROM</label>
+	      <active>False</active>
+	      <draw_indicator>True</draw_indicator>
+	      <group>memorymode</group>
+	      <child>
+		<padding>0</padding>
+		<expand>False</expand>
+		<fill>False</fill>
+	      </child>
+	    </widget>
+
+	    <widget>
+	      <class>GtkRadioButton</class>
+	      <name>cfg_mem_playsid</name>
+	      <can_focus>True</can_focus>
+	      <label>PlaySID environment</label>
+	      <active>False</active>
+	      <draw_indicator>True</draw_indicator>
+	      <group>memorymode</group>
+	      <child>
+		<padding>0</padding>
+		<expand>False</expand>
+		<fill>False</fill>
+	      </child>
+	    </widget>
+	  </widget>
+	</widget>
+      </widget>
+
+      <widget>
+	<class>GtkLabel</class>
+	<child_name>Notebook:tab</child_name>
+	<name>label2</name>
+	<label>Emulation</label>
+	<justify>GTK_JUSTIFY_CENTER</justify>
+	<wrap>False</wrap>
+	<xalign>0.5</xalign>
+	<yalign>0.5</yalign>
+	<xpad>0</xpad>
+	<ypad>0</ypad>
+      </widget>
+
+      <widget>
+	<class>GtkVBox</class>
+	<name>vbox7</name>
+	<homogeneous>False</homogeneous>
+	<spacing>0</spacing>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>frame7</name>
+	  <border_width>4</border_width>
+	  <label>STIL Configuration:</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkVBox</class>
+	    <name>vbox8</name>
+	    <homogeneous>False</homogeneous>
+	    <spacing>0</spacing>
+
+	    <widget>
+	      <class>GtkCheckButton</class>
+	      <name>cfg_stil_use</name>
+	      <can_focus>True</can_focus>
+	      <label>Use STIL information database</label>
+	      <active>False</active>
+	      <draw_indicator>True</draw_indicator>
+	      <child>
+		<padding>0</padding>
+		<expand>True</expand>
+		<fill>False</fill>
+	      </child>
+	    </widget>
+
+	    <widget>
+	      <class>GtkHBox</class>
+	      <name>hbox3</name>
+	      <homogeneous>False</homogeneous>
+	      <spacing>0</spacing>
+	      <child>
+		<padding>0</padding>
+		<expand>True</expand>
+		<fill>True</fill>
+	      </child>
+
+	      <widget>
+		<class>GtkLabel</class>
+		<name>label4</name>
+		<label>STIL path:</label>
+		<justify>GTK_JUSTIFY_CENTER</justify>
+		<wrap>False</wrap>
+		<xalign>0.5</xalign>
+		<yalign>0.5</yalign>
+		<xpad>4</xpad>
+		<ypad>0</ypad>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		</child>
+	      </widget>
+
+	      <widget>
+		<class>GtkAlignment</class>
+		<name>alignment2</name>
+		<xalign>0.5</xalign>
+		<yalign>0.5</yalign>
+		<xscale>1</xscale>
+		<yscale>1</yscale>
+		<child>
+		  <padding>4</padding>
+		  <expand>True</expand>
+		  <fill>True</fill>
+		</child>
+
+		<widget>
+		  <class>GtkEntry</class>
+		  <name>cfg_stil_path</name>
+		  <can_focus>True</can_focus>
+		  <editable>True</editable>
+		  <text_visible>True</text_visible>
+		  <text_max_length>0</text_max_length>
+		  <text>homoa</text>
+		</widget>
+	      </widget>
+
+	      <widget>
+		<class>GtkAlignment</class>
+		<name>alignment1</name>
+		<border_width>4</border_width>
+		<xalign>0.5</xalign>
+		<yalign>0.5</yalign>
+		<xscale>1</xscale>
+		<yscale>0.300001</yscale>
+		<child>
+		  <padding>0</padding>
+		  <expand>False</expand>
+		  <fill>False</fill>
+		  <pack>GTK_PACK_END</pack>
+		</child>
+
+		<widget>
+		  <class>GtkButton</class>
+		  <name>cfg_stil_browse</name>
+		  <can_focus>True</can_focus>
+		  <signal>
+		    <name>clicked</name>
+		    <handler>on_cfg_stil_browse_clicked</handler>
+		    <last_modification_time>Mon, 18 Sep 2000 17:51:32 GMT</last_modification_time>
+		  </signal>
+		  <label>Browse</label>
+		  <relief>GTK_RELIEF_NORMAL</relief>
+		</widget>
+	      </widget>
+	    </widget>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>frame9</name>
+	  <border_width>4</border_width>
+	  <label>Songname (Fileinfo) format:</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkVBox</class>
+	    <name>vbox11</name>
+	    <homogeneous>False</homogeneous>
+	    <spacing>0</spacing>
+
+	    <widget>
+	      <class>GtkAlignment</class>
+	      <name>alignment3</name>
+	      <xalign>0.5</xalign>
+	      <yalign>0.5</yalign>
+	      <xscale>0.96</xscale>
+	      <yscale>1</yscale>
+	      <child>
+		<padding>0</padding>
+		<expand>False</expand>
+		<fill>False</fill>
+	      </child>
+
+	      <widget>
+		<class>GtkEntry</class>
+		<name>cfg_songnameformat</name>
+		<can_focus>True</can_focus>
+		<editable>True</editable>
+		<text_visible>True</text_visible>
+		<text_max_length>0</text_max_length>
+		<text></text>
+	      </widget>
+	    </widget>
+
+	    <widget>
+	      <class>GtkLabel</class>
+	      <name>label7</name>
+	      <label>%1 - Composer
+%2 - Song name (title)
+%3 - Copyright</label>
+	      <justify>GTK_JUSTIFY_LEFT</justify>
+	      <wrap>False</wrap>
+	      <xalign>0.04</xalign>
+	      <yalign>0.5</yalign>
+	      <xpad>0</xpad>
+	      <ypad>0</ypad>
+	      <child>
+		<padding>0</padding>
+		<expand>True</expand>
+		<fill>True</fill>
+	      </child>
+	    </widget>
+	  </widget>
+	</widget>
+      </widget>
+
+      <widget>
+	<class>GtkLabel</class>
+	<child_name>Notebook:tab</child_name>
+	<name>label3</name>
+	<label>STIL</label>
+	<justify>GTK_JUSTIFY_CENTER</justify>
+	<wrap>False</wrap>
+	<xalign>0.5</xalign>
+	<yalign>0.5</yalign>
+	<xpad>0</xpad>
+	<ypad>0</ypad>
+      </widget>
+
+      <widget>
+	<class>GtkFixed</class>
+	<name>fixed1</name>
+	<tooltip>Reset filter to default values</tooltip>
+
+	<widget>
+	  <class>GtkButton</class>
+	  <name>cfg_filt_reset</name>
+	  <x>224</x>
+	  <y>16</y>
+	  <width>120</width>
+	  <height>32</height>
+	  <can_focus>True</can_focus>
+	  <signal>
+	    <name>clicked</name>
+	    <handler>on_cfg_filt_reset_clicked</handler>
+	    <last_modification_time>Mon, 18 Sep 2000 20:21:27 GMT</last_modification_time>
+	  </signal>
+	  <label>Reset values</label>
+	  <relief>GTK_RELIEF_NORMAL</relief>
+	</widget>
+
+	<widget>
+	  <class>GtkLabel</class>
+	  <name>label9</name>
+	  <x>224</x>
+	  <y>56</y>
+	  <width>136</width>
+	  <height>104</height>
+	  <label>These sliders affect the emulated SID's filter values.
+Defaults are what the libsidplay sets them on init.</label>
+	  <justify>GTK_JUSTIFY_LEFT</justify>
+	  <wrap>True</wrap>
+	  <xalign>0.5</xalign>
+	  <yalign>7.45058e-09</yalign>
+	  <xpad>0</xpad>
+	  <ypad>0</ypad>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>frame12</name>
+	  <x>160</x>
+	  <y>16</y>
+	  <width>48</width>
+	  <height>152</height>
+	  <label>FT</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+
+	  <widget>
+	    <class>GtkVScale</class>
+	    <name>cfg_filt_ft</name>
+	    <can_focus>True</can_focus>
+	    <draw_value>True</draw_value>
+	    <value_pos>GTK_POS_TOP</value_pos>
+	    <digits>2</digits>
+	    <policy>GTK_UPDATE_CONTINUOUS</policy>
+	    <value>0</value>
+	    <lower>0</lower>
+	    <upper>1</upper>
+	    <step>0.01</step>
+	    <page>0.1</page>
+	    <page_size>0</page_size>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>cfg_frm2</name>
+	  <x>88</x>
+	  <y>16</y>
+	  <width>48</width>
+	  <height>152</height>
+	  <label>FM</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+
+	  <widget>
+	    <class>GtkVScale</class>
+	    <name>cfg_filt_fm</name>
+	    <can_focus>True</can_focus>
+	    <draw_value>True</draw_value>
+	    <value_pos>GTK_POS_TOP</value_pos>
+	    <digits>1</digits>
+	    <policy>GTK_UPDATE_CONTINUOUS</policy>
+	    <value>0</value>
+	    <lower>0</lower>
+	    <upper>100</upper>
+	    <step>1</step>
+	    <page>10</page>
+	    <page_size>0</page_size>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkFrame</class>
+	  <name>cfg_frm1</name>
+	  <x>16</x>
+	  <y>16</y>
+	  <width>56</width>
+	  <height>152</height>
+	  <label>FS</label>
+	  <label_xalign>0</label_xalign>
+	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+
+	  <widget>
+	    <class>GtkVScale</class>
+	    <name>cfg_filt_fs</name>
+	    <can_focus>True</can_focus>
+	    <draw_value>True</draw_value>
+	    <value_pos>GTK_POS_TOP</value_pos>
+	    <digits>1</digits>
+	    <policy>GTK_UPDATE_CONTINUOUS</policy>
+	    <value>0</value>
+	    <lower>0</lower>
+	    <upper>1000</upper>
+	    <step>1</step>
+	    <page>100</page>
+	    <page_size>0</page_size>
+	  </widget>
+	</widget>
+      </widget>
+
+      <widget>
+	<class>GtkLabel</class>
+	<child_name>Notebook:tab</child_name>
+	<name>label6</name>
+	<label>Filters</label>
+	<justify>GTK_JUSTIFY_CENTER</justify>
+	<wrap>False</wrap>
+	<xalign>0.5</xalign>
+	<yalign>0.5</yalign>
+	<xpad>0</xpad>
+	<ypad>0</ypad>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkHButtonBox</class>
+      <name>hbuttonbox1</name>
+      <layout_style>GTK_BUTTONBOX_END</layout_style>
+      <spacing>30</spacing>
+      <child_min_width>85</child_min_width>
+      <child_min_height>30</child_min_height>
+      <child_ipad_x>7</child_ipad_x>
+      <child_ipad_y>0</child_ipad_y>
+      <child>
+	<padding>0</padding>
+	<expand>False</expand>
+	<fill>False</fill>
+	<pack>GTK_PACK_END</pack>
+      </child>
+
+      <widget>
+	<class>GtkButton</class>
+	<name>cfg_ok</name>
+	<tooltip>Accept and update changes</tooltip>
+	<can_default>True</can_default>
+	<can_focus>True</can_focus>
+	<signal>
+	  <name>clicked</name>
+	  <handler>on_cfg_ok_clicked</handler>
+	  <last_modification_time>Mon, 18 Sep 2000 17:49:51 GMT</last_modification_time>
+	</signal>
+	<label>OK</label>
+	<relief>GTK_RELIEF_NORMAL</relief>
+      </widget>
+
+      <widget>
+	<class>GtkButton</class>
+	<name>cfg_cancel</name>
+	<tooltip>Cancel any changes</tooltip>
+	<can_default>True</can_default>
+	<can_focus>True</can_focus>
+	<signal>
+	  <name>clicked</name>
+	  <handler>on_cfg_cancel_clicked</handler>
+	  <last_modification_time>Mon, 18 Sep 2000 17:49:57 GMT</last_modification_time>
+	</signal>
+	<label>Cancel</label>
+	<relief>GTK_RELIEF_NORMAL</relief>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
+<widget>
+  <class>GtkWindow</class>
+  <name>sid_aboutwin</name>
+  <title>About xmms-sid</title>
+  <type>GTK_WINDOW_DIALOG</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>False</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>False</allow_grow>
+  <auto_shrink>False</auto_shrink>
+
+  <widget>
+    <class>GtkVBox</class>
+    <name>vbox12</name>
+    <homogeneous>False</homogeneous>
+    <spacing>0</spacing>
+
+    <widget>
+      <class>GtkHBox</class>
+      <name>hbox5</name>
+      <homogeneous>False</homogeneous>
+      <spacing>0</spacing>
+      <child>
+	<padding>0</padding>
+	<expand>True</expand>
+	<fill>True</fill>
+      </child>
+
+      <widget>
+	<class>GtkFrame</class>
+	<name>frame13</name>
+	<border_width>4</border_width>
+	<label_xalign>0</label_xalign>
+	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+	<child>
+	  <padding>0</padding>
+	  <expand>True</expand>
+	  <fill>True</fill>
+	</child>
+
+	<widget>
+	  <class>GtkPixmap</class>
+	  <name>pixmap1</name>
+	  <filename>xmms-sid-logo.xpm</filename>
+	  <xalign>0.5</xalign>
+	  <yalign>0.5</yalign>
+	  <xpad>4</xpad>
+	  <ypad>4</ypad>
+	  <build_insensitive>True</build_insensitive>
+	</widget>
+      </widget>
+
+      <widget>
+	<class>GtkLabel</class>
+	<name>label10</name>
+	<label>XMMS-SID SIDPlay plugin
+for X MultiMedia System
+by Willem Monsuwe and
+Matti &quot;ccr&quot; Hämäläinen.</label>
+	<justify>GTK_JUSTIFY_CENTER</justify>
+	<wrap>False</wrap>
+	<xalign>0.5</xalign>
+	<yalign>0.5</yalign>
+	<xpad>8</xpad>
+	<ypad>0</ypad>
+	<child>
+	  <padding>0</padding>
+	  <expand>False</expand>
+	  <fill>False</fill>
+	</child>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkHButtonBox</class>
+      <name>hbuttonbox2</name>
+      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+      <spacing>30</spacing>
+      <child_min_width>85</child_min_width>
+      <child_min_height>27</child_min_height>
+      <child_ipad_x>7</child_ipad_x>
+      <child_ipad_y>0</child_ipad_y>
+      <child>
+	<padding>0</padding>
+	<expand>True</expand>
+	<fill>True</fill>
+      </child>
+
+      <widget>
+	<class>GtkButton</class>
+	<name>about_ok</name>
+	<can_default>True</can_default>
+	<can_focus>True</can_focus>
+	<signal>
+	  <name>clicked</name>
+	  <handler>on_about_ok_clicked</handler>
+	  <last_modification_time>Tue, 19 Sep 2000 19:57:12 GMT</last_modification_time>
+	</signal>
+	<label>OK</label>
+	<relief>GTK_RELIEF_NORMAL</relief>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
+<widget>
+  <class>GtkWindow</class>
+  <name>sid_fileinfowin</name>
+  <width>400</width>
+  <height>350</height>
+  <title>xmms-sid fileinfo</title>
+  <type>GTK_WINDOW_DIALOG</type>
+  <position>GTK_WIN_POS_MOUSE</position>
+  <modal>False</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>True</allow_grow>
+  <auto_shrink>False</auto_shrink>
+
+  <widget>
+    <class>GtkVBox</class>
+    <name>vbox14</name>
+    <homogeneous>False</homogeneous>
+    <spacing>0</spacing>
+
+    <widget>
+      <class>GtkFrame</class>
+      <name>frame14</name>
+      <border_width>4</border_width>
+      <label>Song Information:</label>
+      <label_xalign>0</label_xalign>
+      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+      <child>
+	<padding>0</padding>
+	<expand>False</expand>
+	<fill>True</fill>
+      </child>
+
+      <widget>
+	<class>GtkTable</class>
+	<name>table1</name>
+	<border_width>4</border_width>
+	<rows>4</rows>
+	<columns>2</columns>
+	<homogeneous>False</homogeneous>
+	<row_spacing>2</row_spacing>
+	<column_spacing>4</column_spacing>
+
+	<widget>
+	  <class>GtkLabel</class>
+	  <name>label16</name>
+	  <label>Filename:</label>
+	  <justify>GTK_JUSTIFY_CENTER</justify>
+	  <wrap>False</wrap>
+	  <xalign>0.5</xalign>
+	  <yalign>0.5</yalign>
+	  <xpad>0</xpad>
+	  <ypad>0</ypad>
+	  <child>
+	    <left_attach>0</left_attach>
+	    <right_attach>1</right_attach>
+	    <top_attach>0</top_attach>
+	    <bottom_attach>1</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>False</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>False</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkLabel</class>
+	  <name>label17</name>
+	  <label>Songname:</label>
+	  <justify>GTK_JUSTIFY_CENTER</justify>
+	  <wrap>False</wrap>
+	  <xalign>0.5</xalign>
+	  <yalign>0.5</yalign>
+	  <xpad>0</xpad>
+	  <ypad>0</ypad>
+	  <child>
+	    <left_attach>0</left_attach>
+	    <right_attach>1</right_attach>
+	    <top_attach>1</top_attach>
+	    <bottom_attach>2</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>False</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>False</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkLabel</class>
+	  <name>label18</name>
+	  <label>Composer:</label>
+	  <justify>GTK_JUSTIFY_CENTER</justify>
+	  <wrap>False</wrap>
+	  <xalign>0.5</xalign>
+	  <yalign>0.5</yalign>
+	  <xpad>0</xpad>
+	  <ypad>0</ypad>
+	  <child>
+	    <left_attach>0</left_attach>
+	    <right_attach>1</right_attach>
+	    <top_attach>2</top_attach>
+	    <bottom_attach>3</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>False</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>False</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkLabel</class>
+	  <name>label19</name>
+	  <label>Copyright:</label>
+	  <justify>GTK_JUSTIFY_CENTER</justify>
+	  <wrap>False</wrap>
+	  <xalign>0.5</xalign>
+	  <yalign>0.5</yalign>
+	  <xpad>0</xpad>
+	  <ypad>0</ypad>
+	  <child>
+	    <left_attach>0</left_attach>
+	    <right_attach>1</right_attach>
+	    <top_attach>3</top_attach>
+	    <bottom_attach>4</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>False</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>False</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkEntry</class>
+	  <name>fileinfo_filename</name>
+	  <can_focus>True</can_focus>
+	  <editable>False</editable>
+	  <text_visible>True</text_visible>
+	  <text_max_length>0</text_max_length>
+	  <text></text>
+	  <child>
+	    <left_attach>1</left_attach>
+	    <right_attach>2</right_attach>
+	    <top_attach>0</top_attach>
+	    <bottom_attach>1</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>True</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>True</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkEntry</class>
+	  <name>fileinfo_songname</name>
+	  <can_focus>True</can_focus>
+	  <editable>False</editable>
+	  <text_visible>True</text_visible>
+	  <text_max_length>0</text_max_length>
+	  <text></text>
+	  <child>
+	    <left_attach>1</left_attach>
+	    <right_attach>2</right_attach>
+	    <top_attach>1</top_attach>
+	    <bottom_attach>2</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>True</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>True</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkEntry</class>
+	  <name>fileinfo_composer</name>
+	  <can_focus>True</can_focus>
+	  <editable>False</editable>
+	  <text_visible>True</text_visible>
+	  <text_max_length>0</text_max_length>
+	  <text></text>
+	  <child>
+	    <left_attach>1</left_attach>
+	    <right_attach>2</right_attach>
+	    <top_attach>2</top_attach>
+	    <bottom_attach>3</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>True</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>True</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+
+	<widget>
+	  <class>GtkEntry</class>
+	  <name>fileinfo_copyright</name>
+	  <can_focus>True</can_focus>
+	  <editable>False</editable>
+	  <text_visible>True</text_visible>
+	  <text_max_length>0</text_max_length>
+	  <text></text>
+	  <child>
+	    <left_attach>1</left_attach>
+	    <right_attach>2</right_attach>
+	    <top_attach>3</top_attach>
+	    <bottom_attach>4</bottom_attach>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <xexpand>True</xexpand>
+	    <yexpand>False</yexpand>
+	    <xshrink>False</xshrink>
+	    <yshrink>False</yshrink>
+	    <xfill>True</xfill>
+	    <yfill>False</yfill>
+	  </child>
+	</widget>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkFrame</class>
+      <name>frame15</name>
+      <border_width>4</border_width>
+      <label>Tune Information:</label>
+      <label_xalign>0</label_xalign>
+      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+      <child>
+	<padding>0</padding>
+	<expand>True</expand>
+	<fill>True</fill>
+      </child>
+
+      <widget>
+	<class>GtkVBox</class>
+	<name>vbox15</name>
+	<homogeneous>False</homogeneous>
+	<spacing>0</spacing>
+
+	<widget>
+	  <class>GtkHBox</class>
+	  <name>hbox7</name>
+	  <border_width>2</border_width>
+	  <homogeneous>False</homogeneous>
+	  <spacing>0</spacing>
+	  <child>
+	    <padding>0</padding>
+	    <expand>False</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkLabel</class>
+	    <name>label20</name>
+	    <label>Sub-tune:</label>
+	    <justify>GTK_JUSTIFY_CENTER</justify>
+	    <wrap>False</wrap>
+	    <xalign>0.5</xalign>
+	    <yalign>0.5</yalign>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <child>
+	      <padding>0</padding>
+	      <expand>False</expand>
+	      <fill>False</fill>
+	    </child>
+	  </widget>
+
+	  <widget>
+	    <class>GtkOptionMenu</class>
+	    <name>fileinfo_sub_tune</name>
+	    <can_focus>True</can_focus>
+	    <signal>
+	      <name>clicked</name>
+	      <handler>on_fileinfo_sub_tune_clicked</handler>
+	      <last_modification_time>Mon, 06 Nov 2000 23:36:32 GMT</last_modification_time>
+	    </signal>
+	    <items>Main tune
+Tune #1
+Tune #2
+Tune #3
+Tune #4
+</items>
+	    <initial_choice>0</initial_choice>
+	    <child>
+	      <padding>2</padding>
+	      <expand>False</expand>
+	      <fill>False</fill>
+	    </child>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkTable</class>
+	  <name>table2</name>
+	  <border_width>4</border_width>
+	  <rows>2</rows>
+	  <columns>2</columns>
+	  <homogeneous>False</homogeneous>
+	  <row_spacing>0</row_spacing>
+	  <column_spacing>0</column_spacing>
+	  <child>
+	    <padding>0</padding>
+	    <expand>False</expand>
+	    <fill>False</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkLabel</class>
+	    <name>label21</name>
+	    <label>Title:</label>
+	    <justify>GTK_JUSTIFY_CENTER</justify>
+	    <wrap>False</wrap>
+	    <xalign>0.5</xalign>
+	    <yalign>0.5</yalign>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <child>
+	      <left_attach>0</left_attach>
+	      <right_attach>1</right_attach>
+	      <top_attach>0</top_attach>
+	      <bottom_attach>1</bottom_attach>
+	      <xpad>0</xpad>
+	      <ypad>0</ypad>
+	      <xexpand>False</xexpand>
+	      <yexpand>False</yexpand>
+	      <xshrink>False</xshrink>
+	      <yshrink>False</yshrink>
+	      <xfill>False</xfill>
+	      <yfill>False</yfill>
+	    </child>
+	  </widget>
+
+	  <widget>
+	    <class>GtkLabel</class>
+	    <name>label22</name>
+	    <label>Artist:</label>
+	    <justify>GTK_JUSTIFY_CENTER</justify>
+	    <wrap>False</wrap>
+	    <xalign>0.5</xalign>
+	    <yalign>0.5</yalign>
+	    <xpad>0</xpad>
+	    <ypad>0</ypad>
+	    <child>
+	      <left_attach>0</left_attach>
+	      <right_attach>1</right_attach>
+	      <top_attach>1</top_attach>
+	      <bottom_attach>2</bottom_attach>
+	      <xpad>0</xpad>
+	      <ypad>0</ypad>
+	      <xexpand>False</xexpand>
+	      <yexpand>False</yexpand>
+	      <xshrink>False</xshrink>
+	      <yshrink>False</yshrink>
+	      <xfill>False</xfill>
+	      <yfill>False</yfill>
+	    </child>
+	  </widget>
+
+	  <widget>
+	    <class>GtkEntry</class>
+	    <name>fileinfo_sub_artist</name>
+	    <can_focus>True</can_focus>
+	    <editable>False</editable>
+	    <text_visible>True</text_visible>
+	    <text_max_length>0</text_max_length>
+	    <text></text>
+	    <child>
+	      <left_attach>1</left_attach>
+	      <right_attach>2</right_attach>
+	      <top_attach>1</top_attach>
+	      <bottom_attach>2</bottom_attach>
+	      <xpad>0</xpad>
+	      <ypad>0</ypad>
+	      <xexpand>True</xexpand>
+	      <yexpand>False</yexpand>
+	      <xshrink>False</xshrink>
+	      <yshrink>False</yshrink>
+	      <xfill>True</xfill>
+	      <yfill>False</yfill>
+	    </child>
+	  </widget>
+
+	  <widget>
+	    <class>GtkEntry</class>
+	    <name>fileinfo_sub_title</name>
+	    <can_focus>True</can_focus>
+	    <editable>False</editable>
+	    <text_visible>True</text_visible>
+	    <text_max_length>0</text_max_length>
+	    <text></text>
+	    <child>
+	      <left_attach>1</left_attach>
+	      <right_attach>2</right_attach>
+	      <top_attach>0</top_attach>
+	      <bottom_attach>1</bottom_attach>
+	      <xpad>0</xpad>
+	      <ypad>0</ypad>
+	      <xexpand>True</xexpand>
+	      <yexpand>False</yexpand>
+	      <xshrink>False</xshrink>
+	      <yshrink>False</yshrink>
+	      <xfill>True</xfill>
+	      <yfill>False</yfill>
+	    </child>
+	  </widget>
+	</widget>
+
+	<widget>
+	  <class>GtkScrolledWindow</class>
+	  <name>scrolledwindow2</name>
+	  <border_width>4</border_width>
+	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+	  <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+	  <child>
+	    <padding>0</padding>
+	    <expand>True</expand>
+	    <fill>True</fill>
+	  </child>
+
+	  <widget>
+	    <class>GtkText</class>
+	    <name>fileinfo_sub_comment</name>
+	    <can_focus>True</can_focus>
+	    <editable>False</editable>
+	    <text>zoom</text>
+	  </widget>
+	</widget>
+      </widget>
+    </widget>
+
+    <widget>
+      <class>GtkAlignment</class>
+      <name>alignment5</name>
+      <xalign>0.5</xalign>
+      <yalign>0.5</yalign>
+      <xscale>0.1</xscale>
+      <yscale>1</yscale>
+      <child>
+	<padding>0</padding>
+	<expand>False</expand>
+	<fill>False</fill>
+      </child>
+
+      <widget>
+	<class>GtkButton</class>
+	<name>fileinfo_ok</name>
+	<can_default>True</can_default>
+	<has_default>True</has_default>
+	<can_focus>True</can_focus>
+	<signal>
+	  <name>clicked</name>
+	  <handler>on_fileinfo_ok_clicked</handler>
+	  <last_modification_time>Mon, 06 Nov 2000 23:04:15 GMT</last_modification_time>
+	</signal>
+	<label>Close</label>
+	<relief>GTK_RELIEF_NORMAL</relief>
+      </widget>
+    </widget>
+  </widget>
+</widget>
+
+<widget>
+  <class>GtkFileSelection</class>
+  <name>fileselection1</name>
+  <border_width>10</border_width>
+  <title>Select STIL DataBase File</title>
+  <type>GTK_WINDOW_TOPLEVEL</type>
+  <position>GTK_WIN_POS_NONE</position>
+  <modal>False</modal>
+  <allow_shrink>False</allow_shrink>
+  <allow_grow>True</allow_grow>
+  <auto_shrink>False</auto_shrink>
+  <show_file_op_buttons>True</show_file_op_buttons>
+
+  <widget>
+    <class>GtkButton</class>
+    <child_name>FileSel:ok_button</child_name>
+    <name>ok_button1</name>
+    <can_default>True</can_default>
+    <can_focus>True</can_focus>
+    <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+    <relief>GTK_RELIEF_NORMAL</relief>
+  </widget>
+
+  <widget>
+    <class>GtkButton</class>
+    <child_name>FileSel:cancel_button</child_name>
+    <name>cancel_button1</name>
+    <can_default>True</can_default>
+    <can_focus>True</can_focus>
+    <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+    <relief>GTK_RELIEF_NORMAL</relief>
+  </widget>
+</widget>
+
+</GTK-Interface>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmms-songpos.patch-1.2.2	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,349 @@
+diff -r -u xmms-1.2.2/General/ir/ir.c xmms-1.2.2-songpos/General/ir/ir.c
+--- xmms-1.2.2/General/ir/ir.c	Wed Mar  1 15:13:49 2000
++++ xmms-1.2.2-songpos/General/ir/ir.c	Sat Nov 11 18:23:55 2000
+@@ -288,12 +288,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekf) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(ir_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(ir_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(ir_gp.xmms_session, + 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+@@ -301,10 +296,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekb) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(ir_gp.xmms_session, - 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+diff -r -u xmms-1.2.2/General/joystick/joy.c xmms-1.2.2-songpos/General/joystick/joy.c
+--- xmms-1.2.2/General/joystick/joy.c	Wed Mar  1 15:13:49 2000
++++ xmms-1.2.2-songpos/General/joystick/joy.c	Sat Nov 11 18:23:55 2000
+@@ -316,18 +316,10 @@
+ 					xmms_remote_set_volume(joy_gp.xmms_session, vl - 5, vr - 5);
+ 					break;
+ 				case JC_FWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(joy_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(joy_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(joy_gp.xmms_session, + 5000);
+ 					break;
+ 				case JC_RWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(joy_gp.xmms_session, - 5000);
+ 					break;
+ 				case JC_SHUFFLE:
+ 					xmms_remote_toggle_shuffle(joy_gp.xmms_session);
+diff -r -u xmms-1.2.2/Input/mikmod/plugin.c xmms-1.2.2-songpos/Input/mikmod/plugin.c
+--- xmms-1.2.2/Input/mikmod/plugin.c	Sun Feb  6 14:52:58 2000
++++ xmms-1.2.2-songpos/Input/mikmod/plugin.c	Sat Nov 11 18:23:55 2000
+@@ -189,15 +189,8 @@
+ 
+ static void seek(int time)
+ {
+-	/*
+-	   We need to seek in pattrens somehow
+-	   can't seek by time only by X pattrens on way or the other
+-
+-	   Player_NextPosition ();
+-	   Player_PrevPosition ();
+-
+-	 */
+-	return;
++	Player_SetPosition(time);
++	mikmod_ip.output->flush(get_time());
+ }
+ 
+ static void mod_pause(short p)
+@@ -213,6 +206,7 @@
+ 		return -1;
+ 	if(!Player_Active() && !mikmod_ip.output->buffer_playing())
+ 		return -1;
++	set_song_position(mf->sngpos, 0, (mf->numpos - 1));
+ 	return mikmod_ip.output->output_time();
+ }
+ 
+diff -r -u xmms-1.2.2/libxmms/xmmsctrl.c xmms-1.2.2-songpos/libxmms/xmmsctrl.c
+--- xmms-1.2.2/libxmms/xmmsctrl.c	Wed Jun 21 15:29:29 2000
++++ xmms-1.2.2-songpos/libxmms/xmmsctrl.c	Sat Nov 11 18:23:55 2000
+@@ -365,6 +365,11 @@
+ 	remote_send_guint32(session, CMD_JUMP_TO_TIME, pos);
+ }
+ 
++void xmms_remote_seek(gint session, gint off)
++{
++	remote_send_guint32(session, CMD_SEEK, off);
++}
++
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr)
+ {
+ 	ServerPktHeader pkt_hdr;
+diff -r -u xmms-1.2.2/libxmms/xmmsctrl.h xmms-1.2.2-songpos/libxmms/xmmsctrl.h
+--- xmms-1.2.2/libxmms/xmmsctrl.h	Mon Jun 19 15:25:09 2000
++++ xmms-1.2.2-songpos/libxmms/xmmsctrl.h	Sat Nov 11 18:23:55 2000
+@@ -40,6 +40,7 @@
+ void xmms_remote_playlist_clear(gint session);
+ gint xmms_remote_get_output_time(gint session);
+ void xmms_remote_jump_to_time(gint session, gint pos);
++void xmms_remote_seek(gint session, gint off);
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr);
+ gint xmms_remote_get_main_volume(gint session);
+ gint xmms_remote_get_balance(gint session);
+diff -r -u xmms-1.2.2/xmms/controlsocket.c xmms-1.2.2-songpos/xmms/controlsocket.c
+--- xmms-1.2.2/xmms/controlsocket.c	Sat Jul  8 17:35:12 2000
++++ xmms-1.2.2-songpos/xmms/controlsocket.c	Sat Nov 11 18:27:16 2000
+@@ -445,6 +445,10 @@
+ 			if (num <= playlist_get_current_length())
+ 				input_seek(num / 1000);
+ 			break;
++		case CMD_SEEK:
++			num = *((guint32 *) data);
++			song_seek(num);
++			break;
+ 		case CMD_SET_VOLUME:
+ 			v[0] = ((guint32 *) data)[0];
+ 			v[1] = ((guint32 *) data)[1];
+diff -r -u xmms-1.2.2/xmms/controlsocket.h xmms-1.2.2-songpos/xmms/controlsocket.h
+--- xmms-1.2.2/xmms/controlsocket.h	Mon Jun 19 15:25:14 2000
++++ xmms-1.2.2-songpos/xmms/controlsocket.h	Sat Nov 11 18:23:55 2000
+@@ -31,7 +31,7 @@
+ 	CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP,
+ 	CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS,
+ 	CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR,
+-	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME,
++	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_SEEK, CMD_GET_VOLUME,
+ 	CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE,
+ 	CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO,
+ 	CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,
+diff -r -u xmms-1.2.2/xmms/input.c xmms-1.2.2-songpos/xmms/input.c
+--- xmms-1.2.2/xmms/input.c	Wed Feb 16 23:05:57 2000
++++ xmms-1.2.2-songpos/xmms/input.c	Sat Nov 11 18:28:47 2000
+@@ -281,6 +281,7 @@
+ 		}
+ 	}
+ 	ip_data->playing = FALSE;
++	set_song_position(0, 0, 0);
+ }
+ 
+ void input_pause(void)
+diff -r -u xmms-1.2.2/xmms/main.c xmms-1.2.2-songpos/xmms/main.c
+--- xmms-1.2.2/xmms/main.c	Tue Jul 11 19:11:14 2000
++++ xmms-1.2.2-songpos/xmms/main.c	Sat Nov 11 18:32:36 2000
+@@ -614,6 +614,55 @@
+ 	g_free(filename);
+ }
+ 
++/*\
++|*| Separate song position stuff, for songs without a time length,
++|*|  but that want to be able to seek anyway.
++|*|      
++|*|      Have the input plugin's get_time() function call
++|*|      set_song_position(int pos, int first, int last)
++|*|      to set the slider.  If the slider is dragged,
++|*|      the plugin's seek() is called with the position.
++|*|      (If last <= first the feature is turned off)
++\*/
++
++static int song_pos_cur, song_pos_first, song_pos_num = 0;
++
++void set_song_position(int pos, int first, int last)
++{
++	last -= first;
++	song_pos_cur = pos;
++	song_pos_first = first;
++	song_pos_num = last;
++	if (last <= 0) return;
++	pos -= first;
++	if (pos > last) pos = last;
++	if (cfg.player_shaded)
++		show_widget(mainwin_sposition);
++	show_widget(mainwin_position);
++	hslider_set_position(mainwin_position, (pos * 219) / last);
++	hslider_set_position(mainwin_sposition, ((pos * 12) / last) + 1);
++}
++
++void song_seek(gint off)
++{
++	if (!get_input_playing()) return;
++	if (song_pos_num > 0) {
++		gint newpos;
++		if (off < 0) newpos = song_pos_cur - 1;
++		else if (off > 0) newpos = song_pos_cur + 1;
++		if (newpos < song_pos_first) newpos = song_pos_first;
++		if (newpos > song_pos_first + song_pos_num)
++			newpos = song_pos_first + song_pos_num;
++		input_seek(newpos);
++	} else {
++		gint newpos = (input_get_time() / 1000) + (off / 1000);
++		gint pcl = playlist_get_current_length() / 1000;
++		if (newpos >= pcl) newpos = pcl - 1;
++		if (newpos < 0) newpos = 0;
++		input_seek(newpos);
++	}
++}
++
+ void mainwin_set_always_on_top(gboolean always)
+ {
+ 	cfg.always_on_top = always;
+@@ -680,7 +729,9 @@
+ 		show_widget(mainwin_stime_min);
+ 		show_widget(mainwin_stime_sec);
+ 
+-		if (get_input_playing() && playlist_get_current_length() != -1)
++		if (get_input_playing() &&
++			((playlist_get_current_length() != -1) ||
++				 (song_pos_num > 0)))
+ 			show_widget(mainwin_sposition);
+ 
+ 		mainwin_shade->pb_ny = mainwin_shade->pb_py = 27;
+@@ -987,7 +1038,7 @@
+ 	show_widget(mainwin_10sec_num);
+ 	show_widget(mainwin_sec_num);
+ 	playstatus_set_status(mainwin_playstatus, STATUS_PLAY);
+-	if (playlist_get_current_length() != -1)
++	if ((playlist_get_current_length() != -1) || (song_pos_num > 0))
+ 	{
+ 		if (cfg.player_shaded)
+ 			show_widget(mainwin_sposition);
+@@ -1217,13 +1268,19 @@
+ 		break;
+ 	case GDK_Left:
+ 	case GDK_KP_Left:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() - 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(-5000);
+ 		break;
+ 	case GDK_Right:
+ 	case GDK_KP_Right:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() + 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(+5000);
+ 		break;
+ 	default:
+ 	     break;
+@@ -1805,6 +1862,16 @@
+ 
+ 	pos--;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 6) / 12) + song_pos_first;
++		tmp = g_strdup_printf("%d", time);
++		textbox_set_text(mainwin_stime_min, tmp);
++		g_free(tmp);
++		tmp = g_strdup_printf("%d", song_pos_first + song_pos_num);
++		textbox_set_text(mainwin_stime_sec, tmp);
++		g_free(tmp);
++		return;
++	}
+ 	time = ((playlist_get_current_length() / 1000) * pos) / 12;
+ 	if (cfg.timer_mode == TIMER_REMAINING)
+ 	{
+@@ -1826,6 +1893,10 @@
+ 
+ void mainwin_spos_release_cb(gint pos)
+ {
++	if (song_pos_num > 0) {
++		input_seek(((song_pos_num * (pos - 1) + 6) / 12) + song_pos_first);
++		return;
++	}
+ 	input_seek(((playlist_get_current_length() / 1000) * (pos - 1)) / 12);
+ }
+ 
+@@ -1834,6 +1905,14 @@
+ 	gint length, time;
+ 	gchar *buf;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		buf = g_strdup_printf("JUMP TO: %d/%d", time,
++				song_pos_num + song_pos_first);
++		mainwin_lock_info_text(buf);
++		g_free(buf);
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	buf = g_strdup_printf(_("SEEK TO: %d:%-2.2d/%d:%-2.2d (%d%%)"), time / 60, time % 60, length / 60, length % 60, (length != 0) ? (time * 100) / length : 0);
+@@ -1845,6 +1924,12 @@
+ {
+ 	int length, time;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		input_seek(time);
++		mainwin_release_info_text();
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	input_seek(time);
+@@ -2236,12 +2321,18 @@
+ 		case MAINWIN_GENERAL_STOPFADE:
+ 			break;
+ 		case MAINWIN_GENERAL_BACK5SEC:
++/*
+ 			if (get_input_playing() && playlist_get_current_length() != -1)
+ 				input_seek((((input_get_time() / 1000) - 5 >= 0) ? (input_get_time() / 1000) - 5 : 0));
++*/
++			song_seek(-5000);
+ 			break;
+ 		case MAINWIN_GENERAL_FWD5SEC:
++/*
+ 			if (get_input_playing() && playlist_get_current_length() != -1)
+ 				input_seek(((((input_get_time() / 1000) + 5) < (playlist_get_current_length() / 1000)) ? ((input_get_time() / 1000) + 5) : ((playlist_get_current_length() / 1000) - 1)));
++*/
++			song_seek(+5000);
+ 			break;
+ 		case MAINWIN_GENERAL_START:
+ 			playlist_set_position(0);
+@@ -2801,7 +2892,7 @@
+ 					hslider_set_position(mainwin_sposition, ((time * 12) / length) + 1);
+ 				}
+ 			}
+-			else
++			else if (song_pos_num <= 0)
+ 			{
+ 				hslider_set_position(mainwin_position, 0);
+ 				hslider_set_position(mainwin_sposition, 1);
+diff -r -u xmms-1.2.2/xmms/main.h xmms-1.2.2-songpos/xmms/main.h
+--- xmms-1.2.2/xmms/main.h	Fri Jul  7 19:18:26 2000
++++ xmms-1.2.2-songpos/xmms/main.h	Sat Nov 11 18:23:55 2000
+@@ -82,6 +82,7 @@
+ void mainwin_play_pushed(void);
+ void mainwin_stop_pushed(void);
+ void mainwin_eject_pushed(void);
++void song_seek(gint off);
+ 
+ void mainwin_set_back_pixmap(void);
+ 
+diff -r -u xmms-1.2.2/xmms/plugin.h xmms-1.2.2-songpos/xmms/plugin.h
+--- xmms-1.2.2/xmms/plugin.h	Wed Mar  1 22:28:06 2000
++++ xmms-1.2.2-songpos/xmms/plugin.h	Sat Nov 11 18:23:55 2000
+@@ -151,4 +151,6 @@
+ 	void (*render_freq)(gint16 freq_data[2][256]); /* Render the freq data, don't do anything time consuming in here */
+ } VisPlugin;
+ 
++void set_song_position(int pos, int first, int last);
++
+ #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmms-songpos.patch-1.2.5	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,403 @@
+diff -r -u xmms-1.2.5/General/ir/ir.c xmms-1.2.5-patched/General/ir/ir.c
+--- xmms-1.2.5/General/ir/ir.c	Mon Mar  5 16:15:13 2001
++++ xmms-1.2.5-patched/General/ir/ir.c	Tue Jul 17 18:44:05 2001
+@@ -292,12 +292,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekf) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(ir_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(ir_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(ir_gp.xmms_session, + 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+@@ -305,10 +300,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekb) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(ir_gp.xmms_session, - 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+diff -r -u xmms-1.2.5/General/joystick/joy.c xmms-1.2.5-patched/General/joystick/joy.c
+--- xmms-1.2.5/General/joystick/joy.c	Mon Feb  5 16:27:10 2001
++++ xmms-1.2.5-patched/General/joystick/joy.c	Tue Jul 17 18:44:05 2001
+@@ -343,18 +343,10 @@
+ 					xmms_remote_set_volume(joy_gp.xmms_session, vl - 5, vr - 5);
+ 					break;
+ 				case JC_FWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(joy_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(joy_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(joy_gp.xmms_session, + 5000);
+ 					break;
+ 				case JC_RWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(joy_gp.xmms_session, - 5000);
+ 					break;
+ 				case JC_SHUFFLE:
+ 					xmms_remote_toggle_shuffle(joy_gp.xmms_session);
+diff -r -u xmms-1.2.5/Input/mikmod/plugin.c xmms-1.2.5-patched/Input/mikmod/plugin.c
+--- xmms-1.2.5/Input/mikmod/plugin.c	Tue Aug  1 00:33:04 2000
++++ xmms-1.2.5-patched/Input/mikmod/plugin.c	Tue Jul 17 18:44:05 2001
+@@ -149,15 +149,8 @@
+ 
+ static void seek(int time)
+ {
+-	/*
+-	   We need to seek in pattrens somehow
+-	   can't seek by time only by X pattrens on way or the other
+-
+-	   Player_NextPosition ();
+-	   Player_PrevPosition ();
+-
+-	 */
+-	return;
++	Player_SetPosition(time);
++	mikmod_ip.output->flush(get_time());
+ }
+ 
+ static void mod_pause(short p)
+@@ -173,6 +166,7 @@
+ 		return -1;
+ 	if(!Player_Active() && !mikmod_ip.output->buffer_playing())
+ 		return -1;
++	set_song_position(mf->sngpos, 0, (mf->numpos - 1));
+ 	return mikmod_ip.output->output_time();
+ }
+ 
+diff -r -u xmms-1.2.5/Input/mpg123/common.c xmms-1.2.5-patched/Input/mpg123/common.c
+--- xmms-1.2.5/Input/mpg123/common.c	Fri Jun  1 16:07:48 2001
++++ xmms-1.2.5-patched/Input/mpg123/common.c	Tue Jul 17 18:44:05 2001
+@@ -56,6 +56,13 @@
+ static FILE *filept;
+ static int filept_opened;
+ 
++int streaming_http(void)
++{
++	if (!filept_opened) return FALSE;
++	if (filept) return FALSE;
++	return TRUE;
++}
++
+ static int get_fileinfo(void);
+ 
+ static int fullread(FILE * fd, unsigned char *buf, int count)
+diff -r -u xmms-1.2.5/Input/mpg123/http.c xmms-1.2.5-patched/Input/mpg123/http.c
+--- xmms-1.2.5/Input/mpg123/http.c	Fri Jun  1 16:07:48 2001
++++ xmms-1.2.5-patched/Input/mpg123/http.c	Tue Jul 17 18:44:05 2001
+@@ -193,6 +193,11 @@
+ 	return (buffer_length - (wr_index - rd_index)) - 1;
+ }
+ 
++void show_http_buffer_fullness(void)
++{
++	set_song_position(http_used(), 0, buffer_length);
++}
++
+ static void http_wait_for_data(gint bytes)
+ {
+ 	while ((prebuffering || http_used() < bytes) && !eof && going && mpg123_info->going)
+diff -r -u xmms-1.2.5/Input/mpg123/mpg123.c xmms-1.2.5-patched/Input/mpg123/mpg123.c
+--- xmms-1.2.5/Input/mpg123/mpg123.c	Thu May 10 22:43:37 2001
++++ xmms-1.2.5-patched/Input/mpg123/mpg123.c	Tue Jul 17 18:44:05 2001
+@@ -1029,8 +1029,13 @@
+ 	}
+ }
+ 
++int streaming_http(void);
++void show_http_buffer_fullness(void);
++
+ static void seek(int time)
+ {
++	if (streaming_http())
++			return;
+ 	mpg123_info->jump_to_time = time;
+ 
+ 	while (mpg123_info->jump_to_time != -1)
+@@ -1050,6 +1055,8 @@
+ 		return -1;
+ 	if (!mpg123_info->going || (mpg123_info->eof && !mpg123_ip.output->buffer_playing()))
+ 		return -1;
++	if (streaming_http())
++		show_http_buffer_fullness();
+ 	return mpg123_ip.output->output_time();
+ }
+ 
+diff -r -u xmms-1.2.5/libxmms/xmmsctrl.c xmms-1.2.5-patched/libxmms/xmmsctrl.c
+--- xmms-1.2.5/libxmms/xmmsctrl.c	Fri Jun  1 16:07:49 2001
++++ xmms-1.2.5-patched/libxmms/xmmsctrl.c	Tue Jul 17 18:44:05 2001
+@@ -370,6 +370,11 @@
+ 	remote_send_guint32(session, CMD_JUMP_TO_TIME, pos);
+ }
+ 
++void xmms_remote_seek(gint session, gint off)
++{
++	remote_send_guint32(session, CMD_SEEK, off);
++}
++
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr)
+ {
+ 	ServerPktHeader pkt_hdr;
+diff -r -u xmms-1.2.5/libxmms/xmmsctrl.h xmms-1.2.5-patched/libxmms/xmmsctrl.h
+--- xmms-1.2.5/libxmms/xmmsctrl.h	Fri Jun 16 18:00:28 2000
++++ xmms-1.2.5-patched/libxmms/xmmsctrl.h	Tue Jul 17 18:44:05 2001
+@@ -40,6 +40,7 @@
+ void xmms_remote_playlist_clear(gint session);
+ gint xmms_remote_get_output_time(gint session);
+ void xmms_remote_jump_to_time(gint session, gint pos);
++void xmms_remote_seek(gint session, gint off);
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr);
+ gint xmms_remote_get_main_volume(gint session);
+ gint xmms_remote_get_balance(gint session);
+diff -r -u xmms-1.2.5/xmms/controlsocket.c xmms-1.2.5-patched/xmms/controlsocket.c
+--- xmms-1.2.5/xmms/controlsocket.c	Sun Jun 17 02:05:47 2001
++++ xmms-1.2.5-patched/xmms/controlsocket.c	Tue Jul 17 18:44:05 2001
+@@ -434,6 +434,10 @@
+ 			    num < playlist_get_current_length())
+ 				input_seek(num / 1000);
+ 			break;
++		case CMD_SEEK:
++			num = *((guint32 *) data);
++			song_seek(num);
++			break;
+ 		case CMD_SET_VOLUME:
+ 			v[0] = ((guint32 *) data)[0];
+ 			v[1] = ((guint32 *) data)[1];
+diff -r -u xmms-1.2.5/xmms/controlsocket.h xmms-1.2.5-patched/xmms/controlsocket.h
+--- xmms-1.2.5/xmms/controlsocket.h	Fri Jun 16 18:00:28 2000
++++ xmms-1.2.5-patched/xmms/controlsocket.h	Tue Jul 17 18:44:05 2001
+@@ -31,7 +31,7 @@
+ 	CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP,
+ 	CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS,
+ 	CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR,
+-	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME,
++	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_SEEK, CMD_GET_VOLUME,
+ 	CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE,
+ 	CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO,
+ 	CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,
+diff -r -u xmms-1.2.5/xmms/input.c xmms-1.2.5-patched/xmms/input.c
+--- xmms-1.2.5/xmms/input.c	Thu Jun 14 15:30:33 2001
++++ xmms-1.2.5-patched/xmms/input.c	Tue Jul 17 18:44:05 2001
+@@ -294,6 +294,7 @@
+ 		}
+ 	}
+ 	ip_data->playing = FALSE;
++	set_song_position(0, 0, 0);
+ }
+ 
+ void input_pause(void)
+diff -r -u xmms-1.2.5/xmms/main.c xmms-1.2.5-patched/xmms/main.c
+--- xmms-1.2.5/xmms/main.c	Sun Jun 17 02:05:47 2001
++++ xmms-1.2.5-patched/xmms/main.c	Tue Jul 17 18:49:39 2001
+@@ -669,6 +669,55 @@
+ 	g_free(filename);
+ }
+ 
++/*\
++|*| Separate song position stuff, for songs without a time length,
++|*|  but that want to be able to seek anyway.
++|*|      
++|*|      Have the input plugin's get_time() function call
++|*|      set_song_position(int pos, int first, int last)
++|*|      to set the slider.  If the slider is dragged,
++|*|      the plugin's seek() is called with the position.
++|*|      (If last <= first the feature is turned off)
++\*/
++
++static int song_pos_cur, song_pos_first, song_pos_num = 0;
++
++void set_song_position(int pos, int first, int last)
++{
++	last -= first;
++	song_pos_cur = pos;
++	song_pos_first = first;
++	song_pos_num = last;
++	if (last <= 0) return;
++	pos -= first;
++	if (pos > last) pos = last;
++	if (cfg.player_shaded)
++		show_widget(mainwin_sposition);
++	show_widget(mainwin_position);
++	hslider_set_position(mainwin_position, (pos * 219) / last);
++	hslider_set_position(mainwin_sposition, ((pos * 12) / last) + 1);
++}
++
++void song_seek(gint off)
++{
++	if (!get_input_playing()) return;
++	if (song_pos_num > 0) {
++		gint newpos = 0;
++		if (off < 0) newpos = song_pos_cur - 1;
++		else if (off > 0) newpos = song_pos_cur + 1;
++		if (newpos < song_pos_first) newpos = song_pos_first;
++		if (newpos > song_pos_first + song_pos_num)
++			newpos = song_pos_first + song_pos_num;
++		input_seek(newpos);
++	} else {
++		gint newpos = (input_get_time() / 1000) + (off / 1000);
++		gint pcl = playlist_get_current_length() / 1000;
++		if (newpos >= pcl) newpos = pcl - 1;
++		if (newpos < 0) newpos = 0;
++		input_seek(newpos);
++	}
++}
++
+ gchar *xmms_get_gentitle_format(void)
+ {
+ 	return cfg.gentitle_format;
+@@ -748,7 +797,9 @@
+ 		show_widget(mainwin_stime_min);
+ 		show_widget(mainwin_stime_sec);
+ 
+-		if (get_input_playing() && playlist_get_current_length() != -1)
++		if (get_input_playing() &&
++			((playlist_get_current_length() != -1) ||
++				 (song_pos_num > 0)))
+ 			show_widget(mainwin_sposition);
+ 
+ 		mainwin_shade->pb_ny = mainwin_shade->pb_py = 27;
+@@ -1065,7 +1116,7 @@
+ 	show_widget(mainwin_10sec_num);
+ 	show_widget(mainwin_sec_num);
+ 	playstatus_set_status(mainwin_playstatus, STATUS_PLAY);
+-	if (playlist_get_current_length() != -1)
++	if ((playlist_get_current_length() != -1) || (song_pos_num > 0))
+ 	{
+ 		if (cfg.player_shaded)
+ 			show_widget(mainwin_sposition);
+@@ -1308,13 +1359,19 @@
+ 		break;
+ 	case GDK_Left:
+ 	case GDK_KP_Left:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() - 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(-5000);
+ 		break;
+ 	case GDK_Right:
+ 	case GDK_KP_Right:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() + 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(+5000);
+ 		break;
+ 	default:
+ 	     break;
+@@ -1939,6 +1996,16 @@
+ 
+ 	pos--;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 6) / 12) + song_pos_first;
++		tmp = g_strdup_printf("%d", time);
++		textbox_set_text(mainwin_stime_min, tmp);
++		g_free(tmp);
++		tmp = g_strdup_printf("%d", song_pos_first + song_pos_num);
++		textbox_set_text(mainwin_stime_sec, tmp);
++		g_free(tmp);
++		return;
++	}
+ 	time = ((playlist_get_current_length() / 1000) * pos) / 12;
+ 	if (cfg.timer_mode == TIMER_REMAINING)
+ 	{
+@@ -1960,6 +2027,10 @@
+ 
+ void mainwin_spos_release_cb(gint pos)
+ {
++	if (song_pos_num > 0) {
++		input_seek(((song_pos_num * (pos - 1) + 6) / 12) + song_pos_first);
++		return;
++	}
+ 	input_seek(((playlist_get_current_length() / 1000) * (pos - 1)) / 12);
+ }
+ 
+@@ -1968,6 +2039,14 @@
+ 	gint length, time;
+ 	gchar *buf;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		buf = g_strdup_printf("JUMP TO: %d/%d", time,
++				song_pos_num + song_pos_first);
++		mainwin_lock_info_text(buf);
++		g_free(buf);
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	buf = g_strdup_printf(_("SEEK TO: %d:%-2.2d/%d:%-2.2d (%d%%)"), time / 60, time % 60, length / 60, length % 60, (length != 0) ? (time * 100) / length : 0);
+@@ -1979,6 +2058,12 @@
+ {
+ 	int length, time;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		input_seek(time);
++		mainwin_release_info_text();
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	input_seek(time);
+@@ -2382,12 +2467,10 @@
+ 	case MAINWIN_GENERAL_STOPFADE:
+ 		break;
+ 	case MAINWIN_GENERAL_BACK5SEC:
+-		if (get_input_playing() && playlist_get_current_length() != -1)
+-			input_seek((((input_get_time() / 1000) - 5 >= 0) ? (input_get_time() / 1000) - 5 : 0));
++		song_seek(-5000);
+ 		break;
+ 	case MAINWIN_GENERAL_FWD5SEC:
+-		if (get_input_playing() && playlist_get_current_length() != -1)
+-			input_seek(((((input_get_time() / 1000) + 5) < (playlist_get_current_length() / 1000)) ? ((input_get_time() / 1000) + 5) : ((playlist_get_current_length() / 1000) - 1)));
++		song_seek(+5000);
+ 		break;
+ 	case MAINWIN_GENERAL_START:
+ 		playlist_set_position(0);
+@@ -2981,7 +3064,7 @@
+ 					hslider_set_position(mainwin_sposition, ((time * 12) / length) + 1);
+ 				}
+ 			}
+-			else
++			else if (song_pos_num <= 0)
+ 			{
+ 				hslider_set_position(mainwin_position, 0);
+ 				hslider_set_position(mainwin_sposition, 1);
+diff -r -u xmms-1.2.5/xmms/main.h xmms-1.2.5-patched/xmms/main.h
+--- xmms-1.2.5/xmms/main.h	Wed Mar 14 16:06:39 2001
++++ xmms-1.2.5-patched/xmms/main.h	Tue Jul 17 18:44:05 2001
+@@ -88,6 +88,7 @@
+ void mainwin_play_pushed(void);
+ void mainwin_stop_pushed(void);
+ void mainwin_eject_pushed(void);
++void song_seek(gint off);
+ 
+ void mainwin_set_back_pixmap(void);
+ 
+diff -r -u xmms-1.2.5/xmms/plugin.h xmms-1.2.5-patched/xmms/plugin.h
+--- xmms-1.2.5/xmms/plugin.h	Wed Mar  1 22:28:06 2000
++++ xmms-1.2.5-patched/xmms/plugin.h	Tue Jul 17 18:44:05 2001
+@@ -151,4 +151,6 @@
+ 	void (*render_freq)(gint16 freq_data[2][256]); /* Render the freq data, don't do anything time consuming in here */
+ } VisPlugin;
+ 
++void set_song_position(int pos, int first, int last);
++
+ #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xmms-songpos.patch-1.2.7	Tue Jun 03 10:23:04 2003 +0000
@@ -0,0 +1,408 @@
+diff -r -u xmms-1.2.7/General/ir/ir.c xmms-1.2.7-patched/General/ir/ir.c
+--- xmms-1.2.7/General/ir/ir.c	Mon Mar  5 15:15:13 2001
++++ xmms-1.2.7-patched/General/ir/ir.c	Sat Jun  1 17:27:31 2002
+@@ -292,12 +292,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekf) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(ir_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(ir_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(ir_gp.xmms_session, + 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+@@ -305,10 +300,7 @@
+ 				}
+ 				else if (!strcmp(text, ircfg.button_seekb) && g_timer_elapsed(timer1, NULL) > S_PAUSE / 2)
+ 				{
+-					output_time = xmms_remote_get_output_time(ir_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(ir_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(ir_gp.xmms_session, - 5000);
+ 					g_timer_reset(timer1);
+ 					g_timer_reset(timer2);
+ 					g_timer_stop(timer2);
+diff -r -u xmms-1.2.7/General/joystick/joy.c xmms-1.2.7-patched/General/joystick/joy.c
+--- xmms-1.2.7/General/joystick/joy.c	Mon Feb  5 15:27:10 2001
++++ xmms-1.2.7-patched/General/joystick/joy.c	Sat Jun  1 17:27:31 2002
+@@ -343,18 +343,10 @@
+ 					xmms_remote_set_volume(joy_gp.xmms_session, vl - 5, vr - 5);
+ 					break;
+ 				case JC_FWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					playlist_pos = xmms_remote_get_playlist_pos(joy_gp.xmms_session);
+-					playlist_time = xmms_remote_get_playlist_time(joy_gp.xmms_session, playlist_pos);
+-					if (playlist_time - output_time < 5000)
+-						output_time = playlist_time - 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time + 5000);
++					xmms_remote_seek(joy_gp.xmms_session, + 5000);
+ 					break;
+ 				case JC_RWD:
+-					output_time = xmms_remote_get_output_time(joy_gp.xmms_session);
+-					if (output_time < 5000)
+-						output_time = 5000;
+-					xmms_remote_jump_to_time(joy_gp.xmms_session, output_time - 5000);
++					xmms_remote_seek(joy_gp.xmms_session, - 5000);
+ 					break;
+ 				case JC_SHUFFLE:
+ 					xmms_remote_toggle_shuffle(joy_gp.xmms_session);
+diff -r -u xmms-1.2.7/Input/mikmod/plugin.c xmms-1.2.7-patched/Input/mikmod/plugin.c
+--- xmms-1.2.7/Input/mikmod/plugin.c	Mon Jul 23 14:26:27 2001
++++ xmms-1.2.7-patched/Input/mikmod/plugin.c	Sat Jun  1 17:27:31 2002
+@@ -150,15 +150,8 @@
+ 
+ static void seek(int time)
+ {
+-	/*
+-	   We need to seek in pattrens somehow
+-	   can't seek by time only by X pattrens on way or the other
+-
+-	   Player_NextPosition ();
+-	   Player_PrevPosition ();
+-
+-	 */
+-	return;
++	Player_SetPosition(time);
++	mikmod_ip.output->flush(get_time());
+ }
+ 
+ static void mod_pause(short p)
+@@ -174,6 +167,7 @@
+ 		return -1;
+ 	if(!Player_Active() && !mikmod_ip.output->buffer_playing())
+ 		return -1;
++	set_song_position(mf->sngpos, 0, (mf->numpos - 1));
+ 	return mikmod_ip.output->output_time();
+ }
+ 
+Only in xmms-1.2.7-patched/Input/mikmod: plugin.c~
+diff -r -u xmms-1.2.7/Input/mpg123/common.c xmms-1.2.7-patched/Input/mpg123/common.c
+--- xmms-1.2.7/Input/mpg123/common.c	Wed Feb 20 15:17:30 2002
++++ xmms-1.2.7-patched/Input/mpg123/common.c	Sat Jun  1 17:27:31 2002
+@@ -56,6 +56,13 @@
+ static FILE *filept;
+ static int filept_opened;
+ 
++int streaming_http(void)
++{
++	if (!filept_opened) return FALSE;
++	if (filept) return FALSE;
++	return TRUE;
++}
++
+ static int get_fileinfo(void);
+ 
+ static int fullread(FILE * fd, unsigned char *buf, int count)
+diff -r -u xmms-1.2.7/Input/mpg123/http.c xmms-1.2.7-patched/Input/mpg123/http.c
+--- xmms-1.2.7/Input/mpg123/http.c	Mon Jan  7 15:08:04 2002
++++ xmms-1.2.7-patched/Input/mpg123/http.c	Sat Jun  1 17:27:31 2002
+@@ -194,6 +194,11 @@
+ 	return (buffer_length - (wr_index - rd_index)) - 1;
+ }
+ 
++void show_http_buffer_fullness(void)
++{
++	set_song_position(http_used(), 0, buffer_length);
++}
++
+ static void http_wait_for_data(gint bytes)
+ {
+ 	while ((prebuffering || http_used() < bytes) && !eof && going && mpg123_info->going)
+Only in xmms-1.2.7-patched/Input/mpg123: http.c~
+diff -r -u xmms-1.2.7/Input/mpg123/mpg123.c xmms-1.2.7-patched/Input/mpg123/mpg123.c
+--- xmms-1.2.7/Input/mpg123/mpg123.c	Wed Feb 20 15:17:31 2002
++++ xmms-1.2.7-patched/Input/mpg123/mpg123.c	Sat Jun  1 17:27:31 2002
+@@ -1059,8 +1059,13 @@
+ 	}
+ }
+ 
++int streaming_http(void);
++void show_http_buffer_fullness(void);
++
+ static void seek(int time)
+ {
++	if (streaming_http())
++			return;
+ 	mpg123_info->jump_to_time = time;
+ 
+ 	while (mpg123_info->jump_to_time != -1)
+@@ -1083,6 +1088,8 @@
+ 		return -1;
+ 	if (!mpg123_info->going || (mpg123_info->eof && !mpg123_ip.output->buffer_playing()))
+ 		return -1;
++	if (streaming_http())
++		show_http_buffer_fullness();
+ 	return mpg123_ip.output->output_time();
+ }
+ 
+Only in xmms-1.2.7-patched/Input/mpg123: mpg123.c~
+diff -r -u xmms-1.2.7/libxmms/xmmsctrl.c xmms-1.2.7-patched/libxmms/xmmsctrl.c
+--- xmms-1.2.7/libxmms/xmmsctrl.c	Sun Mar  3 21:24:27 2002
++++ xmms-1.2.7-patched/libxmms/xmmsctrl.c	Sat Jun  1 17:27:31 2002
+@@ -377,6 +377,11 @@
+ 	remote_send_guint32(session, CMD_JUMP_TO_TIME, pos);
+ }
+ 
++void xmms_remote_seek(gint session, gint off)
++{
++	remote_send_guint32(session, CMD_SEEK, off);
++}
++
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr)
+ {
+ 	ServerPktHeader pkt_hdr;
+Only in xmms-1.2.7-patched/libxmms: xmmsctrl.c~
+diff -r -u xmms-1.2.7/libxmms/xmmsctrl.h xmms-1.2.7-patched/libxmms/xmmsctrl.h
+--- xmms-1.2.7/libxmms/xmmsctrl.h	Sun Mar  3 21:24:27 2002
++++ xmms-1.2.7-patched/libxmms/xmmsctrl.h	Sat Jun  1 17:27:31 2002
+@@ -42,6 +42,7 @@
+ void xmms_remote_playlist_clear(gint session);
+ gint xmms_remote_get_output_time(gint session);
+ void xmms_remote_jump_to_time(gint session, gint pos);
++void xmms_remote_seek(gint session, gint off);
+ void xmms_remote_get_volume(gint session, gint * vl, gint * vr);
+ gint xmms_remote_get_main_volume(gint session);
+ gint xmms_remote_get_balance(gint session);
+Only in xmms-1.2.7-patched/libxmms: xmmsctrl.h~
+diff -r -u xmms-1.2.7/xmms/controlsocket.c xmms-1.2.7-patched/xmms/controlsocket.c
+--- xmms-1.2.7/xmms/controlsocket.c	Sun Mar  3 21:24:33 2002
++++ xmms-1.2.7-patched/xmms/controlsocket.c	Sat Jun  1 17:28:51 2002
+@@ -451,6 +451,10 @@
+ 				    num < playlist_get_current_length())
+ 					input_seek(num / 1000);
+ 				break;
++			case CMD_SEEK:
++				num = *((guint32 *) data);
++				song_seek(num);
++				break;
+ 			case CMD_SET_VOLUME:
+ 				v[0] = ((guint32 *) data)[0];
+ 				v[1] = ((guint32 *) data)[1];
+diff -r -u xmms-1.2.7/xmms/controlsocket.h xmms-1.2.7-patched/xmms/controlsocket.h
+--- xmms-1.2.7/xmms/controlsocket.h	Sun Mar  3 21:24:33 2002
++++ xmms-1.2.7-patched/xmms/controlsocket.h	Sat Jun  1 17:27:31 2002
+@@ -33,7 +33,7 @@
+ 	CMD_GET_VERSION, CMD_PLAYLIST_ADD, CMD_PLAY, CMD_PAUSE, CMD_STOP,
+ 	CMD_IS_PLAYING, CMD_IS_PAUSED, CMD_GET_PLAYLIST_POS,
+ 	CMD_SET_PLAYLIST_POS, CMD_GET_PLAYLIST_LENGTH, CMD_PLAYLIST_CLEAR,
+-	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_GET_VOLUME,
++	CMD_GET_OUTPUT_TIME, CMD_JUMP_TO_TIME, CMD_SEEK, CMD_GET_VOLUME,
+ 	CMD_SET_VOLUME, CMD_GET_SKIN, CMD_SET_SKIN, CMD_GET_PLAYLIST_FILE,
+ 	CMD_GET_PLAYLIST_TITLE, CMD_GET_PLAYLIST_TIME, CMD_GET_INFO,
+ 	CMD_GET_EQ_DATA, CMD_SET_EQ_DATA, CMD_PL_WIN_TOGGLE,
+diff -r -u xmms-1.2.7/xmms/input.c xmms-1.2.7-patched/xmms/input.c
+--- xmms-1.2.7/xmms/input.c	Wed Jul 11 14:19:23 2001
++++ xmms-1.2.7-patched/xmms/input.c	Sat Jun  1 17:27:31 2002
+@@ -295,6 +295,7 @@
+ 		}
+ 	}
+ 	ip_data->playing = FALSE;
++	set_song_position(0, 0, 0);
+ }
+ 
+ void input_pause(void)
+diff -r -u xmms-1.2.7/xmms/main.c xmms-1.2.7-patched/xmms/main.c
+--- xmms-1.2.7/xmms/main.c	Wed Feb 27 15:30:28 2002
++++ xmms-1.2.7-patched/xmms/main.c	Sat Jun  1 17:28:05 2002
+@@ -681,6 +681,55 @@
+ 	g_free(filename);
+ }
+ 
++/*\
++|*| Separate song position stuff, for songs without a time length,
++|*|  but that want to be able to seek anyway.
++|*|      
++|*|      Have the input plugin's get_time() function call
++|*|      set_song_position(int pos, int first, int last)
++|*|      to set the slider.  If the slider is dragged,
++|*|      the plugin's seek() is called with the position.
++|*|      (If last <= first the feature is turned off)
++\*/
++
++static int song_pos_cur, song_pos_first, song_pos_num = 0;
++
++void set_song_position(int pos, int first, int last)
++{
++	last -= first;
++	song_pos_cur = pos;
++	song_pos_first = first;
++	song_pos_num = last;
++	if (last <= 0) return;
++	pos -= first;
++	if (pos > last) pos = last;
++	if (cfg.player_shaded)
++		show_widget(mainwin_sposition);
++	show_widget(mainwin_position);
++	hslider_set_position(mainwin_position, (pos * 219) / last);
++	hslider_set_position(mainwin_sposition, ((pos * 12) / last) + 1);
++}
++
++void song_seek(gint off)
++{
++	if (!get_input_playing()) return;
++	if (song_pos_num > 0) {
++		gint newpos = 0;
++		if (off < 0) newpos = song_pos_cur - 1;
++		else if (off > 0) newpos = song_pos_cur + 1;
++		if (newpos < song_pos_first) newpos = song_pos_first;
++		if (newpos > song_pos_first + song_pos_num)
++			newpos = song_pos_first + song_pos_num;
++		input_seek(newpos);
++	} else {
++		gint newpos = (input_get_time() / 1000) + (off / 1000);
++		gint pcl = playlist_get_current_length() / 1000;
++		if (newpos >= pcl) newpos = pcl - 1;
++		if (newpos < 0) newpos = 0;
++		input_seek(newpos);
++	}
++}
++
+ gchar *xmms_get_gentitle_format(void)
+ {
+ 	return cfg.gentitle_format;
+@@ -760,7 +809,9 @@
+ 		show_widget(mainwin_stime_min);
+ 		show_widget(mainwin_stime_sec);
+ 
+-		if (get_input_playing() && playlist_get_current_length() != -1)
++		if (get_input_playing() &&
++			((playlist_get_current_length() != -1) ||
++				 (song_pos_num > 0)))
+ 			show_widget(mainwin_sposition);
+ 
+ 		mainwin_shade->pb_ny = mainwin_shade->pb_py = 27;
+@@ -1056,7 +1107,7 @@
+ 	show_widget(mainwin_sec_num);
+ 	if (!get_input_paused())
+ 		playstatus_set_status(mainwin_playstatus, STATUS_PLAY);
+-	if (playlist_get_current_length() != -1)
++	if ((playlist_get_current_length() != -1) || (song_pos_num > 0))
+ 	{
+ 		if (cfg.player_shaded)
+ 			show_widget(mainwin_sposition);
+@@ -1352,13 +1403,19 @@
+ 		break;
+ 	case GDK_Left:
+ 	case GDK_KP_Left:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() - 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(-5000);
+ 		break;
+ 	case GDK_Right:
+ 	case GDK_KP_Right:
++/*
+ 		if(playlist_get_current_length() != -1)
+ 			input_seek(CLAMP(input_get_time() + 5000, 0, playlist_get_current_length()) / 1000);
++*/
++		song_seek(+5000);
+ 		break;
+ 	default:
+ 	     break;
+@@ -1988,6 +2045,16 @@
+ 
+ 	pos--;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 6) / 12) + song_pos_first;
++		tmp = g_strdup_printf("%d", time);
++		textbox_set_text(mainwin_stime_min, tmp);
++		g_free(tmp);
++		tmp = g_strdup_printf("%d", song_pos_first + song_pos_num);
++		textbox_set_text(mainwin_stime_sec, tmp);
++		g_free(tmp);
++		return;
++	}
+ 	time = ((playlist_get_current_length() / 1000) * pos) / 12;
+ 	if (cfg.timer_mode == TIMER_REMAINING)
+ 	{
+@@ -2009,6 +2076,10 @@
+ 
+ void mainwin_spos_release_cb(gint pos)
+ {
++	if (song_pos_num > 0) {
++		input_seek(((song_pos_num * (pos - 1) + 6) / 12) + song_pos_first);
++		return;
++	}
+ 	input_seek(((playlist_get_current_length() / 1000) * (pos - 1)) / 12);
+ }
+ 
+@@ -2017,6 +2088,14 @@
+ 	gint length, time;
+ 	gchar *buf;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		buf = g_strdup_printf("JUMP TO: %d/%d", time,
++				song_pos_num + song_pos_first);
++		mainwin_lock_info_text(buf);
++		g_free(buf);
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	buf = g_strdup_printf(_("SEEK TO: %d:%-2.2d/%d:%-2.2d (%d%%)"), time / 60, time % 60, length / 60, length % 60, (length != 0) ? (time * 100) / length : 0);
+@@ -2028,6 +2107,12 @@
+ {
+ 	int length, time;
+ 
++	if (song_pos_num > 0) {
++		time = ((song_pos_num * pos + 110) / 219) + song_pos_first;
++		input_seek(time);
++		mainwin_release_info_text();
++		return;
++	}
+ 	length = playlist_get_current_length() / 1000;
+ 	time = (length * pos) / 219;
+ 	input_seek(time);
+@@ -2423,12 +2508,10 @@
+ 	case MAINWIN_GENERAL_STOPFADE:
+ 		break;
+ 	case MAINWIN_GENERAL_BACK5SEC:
+-		if (get_input_playing() && playlist_get_current_length() != -1)
+-			input_seek((((input_get_time() / 1000) - 5 >= 0) ? (input_get_time() / 1000) - 5 : 0));
++		song_seek(-5000);
+ 		break;
+ 	case MAINWIN_GENERAL_FWD5SEC:
+-		if (get_input_playing() && playlist_get_current_length() != -1)
+-			input_seek(((((input_get_time() / 1000) + 5) < (playlist_get_current_length() / 1000)) ? ((input_get_time() / 1000) + 5) : ((playlist_get_current_length() / 1000) - 1)));
++		song_seek(+5000);
+ 		break;
+ 	case MAINWIN_GENERAL_START:
+ 		playlist_set_position(0);
+@@ -3032,7 +3115,7 @@
+ 					hslider_set_position(mainwin_sposition, ((time * 12) / length) + 1);
+ 				}
+ 			}
+-			else
++			else if (song_pos_num <= 0)
+ 			{
+ 				hslider_set_position(mainwin_position, 0);
+ 				hslider_set_position(mainwin_sposition, 1);
+diff -r -u xmms-1.2.7/xmms/main.h xmms-1.2.7-patched/xmms/main.h
+--- xmms-1.2.7/xmms/main.h	Mon Jan 21 15:22:38 2002
++++ xmms-1.2.7-patched/xmms/main.h	Sat Jun  1 17:27:31 2002
+@@ -87,6 +87,7 @@
+ void mainwin_play_pushed(void);
+ void mainwin_stop_pushed(void);
+ void mainwin_eject_pushed(void);
++void song_seek(gint off);
+ 
+ void mainwin_set_back_pixmap(void);
+ 
+diff -r -u xmms-1.2.7/xmms/plugin.h xmms-1.2.7-patched/xmms/plugin.h
+--- xmms-1.2.7/xmms/plugin.h	Fri Jul  6 21:15:34 2001
++++ xmms-1.2.7-patched/xmms/plugin.h	Sat Jun  1 17:27:31 2002
+@@ -154,4 +154,6 @@
+ 	void (*render_freq)(gint16 freq_data[2][256]); /* Render the freq data, don't do anything time consuming in here */
+ } VisPlugin;
+ 
++void set_song_position(int pos, int first, int last);
++
+ #endif