Mercurial > audlegacy
changeset 278:37316876ef6e trunk
[svn] Use modplug instead of mikmod. Supports more formats & compressed files.
line wrap: on
line diff
--- a/Plugins/Input/Makefile.am Sat Dec 10 13:54:12 2005 -0800 +++ b/Plugins/Input/Makefile.am Sat Dec 10 14:31:13 2005 -0800 @@ -1,2 +1,2 @@ -ALL_PLUGINS = mpg123 aac mikmod vorbis tonegen cdaudio sid wav flac console wma +ALL_PLUGINS = mpg123 aac modplug mikmod vorbis tonegen cdaudio sid wav flac console wma SUBDIRS = $(INPUT_PLUGINS)
--- a/Plugins/Input/mikmod/COPYING Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, 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 library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, 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 companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, 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 library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete 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 distribute a copy of this License along with the -Library. - - 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 Library or any portion -of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -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 Library, 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 Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you 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. - - If distribution of 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 satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. 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. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library 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. - - 9. 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 Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -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. - - 11. 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 Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library 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 Library. - -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. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library 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. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library 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 Library -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 Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -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 - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it!
--- a/Plugins/Input/mikmod/Makefile.am Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -if HAVE_MIKMOD - -lib_LTLIBRARIES = libmikmod.la - -endif - -libdir = $(plugindir)/$(INPUT_PLUGIN_DIR) - -INCLUDES = @GTK_CFLAGS@ @LIBMIKMOD_CFLAGS@ -I$(top_builddir)/intl -I$(top_srcdir) -libmikmod_la_LDFLAGS = @PLUGIN_LDFLAGS@ -libmikmod_la_LIBADD = @GTK_LIBS@ \ -@LIBMIKMOD_LIBS@ @LIBMIKMOD_LDADD@ - -libmikmod_la_SOURCES = drv_xmms.c mikmod-plugin.h plugin.c mikmod.xpm -
--- a/Plugins/Input/mikmod/drv_xmms.c Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ - -/* MikMod sound library - (c) 1998 Miodrag Vallat and others - see file AUTHORS for complete list - - This library is free software; you can redistribute it and/or modify - it under the terms of the GNU Library 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 Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Modified 2/1/99 for xmms by J. Nick Koston (BlueDraco) - */ - -/*============================================================================== - - $Id: drv_xmms.c,v 1.4 2002/04/27 18:47:08 havard Exp $ - - Output data to xmms - -==============================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <stdlib.h> -#include "libaudacious/util.h" - -#include "mikmod-plugin.h" - -static int buffer_size; - -static SBYTE *audiobuffer = NULL; -extern MIKMODConfig mikmod_cfg; -static short audio_open = FALSE; -gboolean mikmod_xmms_audio_error = FALSE; -extern gboolean mikmod_going; - -static BOOL xmms_IsThere(void) -{ - return 1; -} - -static BOOL xmms_Init(void) -{ - AFormat fmt; - int nch; - - buffer_size = 512; - if (!mikmod_cfg.force8bit) - buffer_size *= 2; - if (!mikmod_cfg.force_mono) - buffer_size *= 2; - if (!(audiobuffer = (SBYTE *) g_malloc0(buffer_size))) - return 1; - - fmt = (md_mode & DMODE_16BITS) ? FMT_S16_NE : FMT_U8; - nch = (md_mode & DMODE_STEREO) ? 2 : 1; - - if (audio_open) - mikmod_ip.output->close_audio(); - - if (!mikmod_ip.output->open_audio(fmt, md_mixfreq, nch)) - { - mikmod_xmms_audio_error = TRUE; - return 1; - } - audio_open = TRUE; - - return VC_Init(); -} - -static void xmms_Exit(void) -{ - VC_Exit(); - if (audiobuffer) - { - g_free(audiobuffer); - audiobuffer = NULL; - } - if (audio_open) - { - mikmod_ip.output->close_audio(); - audio_open = FALSE; - } - -} - -static void xmms_Update(void) -{ - gint length; - - length = VC_WriteBytes((SBYTE *) audiobuffer, buffer_size); - mikmod_ip.add_vis_pcm(mikmod_ip.output->written_time(), mikmod_cfg.force8bit ? FMT_U8 : FMT_S16_NE, mikmod_cfg.force_mono ? 1 : 2, length, audiobuffer); - - while(mikmod_ip.output->buffer_free() < length && mikmod_going) - xmms_usleep(10000); - if(mikmod_going) - mikmod_ip.output->write_audio(audiobuffer, length); - -} - -static BOOL xmms_Reset(void) -{ - VC_Exit(); - return VC_Init(); -} - -MDRIVER drv_xmms = -{ - NULL, - "xmms", - "xmms output driver v1.0", - 0, 255, -#if (LIBMIKMOD_VERSION > 0x030106) - "xmms", - NULL, -#endif - xmms_IsThere, - VC_SampleLoad, - VC_SampleUnload, - VC_SampleSpace, - VC_SampleLength, - xmms_Init, - xmms_Exit, - xmms_Reset, - VC_SetNumVoices, - VC_PlayStart, - VC_PlayStop, - xmms_Update, - NULL, - VC_VoiceSetVolume, - VC_VoiceGetVolume, - VC_VoiceSetFrequency, - VC_VoiceGetFrequency, - VC_VoiceSetPanning, - VC_VoiceGetPanning, - VC_VoicePlay, - VC_VoiceStop, - VC_VoiceStopped, - VC_VoiceGetPosition, - VC_VoiceRealVolume - -};
--- a/Plugins/Input/mikmod/mikmod-plugin.h Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -#include "config.h" - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <limits.h> -#include <gtk/gtk.h> -#include "audacious/plugin.h" -#include <mikmod.h> - -extern InputPlugin mikmod_ip; - -enum { - SAMPLE_FREQ_44 = 0, - SAMPLE_FREQ_22, - SAMPLE_FREQ_11, -}; - -typedef struct -{ - gint mixing_freq; - gint volumefadeout; - gint surround; - gint force8bit; - gint hidden_patterns; - gint force_mono; - gint interpolation; - gint def_pansep; -} -MIKMODConfig; - -extern MIKMODConfig mikmod_cfg; - -extern MDRIVER drv_xmms; - -
--- a/Plugins/Input/mikmod/mikmod.xpm Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1470 +0,0 @@ -/* XPM */ -static char * mikmod_xpm[] = { -"100 33 1434 2", -" c None", -". c #8282FC", -"+ c #8181FB", -"@ c #8080FA", -"# c #7F7FF9", -"$ c #8381FB", -"% c #6778F0", -"& c #7E7DF6", -"* c #7F7EFA", -"= c #8381FD", -"- c #8282FB", -"; c #8182FB", -"> c #6877F3", -", c #7E7DF8", -"' c #7F7DF7", -") c #8281FB", -"! c #8482FC", -"~ c #4369E5", -"{ c #275DDC", -"] c #265CDA", -"^ c #265DDB", -"/ c #3760D9", -"( c #7270DF", -"_ c #7E7CF5", -": c #8182FC", -"< c #7C7FF8", -"[ c #5D71EC", -"} c #7B7BF3", -"| c #807FFA", -"1 c #7A80F7", -"2 c #6172EF", -"3 c #7C7BF3", -"4 c #807FF9", -"5 c #767DF8", -"6 c #285EDF", -"7 c #255DDE", -"8 c #4163D8", -"9 c #7273E5", -"0 c #7D7DF7", -"a c #8381FA", -"b c #3F69E5", -"c c #2C5CD5", -"d c #656AD3", -"e c #7C7AF2", -"f c #4C6DEA", -"g c #1F59D5", -"h c #6261C1", -"i c #7474E6", -"j c #8280FC", -"k c #8280FB", -"l c #4367E6", -"m c #0953DC", -"n c #0853DA", -"o c #0D49BA", -"p c #3C3A74", -"q c #7271E2", -"r c #8280FA", -"s c #1659D9", -"t c #375DD1", -"u c #6A6DD6", -"v c #6D7AF5", -"w c #1F5BDE", -"x c #3D59C2", -"y c #5F61C0", -"z c #7A7AF3", -"A c #727AF5", -"B c #0A53DA", -"C c #0952DB", -"D c #183D90", -"E c #45458A", -"F c #7777EE", -"G c #5770EC", -"H c #0F5BDD", -"I c #1A58CF", -"J c #5560C2", -"K c #7976EC", -"L c #8180FB", -"M c #7B80F9", -"N c #3767E5", -"O c #0F5ADA", -"P c #1C4AA9", -"Q c #37366C", -"R c #6F6FDC", -"S c #817FFB", -"T c #5B72ED", -"U c #0F5ADC", -"V c #0B46AD", -"W c #26254F", -"X c #6E6FD9", -"Y c #817FF9", -"Z c #8281F9", -"` c #2E63E1", -" . c #105BDA", -".. c #2356C8", -"+. c #5F64C9", -"@. c #7B7AF1", -"#. c #8183FB", -"$. c #5E74F0", -"%. c #155DDC", -"&. c #1059DF", -"*. c #24336B", -"=. c #494A92", -"-. c #7B7BF4", -";. c #737BF5", -">. c #105ADC", -",. c #1159DD", -"'. c #0B2D6A", -"). c #3A3970", -"!. c #7776EA", -"~. c #6D78F3", -"{. c #105DDC", -"]. c #115CDB", -"^. c #155BD5", -"/. c #425ABE", -"(. c #7470E1", -"_. c #8383FC", -":. c #6D7BF4", -"<. c #2262DE", -"[. c #0F5CDC", -"}. c #122E6C", -"|. c #323468", -"1. c #7373E4", -"2. c #8080FB", -"3. c #6F78F4", -"4. c #125BDA", -"5. c #0D48AC", -"6. c #27244C", -"7. c #6D6DD8", -"8. c #456CE7", -"9. c #115CDC", -"0. c #115CDA", -"a. c #185AD2", -"b. c #4E5EBE", -"c. c #7776EB", -"d. c #8180FA", -"e. c #7F81FB", -"f. c #466CE5", -"g. c #105DDE", -"h. c #1158DA", -"i. c #13182E", -"j. c #5152A3", -"k. c #7D7CF5", -"l. c #747CF5", -"m. c #125CDA", -"n. c #115CDD", -"o. c #0F2659", -"p. c #403F7F", -"q. c #7978EE", -"r. c #7C7EF7", -"s. c #1C63DC", -"t. c #1663DB", -"u. c #1763DA", -"v. c #1762DB", -"w. c #2F5DC2", -"x. c #676AD1", -"y. c #7C7CF6", -"z. c #8281FC", -"A. c #5A76EE", -"B. c #1A64DC", -"C. c #1762DD", -"D. c #1662DC", -"E. c #1564DB", -"F. c #0F1F45", -"G. c #414180", -"H. c #7979EE", -"I. c #8181FC", -"J. c #7B7DF7", -"K. c #1C65DA", -"L. c #124DAA", -"M. c #27234C", -"N. c #6D6ED8", -"O. c #8082FB", -"P. c #5C73EA", -"Q. c #1662DB", -"R. c #1662D8", -"S. c #3D5CC0", -"T. c #6F6EDE", -"U. c #7D7EF8", -"V. c #767EF7", -"W. c #2F6ADF", -"X. c #1364DB", -"Y. c #1354B8", -"Z. c #1A1631", -"`. c #605FBD", -" + c #757DF5", -".+ c #1464DB", -"++ c #132148", -"@+ c #46468C", -"#+ c #7B7AF2", -"$+ c #8180F9", -"%+ c #2B68E1", -"&+ c #1667DD", -"*+ c #1766DD", -"=+ c #1766DC", -"-+ c #2460CD", -";+ c #5B62C6", -">+ c #7A78F0", -",+ c #7F80FA", -"'+ c #4671E8", -")+ c #1664D6", -"!+ c #11152B", -"~+ c #51509E", -"{+ c #7C7CF4", -"]+ c #2E6ADF", -"^+ c #144FAB", -"/+ c #25234B", -"(+ c #6E7AF2", -"_+ c #1764DA", -":+ c #1865DD", -"<+ c #2D5FC7", -"[+ c #6467CE", -"}+ c #7C7AF3", -"|+ c #677AF2", -"1+ c #2269DF", -"2+ c #1865DC", -"3+ c #114493", -"4+ c #212143", -"5+ c #6C6AD3", -"6+ c #757DF7", -"7+ c #1864DC", -"8+ c #111C39", -"9+ c #4F4F9A", -"0+ c #4072E6", -"a+ c #1C6CDF", -"b+ c #1B6CDE", -"c+ c #1B6BDE", -"d+ c #2268D7", -"e+ c #4C5EC0", -"f+ c #7374E5", -"g+ c #7480F7", -"h+ c #3370E1", -"i+ c #1C6BDE", -"j+ c #185DC4", -"k+ c #16152A", -"l+ c #5E5DBA", -"m+ c #4473E6", -"n+ c #1654AF", -"o+ c #26234C", -"p+ c #7B7FF9", -"q+ c #236BDE", -"r+ c #1D6CE0", -"s+ c #2465D0", -"t+ c #5661C4", -"u+ c #7677EB", -"v+ c #827FFA", -"w+ c #5178EC", -"x+ c #1D6CDF", -"y+ c #1C6CE0", -"z+ c #12366F", -"A+ c #2E2F5F", -"B+ c #7372E3", -"C+ c #757EF7", -"D+ c #1D6BDE", -"E+ c #1C69DE", -"F+ c #131830", -"G+ c #5654A9", -"H+ c #7E7DF7", -"I+ c #5677EB", -"J+ c #2071E3", -"K+ c #2171E4", -"L+ c #1F71E0", -"M+ c #206FE1", -"N+ c #3D62C1", -"O+ c #6A6CD9", -"P+ c #7D7CF6", -"Q+ c #667DF3", -"R+ c #2872E4", -"S+ c #1E71E1", -"T+ c #174F9D", -"U+ c #211F3B", -"V+ c #6969CF", -"W+ c #7F7EF9", -"X+ c #5877EC", -"Y+ c #1859B2", -"Z+ c #3472E3", -"`+ c #1F71E3", -" @ c #246FDC", -".@ c #4560C0", -"+@ c #7270E3", -"@@ c #7A80FA", -"#@ c #4177E7", -"$@ c #2170E3", -"%@ c #2171E3", -"&@ c #2070E2", -"*@ c #0F274E", -"=@ c #3E3D78", -"-@ c #7877ED", -";@ c #757FF8", -">@ c #2170E2", -",@ c #1F6AD9", -"'@ c #15172C", -")@ c #5E5BB5", -"!@ c #6B7BF2", -"~@ c #2173E2", -"{@ c #2373E3", -"]@ c #2373E2", -"^@ c #2372E3", -"/@ c #2F67CE", -"(@ c #6066CA", -"_@ c #797BF1", -":@ c #5579ED", -"<@ c #2473E3", -"[@ c #173D7A", -"}@ c #2D2B56", -"|@ c #7270E1", -"1@ c #6B7BF0", -"2@ c #2373E5", -"3@ c #2373E4", -"4@ c #1A5BB2", -"5@ c #27234D", -"6@ c #4676E9", -"7@ c #2173E4", -"8@ c #2172E3", -"9@ c #3964C3", -"0@ c #696AD3", -"a@ c #7E7BF5", -"b@ c #707EF4", -"c@ c #3275E5", -"d@ c #2273E3", -"e@ c #2273E1", -"f@ c #101831", -"g@ c #4D4C97", -"h@ c #8382FB", -"i@ c #757FF7", -"j@ c #2372E4", -"k@ c #2165C8", -"l@ c #191A35", -"m@ c #6462C3", -"n@ c #787EF4", -"o@ c #2B79E3", -"p@ c #297AE4", -"q@ c #287AE5", -"r@ c #2879E4", -"s@ c #287AE4", -"t@ c #297AE5", -"u@ c #287BE4", -"v@ c #2D72D8", -"w@ c #5066C7", -"x@ c #3F7AE6", -"y@ c #2879E6", -"z@ c #287AE6", -"A@ c #2879E2", -"B@ c #142B53", -"C@ c #383D7A", -"D@ c #6976EA", -"E@ c #6D7DF2", -"F@ c #6E7DF3", -"G@ c #6E7EF4", -"H@ c #797AF2", -"I@ c #2A7AE3", -"J@ c #1F61B3", -"K@ c #27234A", -"L@ c #7280F6", -"M@ c #6D7EF3", -"N@ c #787CF5", -"O@ c #597BED", -"P@ c #277AE5", -"Q@ c #2979E5", -"R@ c #2676DD", -"S@ c #277BE3", -"T@ c #267BE5", -"U@ c #2F6ED1", -"V@ c #4C6ED5", -"W@ c #2B7CE5", -"X@ c #277CE5", -"Y@ c #287AE7", -"Z@ c #2978E1", -"`@ c #2878E1", -" # c #2370CE", -".# c #13172F", -"+# c #505DBA", -"@# c #6C7BF0", -"## c #727EF4", -"$# c #7F7EF8", -"%# c #7180F5", -"&# c #6F7EF4", -"*# c #2261B5", -"=# c #1F1F3E", -"-# c #6867CE", -";# c #8381FC", -"># c #7E80F9", -",# c #377BE7", -"'# c #287DE5", -")# c #287DE3", -"!# c #2061B0", -"~# c #1A4985", -"{# c #2A7BE1", -"]# c #277EE4", -"^# c #2A7CE4", -"/# c #277DE5", -"(# c #2A7BE3", -"_# c #205CAB", -":# c #1C4A8A", -"<# c #297CE3", -"[# c #101B36", -"}# c #394F9A", -"|# c #2A7CE3", -"1# c #297DE5", -"2# c #2A7BDF", -"3# c #5253A8", -"4# c #3375DB", -"5# c #287EE3", -"6# c #1F62B3", -"7# c #272449", -"8# c #797FF7", -"9# c #2B7BE2", -"0# c #2D6ECF", -"a# c #5255AB", -"b# c #5C71D9", -"c# c #287DE4", -"d# c #153B6D", -"e# c #225DAB", -"f# c #277CE4", -"g# c #277DE3", -"h# c #2A7BE4", -"i# c #297CE4", -"j# c #2675D7", -"k# c #122D55", -"l# c #266EC5", -"m# c #205DA6", -"n# c #1C2D55", -"o# c #297BE5", -"p# c #297DE3", -"q# c #327BE4", -"r# c #437BE5", -"s# c #5B7AE8", -"t# c #6D7AEE", -"u# c #797BF3", -"v# c #7C80F9", -"w# c #5A7AEA", -"x# c #2C7CE2", -"y# c #2E7CE2", -"z# c #5268CA", -"A# c #7270E0", -"B# c #7D7EF7", -"C# c #757FF6", -"D# c #297CE5", -"E# c #215AA4", -"F# c #25254B", -"G# c #6D6EDA", -"H# c #4581E8", -"I# c #2E84E5", -"J# c #2C83E5", -"K# c #2364AC", -"L# c #1B1A35", -"M# c #3D5BAF", -"N# c #2F7EE0", -"O# c #2D83E6", -"P# c #2D83E5", -"Q# c #2C83E4", -"R# c #2E83E5", -"S# c #2D82E1", -"T# c #1D4A82", -"U# c #111426", -"V# c #2C559B", -"W# c #2D79D5", -"X# c #121427", -"Y# c #4B59AD", -"Z# c #2E84E4", -"`# c #2B84E4", -" $ c #2771C5", -".$ c #222144", -"+$ c #3870C9", -"@$ c #2D83E4", -"#$ c #2366B4", -"$$ c #27244A", -"%$ c #817FF8", -"&$ c #5483EF", -"*$ c #2C84E4", -"=$ c #2B78CE", -"-$ c #14203E", -";$ c #38376E", -">$ c #656FD7", -",$ c #2F84E5", -"'$ c #2E84E6", -")$ c #153766", -"!$ c #303262", -"~$ c #3D69C3", -"{$ c #2C83E3", -"]$ c #2D84E5", -"^$ c #276EC2", -"/$ c #111E38", -"($ c #212144", -"_$ c #2F7AD5", -":$ c #1D4984", -"<$ c #252F5D", -"[$ c #2E83E4", -"}$ c #2F83E3", -"|$ c #3282E2", -"1$ c #427FE5", -"2$ c #577CEA", -"3$ c #677BEC", -"4$ c #787BF5", -"5$ c #7582F7", -"6$ c #6B77E8", -"7$ c #5568CA", -"8$ c #337EDC", -"9$ c #2C7FDA", -"0$ c #4356A3", -"a$ c #7270E2", -"b$ c #807FF8", -"c$ c #7581F6", -"d$ c #205495", -"e$ c #2B2A57", -"f$ c #7070E0", -"g$ c #5682ED", -"h$ c #3085E6", -"i$ c #2F86E6", -"j$ c #2665AD", -"k$ c #262447", -"l$ c #6666CA", -"m$ c #5868CC", -"n$ c #347DDA", -"o$ c #3086E7", -"p$ c #2E86E6", -"q$ c #2D7FDB", -"r$ c #173158", -"s$ c #15182E", -"t$ c #434487", -"u$ c #4A76DB", -"v$ c #2E86E7", -"w$ c #2767AF", -"x$ c #1B1B35", -"y$ c #5E63C4", -"z$ c #3086E5", -"A$ c #225FA7", -"B$ c #252242", -"C$ c #476ECC", -"D$ c #2E86E4", -"E$ c #2669B5", -"F$ c #7D7FF7", -"G$ c #3785E8", -"H$ c #2E80DF", -"I$ c #112745", -"J$ c #232344", -"K$ c #5F5EBC", -"L$ c #3A85E7", -"M$ c #3086E2", -"N$ c #173964", -"O$ c #414285", -"P$ c #6E6EDC", -"Q$ c #516BCB", -"R$ c #3182DE", -"S$ c #2F86E7", -"T$ c #2E85E5", -"U$ c #225EA3", -"V$ c #101528", -"W$ c #2C2D5C", -"X$ c #5F5DBC", -"Y$ c #3783E3", -"Z$ c #19355B", -"`$ c #32386F", -" % c #3184E2", -".% c #1E4E87", -"+% c #1C3E72", -"@% c #21447B", -"#% c #21457C", -"$% c #21467F", -"%% c #244882", -"&% c #284B85", -"*% c #2B4F8E", -"=% c #3558A0", -"-% c #4462BA", -";% c #606DD5", -">% c #7577ED", -",% c #7E7CF7", -"'% c #7680F6", -")% c #5D75DF", -"!% c #6967CE", -"~% c #5F69CC", -"{% c #377AD9", -"]% c #2E7DD8", -"^% c #4855A3", -"/% c #7473E7", -"(% c #8080F9", -"_% c #214C84", -":% c #323368", -"<% c #7575E8", -"[% c #6781F1", -"}% c #338BE5", -"|% c #286BAA", -"1% c #25254A", -"2% c #6F6EDC", -"3% c #797AF4", -"4% c #656BD2", -"5% c #3D7CD7", -"6% c #328BE7", -"7% c #338CE7", -"8% c #2D78C7", -"9% c #13213C", -"0% c #1F203F", -"a% c #51509F", -"b% c #5983EC", -"c% c #348BE6", -"d% c #21528B", -"e% c #27274F", -"f% c #6B6ED9", -"g% c #3A8AE7", -"h% c #348BE5", -"i% c #205185", -"j% c #292B54", -"k% c #5B73D8", -"l% c #328CE5", -"m% c #296DAF", -"n% c #26254B", -"o% c #6D6ED9", -"p% c #6581EF", -"q% c #358CE6", -"r% c #348BE4", -"s% c #1A3C68", -"t% c #1C1A35", -"u% c #5554A5", -"v% c #7B78F1", -"w% c #4B85EA", -"x% c #338CE5", -"y% c #358BE5", -"z% c #183A68", -"A% c #434587", -"B% c #7A79F0", -"C% c #5C6ACF", -"D% c #3882DC", -"E% c #348BE7", -"F% c #358BE6", -"G% c #3389E5", -"H% c #1D487B", -"I% c #131325", -"J% c #3B3974", -"K% c #6866CC", -"L% c #3D8AE8", -"M% c #358BE7", -"N% c #11213F", -"O% c #474689", -"P% c #3B87E6", -"Q% c #172D4E", -"R% c #2F305F", -"S% c #5254A4", -"T% c #5658AC", -"U% c #5658AD", -"V% c #5558AC", -"W% c #5759AE", -"X% c #5759B0", -"Y% c #5A5BB4", -"Z% c #6161C1", -"`% c #646AD0", -" & c #6A74E0", -".& c #7A78F1", -"+& c #767EF5", -"@& c #5177D7", -"#& c #6262C1", -"$& c #7978F0", -"%& c #6A6CD8", -"&& c #4279D5", -"*& c #357FD2", -"=& c #4E59AC", -"-& c #8281FA", -";& c #7980F6", -">& c #338CE6", -",& c #23477A", -"'& c #3B3B75", -")& c #7774EC", -"!& c #7680F5", -"~& c #3891E9", -"{& c #3891EA", -"]& c #2A6EAE", -"^& c #706FDD", -"/& c #7E7CF6", -"(& c #6E6EDE", -"_& c #4475CE", -":& c #3790E8", -"<& c #2966AA", -"[& c #111629", -"}& c #2B2C58", -"|& c #5C5DB8", -"1& c #7979F0", -"2& c #8081F9", -"3& c #5C88EF", -"4& c #3791EA", -"5& c #1D3B63", -"6& c #353569", -"7& c #7674E7", -"8& c #438CEB", -"9& c #3991EA", -"0& c #3791E9", -"a& c #1D406A", -"b& c #36376A", -"c& c #6E77E5", -"d& c #2B6FB1", -"e& c #25254C", -"f& c #6E6ED8", -"g& c #468EEB", -"h& c #3990EA", -"i& c #23548F", -"j& c #151329", -"k& c #4A4A93", -"l& c #7776EC", -"m& c #5C85EF", -"n& c #3691EA", -"o& c #398FE8", -"p& c #1A3D65", -"q& c #817FFC", -"r& c #7B7AF4", -"s& c #666CD2", -"t& c #3E7DD4", -"u& c #3487DB", -"v& c #183156", -"w& c #1A1935", -"x& c #46488C", -"y& c #716FE0", -"z& c #7F7DF9", -"A& c #8081FA", -"B& c #418FEB", -"C& c #368BE1", -"D& c #101328", -"E& c #5755A7", -"F& c #488AEB", -"G& c #1A3355", -"H& c #494991", -"I& c #807EF8", -"J& c #7F7DF8", -"K& c #7F7FF8", -"L& c #6C81F3", -"M& c #6C76E4", -"N& c #7271E1", -"O& c #757FF5", -"P& c #467DD7", -"Q& c #5454A8", -"R& c #7171E1", -"S& c #4975D0", -"T& c #3A7ED2", -"U& c #575BB1", -"V& c #7878EF", -"W& c #7981F7", -"X& c #3991EB", -"Y& c #23416B", -"Z& c #424284", -"`& c #7B79F2", -" * c #3E93EC", -".* c #3993EB", -"+* c #2C70B2", -"@* c #26254C", -"#* c #716FDE", -"$* c #7573E5", -"%* c #5165BD", -"&* c #2B2D57", -"** c #3A3974", -"=* c #6867CD", -"-* c #5D8AF0", -";* c #3994EC", -">* c #152541", -",* c #454586", -"'* c #7A79F1", -")* c #4F8CEE", -"!* c #3A93EB", -"~* c #3993EC", -"{* c #3A93ED", -"]* c #193050", -"^* c #4191EA", -"/* c #2D72B3", -"(* c #25264E", -"_* c #5F73D5", -":* c #3B93EC", -"<* c #3071B7", -"[* c #141426", -"}* c #3D3E7F", -"|* c #6A83F2", -"1* c #3894EB", -"2* c #3B92EA", -"3* c #1B3E62", -"4* c #7E7EF7", -"5* c #706FDE", -"6* c #4A519D", -"7* c #313262", -"8* c #5455A9", -"9* c #7675E8", -"0* c #4390EC", -"a* c #2E77BE", -"b* c #1B1731", -"c* c #6061C2", -"d* c #538BEF", -"e* c #3A93EC", -"f* c #1C3458", -"g* c #4C4992", -"h* c #7B7AF3", -"i* c #8382FC", -"j* c #6289F3", -"k* c #616CD0", -"l* c #6968D1", -"m* c #767DF4", -"n* c #4085DB", -"o* c #47478D", -"p* c #7471E5", -"q* c #817FFA", -"r* c #5473CC", -"s* c #3E7AC9", -"t* c #5E5FBD", -"u* c #7A79EF", -"v* c #7881F7", -"w* c #3B92ED", -"x* c #263C6A", -"y* c #49498F", -"z* c #4C92EB", -"A* c #3D9AE8", -"B* c #2F75B1", -"C* c #262449", -"D* c #6B6BD6", -"E* c #7E7EF8", -"F* c #8183FD", -"G* c #5F8CEF", -"H* c #3B95E5", -"I* c #12152B", -"J* c #5253A3", -"K* c #5A8CEC", -"L* c #3D9AE7", -"M* c #3D99E9", -"N* c #3D98E8", -"O* c #131F38", -"P* c #4D4C98", -"Q* c #7A79F2", -"R* c #4F90EB", -"S* c #3176B0", -"T* c #24264A", -"U* c #4B82D5", -"V* c #3C89D5", -"W* c #1E2544", -"X* c #333568", -"Y* c #6C6BD7", -"Z* c #7880F5", -"`* c #3C99E8", -" = c #3F9AE9", -".= c #1C4061", -"+= c #7777ED", -"@= c #7271DF", -"#= c #7F81FA", -"$= c #4596EA", -"%= c #3C9AE9", -"&= c #286095", -"*= c #252448", -"== c #6C6DD6", -"-= c #6089F1", -";= c #3A9AEA", -">= c #1E375A", -",= c #4B4992", -"'= c #5790ED", -")= c #5661B8", -"!= c #787DF2", -"~= c #3F94E2", -"{= c #3B3C77", -"]= c #6C6AD5", -"^= c #7A78EF", -"/= c #5E70D3", -"(= c #4677C7", -"_= c #6566CA", -":= c #757EF1", -"<= c #3F98EA", -"[= c #28345C", -"}= c #4F509E", -"|= c #5D8FEE", -"1= c #449EEA", -"2= c #3379B4", -"3= c #262549", -"4= c #8183FC", -"5= c #618EF0", -"6= c #3983C7", -"7= c #17192F", -"8= c #5F5FBD", -"9= c #698AF0", -"0= c #439EEA", -"a= c #429EEB", -"b= c #4499E4", -"c= c #111328", -"d= c #5856AD", -"e= c #5E8DEE", -"f= c #357AB3", -"g= c #282E54", -"h= c #4596E2", -"i= c #374882", -"j= c #312F5E", -"k= c #6564C9", -"l= c #7D7DF5", -"m= c #469BEB", -"n= c #469EEB", -"o= c #204264", -"p= c #807FFB", -"q= c #499BEC", -"r= c #24476F", -"s= c #323166", -"t= c #7373E5", -"u= c #6D86F2", -"v= c #419FEC", -"w= c #213A5E", -"x= c #5299F0", -"y= c #48549C", -"z= c #5C5BB4", -"A= c #7980F4", -"B= c #429FEB", -"C= c #313C6E", -"D= c #6361C4", -"E= c #807EFA", -"F= c #7C7BF4", -"G= c #6A71DA", -"H= c #5671C7", -"I= c #6773DA", -"J= c #439EE9", -"K= c #2A2E58", -"L= c #5757AE", -"M= c #698BF0", -"N= c #45A4E9", -"O= c #367CB3", -"P= c #6391F0", -"Q= c #306B9C", -"R= c #212246", -"S= c #6B6BD2", -"T= c #7188F4", -"U= c #44A5EA", -"V= c #44A4EC", -"W= c #3C8AC4", -"X= c #181931", -"Y= c #6261C0", -"Z= c #6B8AF1", -"`= c #46A4EA", -" - c #347DB4", -".- c #2F5581", -"+- c #4D6AB9", -"@- c #3D3C76", -"#- c #5E5CB6", -"$- c #7C7BF2", -"%- c #827FFB", -"&- c #5299EC", -"*- c #47A3E9", -"=- c #204466", -"-- c #424587", -";- c #4B9FEB", -">- c #45A5EA", -",- c #192F4A", -"'- c #424280", -")- c #7485F5", -"!- c #43A4EB", -"~- c #274169", -"{- c #4B4A93", -"]- c #48A3EB", -"^- c #3E4684", -"/- c #5957AF", -"(- c #44A5EB", -"_- c #2F4675", -":- c #5655AB", -"<- c #7D7DF8", -"[- c #7175E5", -"}- c #6575DD", -"|- c #469DE4", -"1- c #2F2E5B", -"2- c #5E5EBD", -"3- c #7586F4", -"4- c #48A7EC", -"5- c #3780B5", -"6- c #27254B", -"7- c #6492F1", -"8- c #48A7EB", -"9- c #265178", -"0- c #7373E3", -"a- c #7884F7", -"b- c #49A8EB", -"c- c #3574AB", -"d- c #212241", -"e- c #6C6AD4", -"f- c #7884F6", -"g- c #3B86BC", -"h- c #2F4C7A", -"i- c #48478E", -"j- c #5C5DB6", -"k- c #7977EE", -"l- c #8380FC", -"m- c #5F95F0", -"n- c #4AA6EC", -"o- c #254871", -"p- c #424486", -"q- c #4EA1EB", -"r- c #48A5E8", -"s- c #141D33", -"t- c #4F4F9D", -"u- c #7C81F7", -"v- c #48A6ED", -"w- c #28436B", -"x- c #4C4A92", -"y- c #7B87F9", -"z- c #49A7EB", -"A- c #303D6C", -"B- c #5957AE", -"C- c #7880F4", -"D- c #47A7EB", -"E- c #335888", -"F- c #767EF2", -"G- c #4898DD", -"H- c #333264", -"I- c #6665C9", -"J- c #7B82F8", -"K- c #50A9ED", -"L- c #3B84B8", -"M- c #27254A", -"N- c #716FDD", -"O- c #6594F1", -"P- c #4EADED", -"Q- c #203955", -"R- c #3E3E7B", -"S- c #7877F0", -"T- c #7A82F8", -"U- c #50AAEB", -"V- c #4CADEC", -"W- c #31618D", -"X- c #292A56", -"Y- c #7170E0", -"Z- c #7E7FF9", -"`- c #50A8EC", -" ; c #3E8EC6", -".; c #22294A", -"+; c #817FFD", -"@; c #6D8EF1", -"#; c #4EABEC", -"$; c #274B6F", -"%; c #7978F1", -"&; c #55A5EE", -"*; c #4298D4", -"=; c #171830", -"-; c #5D5DB8", -";; c #51A9EE", -">; c #2F4974", -",; c #7090F4", -"'; c #4FADEC", -"); c #293760", -"!; c #5654AA", -"~; c #4DACED", -"{; c #366D9D", -"]; c #7B83F7", -"^; c #4C96DC", -"/; c #373A71", -"(; c #696AD2", -"_; c #7F80F9", -":; c #58A9F2", -"<; c #4089BE", -"[; c #29274B", -"}; c #6698F3", -"|; c #52B1F0", -"1; c #19233D", -"2; c #4D4C99", -"3; c #7E80FA", -"4; c #57A9F1", -"5; c #53B0F0", -"6; c #264D71", -"7; c #35376B", -"8; c #7675EA", -"9; c #5BA6F1", -"0; c #438CBF", -"a; c #346491", -"b; c #5B60B9", -"c; c #7A7AF2", -"d; c #7488F5", -"e; c #53B2F2", -"f; c #294F73", -"g; c #434586", -"h; c #57ABF3", -"i; c #3E7FB4", -"j; c #212343", -"k; c #6A68D0", -"l; c #59A8F3", -"m; c #344F7F", -"n; c #4B4A94", -"o; c #8083FC", -"p; c #689AF5", -"q; c #52B2F2", -"r; c #253254", -"s; c #5654A7", -"t; c #7781F5", -"u; c #50B3F4", -"v; c #4186BB", -"w; c #333061", -"x; c #7A86F8", -"y; c #5191D7", -"z; c #3F4080", -"A; c #5FA0F2", -"B; c #448DC7", -"C; c #29284F", -"D; c #6799F5", -"E; c #4FA6E4", -"F; c #1F2042", -"G; c #8081FB", -"H; c #5BA7F3", -"I; c #52B4F4", -"J; c #213856", -"K; c #414181", -"L; c #619EF3", -"M; c #448FC6", -"N; c #2B4369", -"O; c #5497DE", -"P; c #6365C7", -"Q; c #7D81FA", -"R; c #52B3F3", -"S; c #30547E", -"T; c #444587", -"U; c #58ACF4", -"V; c #39699B", -"W; c #2E305C", -"X; c #7370E0", -"Y; c #5FA3F5", -"Z; c #3A568D", -"`; c #4D4D99", -" > c #7B7CF4", -".> c #5FA5F3", -"+> c #54B5F3", -"@> c #212D4D", -"#> c #5655A7", -"$> c #51B5F4", -"%> c #4EA4DC", -"&> c #6D6CD8", -"*> c #7B85F7", -"=> c #568ED7", -"-> c #48488E", -";> c #8082FC", -">> c #6C98F5", -",> c #4995CA", -"'> c #2C2B56", -")> c #6A9CF8", -"!> c #4D93C8", -"~> c #27294D", -"{> c #6767CC", -"]> c #66A4F6", -"^> c #58BDF3", -"/> c #1C263E", -"(> c #4D4D97", -"_> c #8181FA", -":> c #6E95F6", -"<> c #4898CD", -"[> c #2C2955", -"}> c #55A3E1", -"|> c #508ECC", -"1> c #6163C2", -"2> c #7C7AF5", -"3> c #5FB0F5", -"4> c #375A87", -"5> c #5EB3F4", -"6> c #375684", -"7> c #3D3D79", -"8> c #7874ED", -"9> c #6B9FF6", -"0> c #44609C", -"a> c #5151A1", -"b> c #5DB5F5", -"c> c #59BCF5", -"d> c #1F2B46", -"e> c #7883F3", -"f> c #58BCF4", -"g> c #59B8F2", -"h> c #1F2849", -"i> c #6464C8", -"j> c #7D86F7", -"k> c #5B8CDA", -"l> c #7390F6", -"m> c #4C9BD1", -"n> c #31305F", -"o> c #8183FA", -"p> c #6E9DF5", -"q> c #477EB5", -"r> c #343465", -"s> c #7170DF", -"t> c #6C9DF4", -"u> c #56B7EF", -"v> c #181D37", -"w> c #5958AF", -"x> c #778DF8", -"y> c #4DA0D5", -"z> c #32305F", -"A> c #5E7ED2", -"B> c #4C82BF", -"C> c #6463C3", -"D> c #7D7DF6", -"E> c #66A4F5", -"F> c #3B6393", -"G> c #46468A", -"H> c #5FB4F5", -"I> c #384274", -"J> c #4B4B96", -"K> c #7C7AF4", -"L> c #6E99F7", -"M> c #4D68AC", -"N> c #5354A4", -"O> c #7D88FA", -"P> c #59BDF6", -"Q> c #58BEF5", -"R> c #1D2B47", -"S> c #7A82F7", -"T> c #5ABDF4", -"U> c #56BEF4", -"V> c #273A5A", -"W> c #5A58AF", -"X> c #7D87F8", -"Y> c #6186DB", -"Z> c #5657AB", -"`> c #7878EE", -" , c #7C85F7", -"., c #54A3DB", -"+, c #3A3770", -"@, c #6DA2F6", -"#, c #4D6EAE", -"$, c #424181", -"%, c #7297F7", -"&, c #55ABDF", -"*, c #232347", -"=, c #6363C4", -"-, c #7C84F8", -";, c #54A4DC", -">, c #3B3872", -",, c #696DD5", -"', c #61B6F5", -"), c #5DC1F4", -"!, c #4B7AB6", -"~, c #729AF8", -"{, c #446FA6", -"], c #4B4991", -"^, c #60B3F4", -"/, c #3C3D77", -"(, c #5C5BB6", -"_, c #7E7DF9", -":, c #7491F6", -"<, c #5472BC", -"[, c #5858B1", -"}, c #7893F8", -"|, c #5DC4F3", -"1, c #5DC4F4", -"2, c #1D2B46", -"3, c #7A83F5", -"4, c #5DC2F3", -"5, c #5CC3F5", -"6, c #2F5474", -"7, c #7C87F9", -"8, c #6783DD", -"9, c #5E5EBC", -"0, c #60A2E4", -"a, c #464384", -"b, c #70A1F7", -"c, c #5061A9", -"d, c #52529F", -"e, c #7891F7", -"f, c #559BCE", -"g, c #302F60", -"h, c #6B6BD4", -"i, c #7E81F9", -"j, c #62A2E7", -"k, c #474387", -"l, c #716EDE", -"m, c #7198F5", -"n, c #5FC6F2", -"o, c #60C3F2", -"p, c #4D70AF", -"q, c #6A6BD4", -"r, c #7890F8", -"s, c #547BBC", -"t, c #524F9E", -"u, c #63A6EC", -"v, c #47458A", -"w, c #6667CD", -"x, c #7F7FFB", -"y, c #7B8AF5", -"z, c #5E7CD0", -"A, c #73A1F7", -"B, c #60C5F3", -"C, c #60C6F1", -"D, c #7A84F6", -"E, c #60C5F4", -"F, c #60C4F5", -"G, c #3B6F95", -"H, c #404080", -"I, c #7978EF", -"J, c #7B88F9", -"K, c #6C7EDF", -"L, c #6565CA", -"M, c #8180FC", -"N, c #6B9EEA", -"O, c #52509F", -"P, c #7070DF", -"Q, c #749EF9", -"R, c #585DB0", -"S, c #6060BF", -"T, c #7C87F7", -"U, c #5C95CE", -"V, c #7271E3", -"W, c #6C9AEA", -"X, c #5454A6", -"Y, c #7172E0", -"Z, c #7B7EF6", -"`, c #68C6F5", -" ' c #66CFF8", -".' c #66CBF3", -"+' c #4F6AAD", -"@' c #6E6FDC", -"#' c #7D84F9", -"$' c #5E86CC", -"%' c #5758AF", -"&' c #6A99E6", -"*' c #5453A4", -"=' c #7071DF", -"-' c #7E83F6", -";' c #6884DB", -">' c #6565C6", -",' c #7C8AF9", -"'' c #769FF9", -")' c #6BC3F8", -"!' c #66D0F5", -"~' c #67CFF8", -"{' c #60BEE6", -"]' c #5389BD", -"^' c #6D82E4", -"/' c #807EF9", -"(' c #7E89F9", -"_' c #707CE4", -":' c #8282FD", -"<' c #7391F2", -"[' c #7272E3", -"}' c #7694F7", -"|' c #6264C8", -"1' c #6E6CDA", -"2' c #7E80F8", -"3' c #668ADA", -"4' c #5355A6", -"5' c #7676EB", -"6' c #748EEF", -"7' c #6261C4", -"8' c #7473E6", -"9' c #71A4F6", -"0' c #67D3F9", -"a' c #68D3F9", -"b' c #65C8F1", -"c' c #4D65A7", -"d' c #7371E2", -"e' c #6C88E0", -"f' c #6263C4", -"g' c #718AEA", -"h' c #6261C2", -"i' c #817EF9", -"j' c #7182E7", -"k' c #6D6BD7", -"l' c #7E7BF7", -"m' c #7D8CF9", -"n' c #74A5FA", -"o' c #6DBEF6", -"p' c #6BD1F9", -"q' c #69D3F9", -"r' c #68D2F6", -"s' c #1E2C47", -"t' c #5654A8", -"u' c #7B85F5", -"v' c #6AD3F9", -"w' c #6AD2F9", -"x' c #68C3F6", -"y' c #6CA7EE", -"z' c #748AF0", -"A' c #7D7AF1", -"B' c #7D85FA", -"C' c #757AEA", -"D' c #7372E5", -"E' c #6F6EDB", -"F' c #7B87F8", -"G' c #6D6EDC", -"H' c #7675EB", -"I' c #7F81F9", -"J' c #727EE7", -"K' c #7A85F5", -"L' c #7877EF", -"M' c #7D81F8", -"N' c #6BC4F6", -"O' c #63C1E9", -"P' c #5FC0E6", -"Q' c #5CB1D8", -"R' c #4F5CA7", -"S' c #7676E9", -"T' c #767EEE", -"U' c #6F6FDE", -"V' c #7980F2", -"W' c #6F6FDD", -"X' c #7686F4", -"Y' c #6F99EF", -"Z' c #6EB8F6", -"`' c #68C3F4", -" ) c #66C3EE", -".) c #61C2EA", -"+) c #5FC1E6", -"@) c #5FC0E5", -"#) c #5EBFE5", -"$) c #61C0E5", -"%) c #202B47", -"&) c #5755AC", -"*) c #7985F6", -"=) c #6BC8F6", -"-) c #64C1EB", -";) c #62BFE7", -">) c #62BEE5", -",) c #5EC0E5", -"') c #60C1E7", -")) c #62B6E7", -"!) c #689BE8", -"~) c #7582EF", -"{) c #7B78F3", -"]) c #7D7BF5", -"^) c #7D7CF7", -"/) c #424382", -"() c #303163", -"_) c #303263", -":) c #414487", -"<) c #7E7CF8", -"[) c #7F7CFA", -"}) c #6565C7", -"|) c #4D4F9B", -"1) c #3C3E7A", -"2) c #35366B", -"3) c #313263", -"4) c #303162", -"5) c #2E305F", -"6) c #39396F", -"7) c #6664C9", -"8) c #7D79F7", -"9) c #3F4181", -"0) c #2F3162", -"a) c #323367", -"b) c #383972", -"c) c #47468D", -"d) c #5A5DB7", -"e) c #7071E1", -"f) c #7C7CF7", -"g) c #7D7EF9", -"h) c #7775ED", -"i) c #7574E9", -"j) c #7C7AF6", -"k) c #7876EE", -"l) c #7574E7", -"m) c #7775EA", -"n) c #7473E8", -"o) c #7674E9", -". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + ", -"$ % & * = + + - - - - - - - - - - - - - - - - - ; > , ' ) ! ~ { ] ] ^ / ( _ : - - - - < [ } | ) - - - - - - - - - - - - - - - - - - = 1 2 3 4 . - - - - - - - - - - - - - - - - - - - - - - 5 6 7 8 9 0 ", -"a b c d e + ; . . . . . . . . . . . . . + + . + f g h i j k l m n n n o p q @ . . . . r s t u _ + ) + . . . . . . . . . . . . . : ) v w x y z . . . . . . . . . . . . . . . . . . . . . . . A B C D E F ", -"+ G H I J K L + + + + + + + + + + + + + + + M N O P Q R S + T U U U U V W X Y + + + + Z ` ...+.@.) + + + + + + + + + + + + + + #.$.%.&.*.=.-.. + + + + + + + + + + + + + + + + + + + + + + ;.>.,.'.).!.", -". ~.{.].^./.(.0 . + + + + + + + + + + . _.:.<.].[.}.|.1.2.+ 3.4.].].].5.6.7.Y + + + + ; 8.9.0.a.b.c.d.) + + + + + + + + + + #.e.f.g.].h.i.j.k.. + + + + + + + + + + + + + + + + + + + + + + l.m.n.o.p.q.", -". r.s.t.u.v.w.x.y.+ - + + + + + + z.+ $ A.B.C.D.E.F.G.H.I.+ J.K.D.D.D.L.M.N.Y + + + + O.P.Q.D.D.R.S.T.U.+ + + + + + + + I.; V.W.X.v.D.Y.Z.`.4 . + + + + + + + + + + + + + + + + + + + + + + +Q..+++@+#+", -". $+%+&+*+*+=+-+;+>+d.) . . . . . : ,+'+=+*+*+*+)+!+~+{++ . 2.]+*+*+*+^+/+7.Y . . . . + (+_+*+*+*+:+<+[+}+@ . . . . . ) k |+1+2+*+*+*+3+4+5+4 . . . . . . . . . . . . . . . . . . . . . . . 6+7+:+8+9+{+", -". k 0+a+a+a+b+c+d+e+f+| ) + . . ) g+h+i+a+a+a+a+j+k+l+, + . r m+a+a+a+n+o+7.Y . . . . . p+q+a+a+a+a+r+s+t+u+v+) . I.+ L w+x+i+x+a+a+y+z+A+B+L . . . . . . . . . . . . . . . . . . . . . . . C+D+E+F+G+H+", -". + I+J+K+K+K+K+L+M+N+O+P++ + . Q+R+S+K+K+K+K+K+T+U+V+W+I.. - X+K+K+K+Y+M.7.Y . . . . . d.Z+J+K+K+K+K+`+ @.@+@' . ; @@#@$@K+K+K+K+%@&@*@=@-@) . . . . . . . . . . . . . . . . . . . . . . . ;@>@,@'@)@W+", -"I.; !@~@{@{@{@{@{@]@^@/@(@_@4 :@<@{@{@{@{@{@{@{@[@}@|@@ + . . 1@2@3@{@4@5@7.Y I.+ + . . $ 6@7@{@{@{@{@{@]@8@9@0@a@b@c@3@d@{@{@{@{@d@e@f@g@}+h@. . . I.I.I.I.I.I.I.I.I.I.I.I.. . . . I.I.I.I.i@j@k@l@m@# ", -"+ z.n@o@p@q@r@s@s@t@q@u@v@w@x@s@q@y@z@q@A@q@t@t@B@C@D@E@F@G@G@H@I@s@q@J@K@N.Y ; L@F@G@M@N@O@P@q@Q@R@p@q@q@S@T@U@V@W@X@q@q@Y@Z@`@q@t@ #.#+#@###0 $#L z.I.I.. + + + + + + %#&###0 # : + . + + i@t@*#=#-## ", -"+ ;#>#,#'#)#!#~#{#)#)#)#]#^#]#)#)#/#(#_#:#)#<#(#[#}#|#1#1#1#2#3#4#5#)#6#7#7.4 8#9#<#1#0#a#b#c#)#(#d#e#f#g#)#)#)#h#i#)#)#)#j#k#l#)#X@m#n#o#1#p#q#r#s#t#u#U.@ @ . + + + v#w#x#y#z#A#B#+ + + + C#D#E#F#G#@ ", -"+ . d.H#I#J#K#L#M#N#O#P#Q#J#Q#J#R#S#T#U#V#J#J#W#X#Y#Z#`#Q#Q# $.$+$@$J##$$$7.%$&$*$@$=$-$;$>$,$J#'$)$!$~${$]$P#J#@$@$]$P#^$/$($_$J#@$:$<$Q#[$*$]$}$@$I#|$1$2$3$4$, ,+k 5$6$7$8$9$0$a$b$. + + c$I#d$e$f$d.", -"+ . . g$h$i$j$k$l$m$n$o$p$i$i$i$q$r$s$t$u$i$v$w$x$y$z$p$i$i$A$B$C$D$i$E$$$N.F$G$i$H$I$J$K$3 L$i$M$N$O$P$Q$R$S$i$i$i$T$U$V$W$X$Y$i$T$Z$`$ %D$.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%. + c$i$_%:%<%) ", -"- - - [%}%}%|%1%2%3%4%5%6%}%7%8%9%0%a%/%b%}%c%d%e%f%g%h%}%}%i%j%k%l%}%m%n%o%p%q%r%s%t%u%v%@ w%x%y%z%A%B%q.C%D%E%F%G%H%I%J%K%} L%}%M%N%O%P%x%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&=&c.-&- ;&>&,&'&)&- ", -". . . !&~&{&]&n%^&@ /&(&_&:&<&[&}&|&1&2&3&{&4&5&6&7&8&9&0&4&a&b&c&~&{&d&e&f&g&h&i&j&k&l&@ : m&n&o&p&A%B%q&r&s&t&u&v&w&x&y&z&A&B&{&C&D&E&F&{&G&H&$&H+I&' ' J&$#K&L&M&N&O&P&Q&l&k.R&S&T&U&V&d.W&X&Y&Z&`&; ", -". . . K& *.*+*@*#*2.+ W+$*%*&***=*-.+ ; -*.*;*>*,*'*)*!*~*{*]*G.1&^*.*/*(*_*:*<*[*}*q | . . |*1*2*3*A%B%;#+ 4*5*6*7*8*9*4 + A&0*.*a*b*c*d*e*f*g*h*i*. + . . . . j*k*l*m*n*o*p*q*4 <%r*s*t*u*v*w*x*y*h*; ", -". . . d.z*A*B*C*5*2.+ . d.1&D*R&E*+ . F*G*A*H*I*J*k.K*L*M*N*O*P*Q*R*A*S*T*U*V*W*X*Y*E*+ . . Z*`* =.=A%B%z.+ ) 4 +=@=`&+ . + #=$=%=&=*===-=;=>=,=-.) . + + . . . '=)=h !=~={=]=q*) L ^=/=(=_=:=<=[=}=/&. ", -"+ + + A&|=1=2=3=^&2.+ + . d.| L . . + 4=5=1=6=7=8=E*9=0=a=b=c=d=& e=1=f=g=h=i=j=k=l=+ + + + b$m=n=o=A%B%z.+ + + L p=z.) + + A&q=a=r=s=t=u=v=w=,=-.+ + + + + z.) x=y=z=A=B=C=D=E=+ ) L F=G=H=I=J=K=L=' ) ", -"+ + + : M=N=O=1%^&2.+ + + + + + + + + O.P=N=Q=R=S=@ T=U=V=W=X=Y=J&Z=`= -.-+-@-#-$--&+ + + + %-&-*-=---B%;#+ + + + + + + + + A&;->-,-'-^=)-!-~-{--.+ + + + + . ; ]-^-/-Z*(-_-:-<-+ + + + & [-}-|-1-2-$#- ", -"+ + + . 3-4-5-6-#*@ + + + + + + + + + #.7-8-9-j=0-k a-b-b-c-d-e-4 f-8-g-h-i-j-k-) ) + + + + l-m-n-o-p-.&;#+ + + + + + + + + A&q-r-s-t-F=u-v-w-x--.- + + + + ; y-z-A-B-C-D-E-k&#++ + + + + E*F-G-H-I-4 . ", -"+ + + . J-K-L-M-N-@ + + + + + + + + + ; O-P-Q-R-S-l-T-U-V-W-X-Y-@ Z-`- ;.;U%-@+;+ + + + + + I.@;#;$;p-%;z.+ + + + + + + + + r &;*;=;-;H+4 ;;>;,=-.+ + + + + O.,;';);!;Z*~;{;R-l&+ + + + . . ];^;/;(;# . ", -". . . . _;:;<;[;N-2.. . . . . . . . . . };|;1;2;y.; 3;4;5;6;7;8;+ d.9;0;a;b;c;j . . . . . . I.d;e;f;g;$&;#. . . . . . . . . @ h;i;j;k;# S l;m;n;-.. . . . . o;p;q;r;s;t;u;v;w;B+@ + . . . . x;y;z;R 2.. ", -". . . + S A;B;C;#*2.. . . . . . . . . . D;E;F;Y%0 ; G;H;I;J;K;B%. z.L;M;N;O;P;h*L ) . . . . ) Q;R;S;T;$&;#. . . . . . . . . @ U;V;W;X;+ l-Y;Z;`; >- . . . . ; .>+>@>#>t;$>%>3=&># . . . . . *>=>->B++ + ", -". . . . ;>>>,>'>N-2.. . . . . . . . . ) )>!>~>{># . + ]>^>/>(>-.. _>:><>[>}>|>1>2>) . . . . I.@ 3>4>T;$&;#. . . . . . . . . 2.5>6>7>8>) z.9>0>a> >I.. . . . ;>b>c>d>#>e>f>g>h>i># . . . . . j>k>9+!.+ + ", -". . . . ;#l>m>n>N-2.. . . . . . . . . o>p>q>r>s>+ . . t>u>v>w>J&. ;#x>y>z>A>^>B>C>D>. . . . . + E>F>G>'*;#. . . . . . . . . (%H>I>J>K>; $ L>M>N>-.. . . . . O>P>Q>R>s;S>T>U>V>W>E*+ . . . . X>Y>Z>`>+ . ", -"I.I.I.I.) ,.,+,^&2.I.I.I.I.I.I.I.I.I.- @,#,$,!.. + + %,&,*,=,E=I.+ -,;,>,,,',),!,!%<-: . I.+ . ~,{,],'*z.I.I.I.I.I.I.I.I.I.d.^,/,(,_,+ O.:,<,[, >. I.I.I.I.},|,1,2,s;3,4,5,6,P*h*) I.I.I.I.7,8,9,r&+ . ", -"+ + + + z.| 0,a,#*2.+ + + + + + + + + i*b,c,d,z + + + e,f,g,h,Y + - i,j,k,l,m,n,o,p,q,H+. + + + r,s,t,Q*z.+ + + + + + + + + d.u,v,w,x,+ : y,z,9,-.- + + + + A,B,C,2,#>D,E,F,G,H,I,-&+ + + + J,K,L,-.+ + ", -"+ + + + ) M,N,O,P,@ + + + + + + + + + . Q,R,S,P++ + + T,U,H,V,+ + . + W,X,Y,Z,`, '.'+'@'$#. + + #'$'%''*;#+ + + + + + + + + d.&'*'='+ + : -';'>'P+_>- $ ,''')' '!'R>#>D,~' '{']'^'@./'I.I.+ ('_'==, . . ", -"+ + + + z.:'<'`.['d.+ + + + + + + + + z.}'|'1'$#+ + + 2'3'4'5'. + . + 6'7'8'z&9'0'a'b'c'd'# ) + 4 e'f'`&z.+ + + + + + + + + (%g'h'F + + ; i'j'k'l'm'n'o'p'q'q'q'r's't'u'v'a'q'a'w'x'y'z'A'I&B'C'D'W++ + ", -"+ + + + . . u'E'-@d.+ + + + + + + + + ) F'G'H'/'+ + + I'J'w,h*+ + + + K's>L'$+M'N'O'P'Q'R'S'd.+ $+T'U'k.+ + + + + + + + + + ; V'W'F=+ + . ) X'Y'Z'`' ).)+)+)@)#)$)%)&)*)=)-);)>)#),)+)')))!)~)V&@.p=+ + ", -". . . . . . E={)F=_>. . . . . . . . . - # }+P+) . . . ) ])V&E*+ . . . | F=^); b$^&/)()_):)N.$#. . <)2>W+. . . . . . . . . . z./&-.4 + . . I.[)<%})|)1)2)3)4)4)4)5)6)7)8)R 9)0)0)4)4)_)a)b)c)d)e)f)+ . . ", -". . . . . . ) /'@ . . . . . . . . . . + z.q*d.+ . . . . @ q*) . . . . + @ @ . . g)h)i)/%<%j)_>. . ) /'. + . . . . . . . . . . + + + . . . . M,<)k)9*8'l)i l)l)l)i 9*} + /&m)n)l)l)l)l)i)n)o)l&3 # . . . "};
--- a/Plugins/Input/mikmod/plugin.c Sat Dec 10 13:54:12 2005 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,700 +0,0 @@ -/* - libmikmod for xmms - - Modified mikmod lib 2/1/99 for xmms by J. Nick Koston (BlueDraco) - - Current Version 0.9.9 - - Changes: (1) 2/1/99 Inital Build / Release - (2) 2/2/99 Psychotron fixed a small problem w/interfacing - (3) 2/2/99 Shows Channels in spectrum analyzer - (4) 2/2/99 Fixed the infinate loop problem, and the absured channel - value problem, removed the mikmod_going stuff - (5) 2/2/99 Added back in mikmod_going (it is needed) - (6) 2/2/99 Repaired SEGV on playlist goes to next song, bad - printf when the mod cannot be loaded and xmms is in repeat mode. - Also made the absured channel display code work - (7) 2/5/99 Removed some old useless stuff - (8) 2/5/99 Added about -- (doesn't work .. not in xmms yet) - (9) 2/8/99 Added configure -- (about and configure work now w/a2) - - */ - -#include "glib/gi18n.h" -#include "mikmod-plugin.h" -#include "libaudacious/configfile.h" -#include "libaudacious/util.h" -#include "libaudacious/titlestring.h" -#include <gtk/gtk.h> - -#include "mikmod.xpm" - -static void init(void); -static int is_our_file(char *filename); -extern InputPlugin mikmod_ip; -static void play_file(char *filename); -static int get_time(void); -static void stop(void); -static void *play_loop(void *arg); -static void mod_pause(short p); -static void seek(int time); -static void aboutbox(void); -static void get_song_info(char *filename, char **title, int *length); -static void configure(); -static void config_ok(GtkWidget * widget, gpointer data); - -static GThread *decode_thread; - -MIKMODConfig mikmod_cfg; -extern gboolean mikmod_xmms_audio_error; - -/* current module */ -static MODULE *mf = NULL; - -/* module parameters */ -static gboolean cfg_extspd = 1; /* Extended Speed enable */ -static gboolean cfg_panning = 1; /* DMP panning enable (8xx effects) */ -static gboolean cfg_wrap = 0; /* auto song-wrapping disable */ -static gboolean cfg_loop = 0; /* allow module to loop */ -gboolean mikmod_going = 1; - -static GtkWidget *Res_16, *Res_8, *Chan_ST, *Chan_MO; - -static GtkWidget *Sample_44, *Sample_22, *Sample_11, *Curious_Check, *Surrond_Check, *Fadeout_Check, *Interp_Check; - -static GtkObject *pansep_adj; - -static GtkWidget *mikmod_conf_window = NULL, *about_window = NULL; - -static void *play_loop(void *arg); -static void config_ok(GtkWidget * widget, gpointer data); - -static void aboutbox() -{ - GtkWidget *dialog_vbox1; - GtkWidget *hbox1; - GtkWidget *label1; - GtkWidget *dialog_action_area1; - GtkWidget *about_exit; - GtkWidget *pixmapwid; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!about_window) - { - about_window = gtk_dialog_new(); - gtk_object_set_data(GTK_OBJECT(about_window), "about_window", about_window); - gtk_window_set_title(GTK_WINDOW(about_window), _("About mikmod plugin")); - gtk_window_set_policy(GTK_WINDOW(about_window), FALSE, FALSE, FALSE); - gtk_window_set_position(GTK_WINDOW(about_window), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(about_window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_window); - gtk_container_border_width(GTK_CONTAINER(about_window), 10); - - dialog_vbox1 = GTK_DIALOG(about_window)->vbox; - gtk_object_set_data(GTK_OBJECT(about_window), "dialog_vbox1", dialog_vbox1); - gtk_widget_show(dialog_vbox1); - gtk_container_border_width(GTK_CONTAINER(dialog_vbox1), 5); - - hbox1 = gtk_hbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(about_window), "hbox1", hbox1); - gtk_widget_show(hbox1); - gtk_box_pack_start(GTK_BOX(dialog_vbox1), hbox1, TRUE, TRUE, 0); - gtk_container_border_width(GTK_CONTAINER(hbox1), 5); - gtk_widget_realize(about_window); - - pixmap = gdk_pixmap_create_from_xpm_d(about_window->window, &mask, NULL, mikmod_xpm); - pixmapwid = gtk_pixmap_new(pixmap, mask); - - gtk_widget_show(pixmapwid); - gtk_box_pack_start(GTK_BOX(hbox1), pixmapwid, TRUE, TRUE, 0); - - label1 = gtk_label_new(_("Mikmod Plugin\nhttp://www.multimania.com/miodrag/mikmod/\nPorted to xmms by J. Nick Koston")); - gtk_object_set_data(GTK_OBJECT(about_window), "label1", label1); - gtk_widget_show(label1); - gtk_box_pack_start(GTK_BOX(hbox1), label1, TRUE, TRUE, 0); - - dialog_action_area1 = GTK_DIALOG(about_window)->action_area; - gtk_object_set_data(GTK_OBJECT(about_window), "dialog_action_area1", dialog_action_area1); - gtk_widget_show(dialog_action_area1); - gtk_container_border_width(GTK_CONTAINER(dialog_action_area1), 10); - - about_exit = gtk_button_new_with_label(_("Ok")); - gtk_signal_connect_object(GTK_OBJECT(about_exit), "clicked", - GTK_SIGNAL_FUNC - (gtk_widget_destroy), - GTK_OBJECT(about_window)); - - gtk_object_set_data(GTK_OBJECT(about_window), "about_exit", about_exit); - gtk_widget_show(about_exit); - gtk_box_pack_start(GTK_BOX(dialog_action_area1), about_exit, TRUE, TRUE, 0); - - gtk_widget_show(about_window); - } - else - { - gdk_window_raise(about_window->window); - } - -} - -static void stop(void) -{ - if (mikmod_going) - { - mikmod_going = 0; - g_thread_join(decode_thread); - } -} - -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; -} - -static void mod_pause(short p) -{ - mikmod_ip.output->pause(p); -} - -static int get_time(void) -{ - if (mikmod_xmms_audio_error) - return -2; - if (!mikmod_going) - return -1; - if(!Player_Active() && !mikmod_ip.output->buffer_playing()) - return -1; - return mikmod_ip.output->output_time(); -} - -InputPlugin *get_iplugin_info(void) -{ - mikmod_ip.description = g_strdup_printf(_("MikMod Player %s"), VERSION); - return &mikmod_ip; -} - -static void init(void) -{ - - ConfigFile *cfg; - - md_device = 0; /* standard device: autodetect */ - md_reverb = 0; /* Reverb (max 15) */ - - mikmod_cfg.mixing_freq = SAMPLE_FREQ_44; - mikmod_cfg.volumefadeout = 0; - mikmod_cfg.surround = 0; - mikmod_cfg.force8bit = 0; - mikmod_cfg.hidden_patterns = 0; - mikmod_cfg.force_mono = 0; - mikmod_cfg.interpolation = TRUE; - mikmod_cfg.def_pansep = 64; - - if ((cfg = xmms_cfg_open_default_file()) != NULL) - { - xmms_cfg_read_int(cfg, "MIKMOD", "mixing_freq", &mikmod_cfg.mixing_freq); - xmms_cfg_read_int(cfg, "MIKMOD", "volumefadeout", &mikmod_cfg.volumefadeout); - xmms_cfg_read_int(cfg, "MIKMOD", "surround", &mikmod_cfg.surround); - xmms_cfg_read_int(cfg, "MIKMOD", "force8bit", &mikmod_cfg.force8bit); - xmms_cfg_read_int(cfg, "MIKMOD", "hidden_patterns", &mikmod_cfg.hidden_patterns); - xmms_cfg_read_int(cfg, "MIKMOD", "force_mono", &mikmod_cfg.force_mono); - xmms_cfg_read_int(cfg, "MIKMOD", "interpolation", &mikmod_cfg.interpolation); - - xmms_cfg_read_int(cfg, "MIKMOD", "default_panning", &mikmod_cfg.def_pansep); - xmms_cfg_free(cfg); - } - MikMod_RegisterAllLoaders(); - MikMod_RegisterDriver(&drv_xmms); -} - -static int is_our_file(char *filename) -{ - char *ext, *tmp; - - tmp = strrchr(filename, '/'); - ext = strrchr(filename, '.'); - - if (ext) - { - if (!strcasecmp(ext, ".669")) - return 1; - if (!strcasecmp(ext, ".amf")) - return 1; - if (!strcasecmp(ext, ".dsm")) - return 1; - if (!strcasecmp(ext, ".far")) - return 1; - if (!strcasecmp(ext, ".it")) - return 1; - if (!strcasecmp(ext, ".m15")) - return 1; - if (!strcasecmp(ext, ".med")) - return 1; - if (!strcasecmp(ext, ".mod")) - return 1; - if (!strcasecmp(ext, ".mtm")) - return 1; - if (!strcasecmp(ext, ".s3m")) - return 1; - if (!strcasecmp(ext, ".stm")) - return 1; - if (!strcasecmp(ext, ".ult")) - return 1; - if (!strcasecmp(ext, ".xm")) - return 1; - if (!strcasecmp(ext, ".imf")) - return 1; - if (!strcasecmp(ext, ".gdm")) - return 1; - if (!strcasecmp(ext, ".stx")) - return 1; - } - - if (tmp) - { - if(!strncasecmp("/mod.", tmp, 5)) - return 1; - } - - return 0; -} - -static gchar *get_title(gchar *filename) -{ - TitleInput *input; - gchar *temp, *ext, *title; - - if((temp = Player_LoadTitle(filename)) != NULL) - title = g_strdup(temp); - else - { - XMMS_NEW_TITLEINPUT(input); - - temp = g_strdup(filename); - ext = strrchr(temp, '.'); - if (ext) - *ext = '\0'; - input->file_name = g_path_get_basename(temp); - input->file_ext = ext ? ext+1 : NULL; - input->file_path = temp; - - title = xmms_get_titlestring(xmms_get_gentitle_format(), - input); - if ( title == NULL ) - title = g_strdup(input->file_name); - - g_free(temp); - g_free(input); - } - - return title; -} - -static void get_song_info(char *filename, char **title, int *length) -{ - (*title) = get_title(filename); - (*length) = -1; -} - -static void play_file(char *filename) -{ - int cfg_maxchn = 128; - int uservolume = 128; - int channelcnt = 1; - int format = FMT_U8; - FILE *f; - - if(!(f = fopen(filename,"rb"))) - { - mikmod_going = 0; - return; - } - fclose(f); - - mikmod_xmms_audio_error = FALSE; - mikmod_going = 1; - - switch (mikmod_cfg.mixing_freq) - { - case SAMPLE_FREQ_22: - md_mixfreq = 22050; /* 1:2 mixing freq */ - break; - case SAMPLE_FREQ_11: - md_mixfreq = 11025; /* 1:4 mixing freq */ - break; - default: - md_mixfreq = 44100; /* standard mixing freq */ - break; - } - - md_mode = DMODE_SOFT_MUSIC; - if ((mikmod_cfg.surround == 1)) - { - md_mode |= DMODE_SURROUND; - } - if ((mikmod_cfg.force8bit == 0)) - { - format = FMT_S16_NE; - md_mode |= DMODE_16BITS; - } - if ((mikmod_cfg.force_mono == 0)) - { - channelcnt = DMODE_STEREO; - md_mode |= DMODE_STEREO; - } - if ((mikmod_cfg.interpolation == 1)) - { - md_mode |= DMODE_INTERP; - } - md_pansep = mikmod_cfg.def_pansep; - -#if (LIBMIKMOD_VERSION > 0x30106) - MikMod_Init(""); -#else - MikMod_Init(); -#endif - if (!(mf = Player_Load(filename, cfg_maxchn, mikmod_cfg.hidden_patterns))) - { - mikmod_ip.set_info_text(_("Couldn't load mod")); - mikmod_going = 0; - return; - } - mf->extspd = cfg_extspd; - mf->panflag = cfg_panning; - mf->wrap = cfg_wrap; - mf->loop = cfg_loop; - mf->fadeout = mikmod_cfg.volumefadeout; - - Player_Start(mf); - - if (mf->volume > uservolume) - Player_SetVolume(uservolume); - -/* mods are in pattrens .. you need to be able to seek - back the forth from pattrens */ - - mikmod_ip.set_info(mf->songname, -1, ((mf->bpm * 1000)), md_mixfreq, channelcnt); - decode_thread = g_thread_create((GThreadFunc)play_loop, NULL, TRUE, NULL); - return; - -} - -static void *play_loop(void *arg) -{ - while (mikmod_going) - { - if (Player_Active()) - drv_xmms.Update(); - else - { - xmms_usleep(10000); - } - - } - Player_Stop(); /* stop playing */ - Player_Free(mf); /* and free the module */ - - mikmod_going = 0; - MikMod_Exit(); - g_thread_exit(NULL); - return(NULL); -} - -static void configure() -{ - GtkWidget *notebook1, *vbox, *vbox1, *hbox1, *Resolution_Frame, *vbox4; - GSList *resolution_group = NULL, *vbox5_group = NULL; - GtkWidget *Channels_Frame, *vbox5, *Downsample_Frame, *vbox3; - GSList *sample_group = NULL; - GtkWidget *vbox6, *Quality_Label, *Options_Label; - GtkWidget *pansep_label, *pansep_hscale; - GtkWidget *bbox, *ok, *cancel; - - if (!mikmod_conf_window) - { - mikmod_conf_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "mikmod_conf_window", mikmod_conf_window); - gtk_window_set_title(GTK_WINDOW(mikmod_conf_window), _("MikMod Configuration")); - gtk_window_set_policy(GTK_WINDOW(mikmod_conf_window), FALSE, FALSE, FALSE); - gtk_window_set_position(GTK_WINDOW(mikmod_conf_window), GTK_WIN_POS_MOUSE); - gtk_signal_connect(GTK_OBJECT(mikmod_conf_window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &mikmod_conf_window); - gtk_container_border_width(GTK_CONTAINER(mikmod_conf_window), 10); - - vbox = gtk_vbox_new(FALSE, 10); - gtk_container_add(GTK_CONTAINER(mikmod_conf_window), vbox); - - notebook1 = gtk_notebook_new(); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "notebook1", notebook1); - gtk_widget_show(notebook1); - gtk_box_pack_start(GTK_BOX(vbox), notebook1, TRUE, TRUE, 0); - gtk_container_border_width(GTK_CONTAINER(notebook1), 3); - - vbox1 = gtk_vbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "vbox1", vbox1); - gtk_widget_show(vbox1); - - hbox1 = gtk_hbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "hbox1", hbox1); - gtk_widget_show(hbox1); - gtk_box_pack_start(GTK_BOX(vbox1), hbox1, TRUE, TRUE, 0); - - Resolution_Frame = gtk_frame_new(_("Resolution:")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Resolution_Frame", Resolution_Frame); - gtk_widget_show(Resolution_Frame); - gtk_box_pack_start(GTK_BOX(hbox1), Resolution_Frame, TRUE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(Resolution_Frame), 5); - - vbox4 = gtk_vbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "vbox4", vbox4); - gtk_widget_show(vbox4); - gtk_container_add(GTK_CONTAINER(Resolution_Frame), vbox4); - - Res_16 = gtk_radio_button_new_with_label(resolution_group, _("16 bit")); - resolution_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Res_16)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Res_16", Res_16); - gtk_widget_show(Res_16); - gtk_box_pack_start(GTK_BOX(vbox4), Res_16, TRUE, TRUE, 0); - if (mikmod_cfg.force8bit == 0) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Res_16), TRUE); - - Res_8 = gtk_radio_button_new_with_label(resolution_group, _("8 bit")); - resolution_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Res_8)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Res_8", Res_8); - gtk_widget_show(Res_8); - gtk_box_pack_start(GTK_BOX(vbox4), Res_8, TRUE, TRUE, 0); - if (mikmod_cfg.force8bit == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Res_8), TRUE); - - Channels_Frame = gtk_frame_new(_("Channels:")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Channels_Frame", Channels_Frame); - gtk_widget_show(Channels_Frame); - gtk_box_pack_start(GTK_BOX(hbox1), Channels_Frame, TRUE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(Channels_Frame), 5); - - vbox5 = gtk_vbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "vbox5", vbox5); - gtk_widget_show(vbox5); - gtk_container_add(GTK_CONTAINER(Channels_Frame), vbox5); - - Chan_ST = gtk_radio_button_new_with_label(vbox5_group, _("Stereo")); - vbox5_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Chan_ST)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Chan_ST", Chan_ST); - gtk_widget_show(Chan_ST); - gtk_box_pack_start(GTK_BOX(vbox5), Chan_ST, TRUE, TRUE, 0); - if (mikmod_cfg.force_mono == 0) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Chan_ST), TRUE); - - Chan_MO = gtk_radio_button_new_with_label(vbox5_group, _("Mono")); - vbox5_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Chan_MO)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Chan_MO", Chan_MO); - gtk_widget_show(Chan_MO); - gtk_box_pack_start(GTK_BOX(vbox5), Chan_MO, TRUE, TRUE, 0); - if (mikmod_cfg.force_mono == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Chan_MO), TRUE); - - Downsample_Frame = gtk_frame_new(_("Downsample:")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Downsample_Frame", Downsample_Frame); - gtk_widget_show(Downsample_Frame); - gtk_box_pack_start(GTK_BOX(vbox1), Downsample_Frame, TRUE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(Downsample_Frame), 5); - - vbox3 = gtk_vbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "vbox3", vbox3); - gtk_widget_show(vbox3); - gtk_container_add(GTK_CONTAINER(Downsample_Frame), vbox3); - - Sample_44 = gtk_radio_button_new_with_label(sample_group, _("1:1 (44 kHz)")); - sample_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Sample_44)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Sample_44", Sample_44); - gtk_widget_show(Sample_44); - gtk_box_pack_start(GTK_BOX(vbox3), Sample_44, TRUE, TRUE, 0); - - if (mikmod_cfg.mixing_freq == SAMPLE_FREQ_44) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Sample_44), TRUE); - - Sample_22 = gtk_radio_button_new_with_label(sample_group, _("1:2 (22 kHz)")); - sample_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Sample_22)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Sample_22", Sample_22); - gtk_widget_show(Sample_22); - gtk_box_pack_start(GTK_BOX(vbox3), Sample_22, TRUE, TRUE, 0); - if (mikmod_cfg.mixing_freq == SAMPLE_FREQ_22) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Sample_22), TRUE); - - Sample_11 = gtk_radio_button_new_with_label(sample_group, _("1:4 (11 kHz)")); - sample_group = gtk_radio_button_group(GTK_RADIO_BUTTON(Sample_11)); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Sample_11", Sample_11); - gtk_widget_show(Sample_11); - gtk_box_pack_start(GTK_BOX(vbox3), Sample_11, TRUE, TRUE, 0); - if (mikmod_cfg.mixing_freq == SAMPLE_FREQ_11) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Sample_11), TRUE); - - vbox6 = gtk_vbox_new(FALSE, 0); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "vbox6", vbox6); - gtk_widget_show(vbox6); - - Curious_Check = gtk_check_button_new_with_label(_("Look for hidden patterns in modules ")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Curious_Check", Curious_Check); - gtk_widget_show(Curious_Check); - gtk_box_pack_start(GTK_BOX(vbox6), Curious_Check, TRUE, TRUE, 0); - if (mikmod_cfg.hidden_patterns == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Curious_Check), TRUE); - - Surrond_Check = gtk_check_button_new_with_label(_("Use surround mixing")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Surround_Check", Surrond_Check); - gtk_widget_show(Surrond_Check); - gtk_box_pack_start(GTK_BOX(vbox6), Surrond_Check, TRUE, TRUE, 0); - if (mikmod_cfg.surround == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Surrond_Check), TRUE); - - Fadeout_Check = gtk_check_button_new_with_label(_("Force volume fade at the end of the module")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Fadeout_Check", Fadeout_Check); - gtk_widget_show(Fadeout_Check); - gtk_box_pack_start(GTK_BOX(vbox6), Fadeout_Check, TRUE, TRUE, 0); - if (mikmod_cfg.volumefadeout == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Fadeout_Check), TRUE); - - Interp_Check = gtk_check_button_new_with_label(_("Use interpolation")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Interp_Check", Interp_Check); - gtk_widget_show(Interp_Check); - gtk_box_pack_start(GTK_BOX(vbox6), Interp_Check, TRUE, TRUE, 0); - if (mikmod_cfg.interpolation == 1) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Interp_Check), TRUE); - - pansep_label = gtk_label_new(_("Default panning separation")); - gtk_widget_show(pansep_label); - gtk_box_pack_start(GTK_BOX(vbox6), pansep_label, TRUE, TRUE, 0); - - pansep_adj = gtk_adjustment_new(mikmod_cfg.def_pansep, 0.0, 129.0, 1.0, 8.0, 1.0); - pansep_hscale = gtk_hscale_new(GTK_ADJUSTMENT(pansep_adj)); - gtk_scale_set_digits(GTK_SCALE(pansep_hscale), 0); - gtk_scale_set_draw_value(GTK_SCALE(pansep_hscale), TRUE); - gtk_scale_set_value_pos(GTK_SCALE(pansep_hscale), GTK_POS_BOTTOM); - gtk_widget_show(pansep_hscale); - gtk_box_pack_start(GTK_BOX(vbox6), pansep_hscale, TRUE, TRUE, 0); - - Quality_Label = gtk_label_new(_("Quality")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Quality_Label", Quality_Label); - gtk_widget_show(Quality_Label); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook1), vbox1, Quality_Label); - - Options_Label = gtk_label_new(_("Options")); - gtk_object_set_data(GTK_OBJECT(mikmod_conf_window), "Options_Label", Options_Label); - gtk_widget_show(Options_Label); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook1), vbox6, Options_Label); - - bbox = gtk_hbutton_box_new(); - gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); - gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - - ok = gtk_button_new_with_label(_("Ok")); - gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(config_ok), NULL); - GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); - gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); - gtk_widget_show(ok); - gtk_widget_grab_default(ok); - - cancel = gtk_button_new_with_label(_("Cancel")); - gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(mikmod_conf_window)); - GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); - gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); - gtk_widget_show(cancel); - - gtk_widget_show(bbox); - - gtk_widget_show(vbox); - gtk_widget_show(mikmod_conf_window); - } - else - { - gdk_window_raise(mikmod_conf_window->window); - } - -} - -static void config_ok(GtkWidget * widget, gpointer data) -{ - ConfigFile *cfg; - gchar *filename; - - if (GTK_TOGGLE_BUTTON(Res_8)->active) - mikmod_cfg.force8bit = 1; - else - mikmod_cfg.force8bit = 0; - - if (GTK_TOGGLE_BUTTON(Chan_MO)->active) - mikmod_cfg.force_mono = 1; - else - mikmod_cfg.force_mono = 0; - - if (GTK_TOGGLE_BUTTON(Sample_22)->active) - mikmod_cfg.mixing_freq = SAMPLE_FREQ_22; - else if (GTK_TOGGLE_BUTTON(Sample_11)->active) - mikmod_cfg.mixing_freq = SAMPLE_FREQ_11; - else - mikmod_cfg.mixing_freq = SAMPLE_FREQ_44; - - - mikmod_cfg.hidden_patterns = GTK_TOGGLE_BUTTON(Curious_Check)->active; - mikmod_cfg.surround = GTK_TOGGLE_BUTTON(Surrond_Check)->active; - mikmod_cfg.volumefadeout = GTK_TOGGLE_BUTTON(Fadeout_Check)->active; - mikmod_cfg.interpolation = GTK_TOGGLE_BUTTON(Interp_Check)->active; - - mikmod_cfg.def_pansep = (guchar)GTK_ADJUSTMENT(pansep_adj)->value; - md_pansep = mikmod_cfg.def_pansep; - - filename = g_strconcat(g_get_home_dir(), "/.xmms/config", NULL); - cfg = xmms_cfg_open_file(filename); - if (!cfg) - cfg = xmms_cfg_new(); - - xmms_cfg_write_int(cfg, "MIKMOD", "mixing_freq", mikmod_cfg.mixing_freq); - xmms_cfg_write_int(cfg, "MIKMOD", "volumefadeout", mikmod_cfg.volumefadeout); - xmms_cfg_write_int(cfg, "MIKMOD", "surround", mikmod_cfg.surround); - xmms_cfg_write_int(cfg, "MIKMOD", "force8bit", mikmod_cfg.force8bit); - xmms_cfg_write_int(cfg, "MIKMOD", "hidden_patterns", mikmod_cfg.hidden_patterns); - xmms_cfg_write_int(cfg, "MIKMOD", "force_mono", mikmod_cfg.force_mono); - xmms_cfg_write_int(cfg, "MIKMOD", "interpolation", mikmod_cfg.interpolation); - xmms_cfg_write_int(cfg, "MIKMOD", "panning_separation", mikmod_cfg.def_pansep); - - xmms_cfg_write_file(cfg, filename); - xmms_cfg_free(cfg); - g_free(filename); - gtk_widget_destroy(mikmod_conf_window); -} - -InputPlugin mikmod_ip = -{ - NULL, - NULL, - NULL, /* Description */ - init, - aboutbox, - configure, - is_our_file, - NULL, - play_file, - stop, - mod_pause, - seek, - NULL, - get_time, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - get_song_info, - NULL, /* file_info_box */ - NULL -};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/Makefile.am Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,15 @@ +if HAVE_MODPLUG + +lib_LTLIBRARIES = libmodplug.la +SUBDIRS = archive gui + +endif + +libdir = $(plugindir)/$(INPUT_PLUGIN_DIR) + +INCLUDES = @GTK_CFLAGS@ -I.. -I$(top_srcdir) -I$(top_builddir)/intl +libmodplug_la_LDFLAGS = -module -avoid-version -lstdc++ +libmodplug_la_SOURCES = plugin.cpp modplugbmp.cpp +libmodplug_la_LIBADD = ./archive/libarchive.la ./gui/libgui.la -lmodplug $(GTK_LIBS) + +noinst_HEADERS = modplugbmp.h plugin.h stddefs.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/Makefile.am Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,19 @@ +INCLUDES = -I../../.. + +noinst_LTLIBRARIES = libarchive.la +libarchive_la_LDFLAGS = -module -avoid-version +libarchive_la_SOURCES = archive.cpp \ + open.cpp \ + arch_raw.cpp \ + arch_gzip.cpp \ + arch_zip.cpp \ + arch_rar.cpp \ + arch_bz2.cpp + +noinst_HEADERS = archive.h \ + open.h \ + arch_raw.h \ + arch_gzip.h \ + arch_zip.h \ + arch_rar.h \ + arch_bz2.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_bz2.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,85 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * Colin DeVilbiss <crdevilb@mtu.edu> + * + * This source code is public domain. + */ + +// BZ2 support added by Colin DeVilbiss <crdevilb@mtu.edu> + +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdio.h> + +#include "arch_bz2.h" +#include <iostream> + +arch_Bzip2::arch_Bzip2(const string& aFileName) +{ + //check if file exists + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + + if(lFileDesc == -1) + { + mSize = 0; + return; + } + + close(lFileDesc); + + //ok, continue + string lCommand = "bzcat \'" + aFileName + "\' | wc -c"; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + fscanf(f, "%u", &mSize); // this is the size. + + pclose(f); + + mMap = new char[mSize]; + if(mMap == NULL) + { + mSize = 0; + return; + } + + lCommand = "bzcat \'" + aFileName + '\''; //decompress to stdout + popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + fread((char *)mMap, sizeof(char), mSize, f); + + pclose(f); +} + +arch_Bzip2::~arch_Bzip2() +{ + if(mSize != 0) + delete [] (char*)mMap; +} + +bool arch_Bzip2::ContainsMod(const string& aFileName) +{ + string lName; + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + if(lFileDesc == -1) + return false; + + close(lFileDesc); + + lName = aFileName.substr(0, aFileName.find_last_of('.')); + return IsOurFile(lName); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_bz2.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,25 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * Colin DeVilbiss <crdevilb@mtu.edu> + * + * This source code is public domain. + */ + +// BZ2 support added by Colin DeVilbiss <crdevilb@mtu.edu> + +#ifndef __MODPLUG_ARCH_BZIP2_H__INCLUDED__ +#define __MODPLUG_ARCH_BZIP2_H__INCLUDED__ + +#include "archive.h" +#include <string> + +class arch_Bzip2: public Archive +{ +public: + arch_Bzip2(const string& aFileName); + virtual ~arch_Bzip2(); + + static bool ContainsMod(const string& aFileName); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_gzip.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,108 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdio.h> + +#include "arch_gzip.h" + + +arch_Gzip::arch_Gzip(const string& aFileName) +{ + //check if file exists + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + + if(lFileDesc == -1) + { + mSize = 0; + return; + } + close(lFileDesc); + + // file exists. + string lCommand = "gunzip -l \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + char line[81]; + fgets(line, 80, f); // ignore a line. + fscanf(f, "%u", &mSize); // ignore first number. + fscanf(f, "%u", &mSize); // keep second number. + + pclose(f); + + mMap = new char[mSize]; + if(mMap == NULL) + { + mSize = 0; + return; + } + + lCommand = "gunzip -c \"" + aFileName + '\"'; //decompress to stdout + f = popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + fread((char *)mMap, sizeof(char), mSize, f); + + pclose(f); + +} + +arch_Gzip::~arch_Gzip() +{ + if(mSize != 0) + delete [] (char*)mMap; +} + +bool arch_Gzip::ContainsMod(const string& aFileName) +{ + string lName; + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + uint32 num; + float fnum; + + if(lFileDesc == -1) + return false; + + close(lFileDesc); + + // file exists. + string lCommand = "gunzip -l \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(),"r"); + + if (f <= 0) { + pclose(f); + return false; + } + + char line[300]; + fgets(line, 80, f); // ignore a line. + fscanf(f, "%i", &num); // ignore first number + fscanf(f, "%i", &num); // ignore second number + fscanf(f, "%f%%", &fnum); // ignore ratio + fgets(line, 300, f); // read in correct line safely. + if (strlen(line) > 1) + line[strlen(line)-1] = 0; + lName = line; + + pclose(f); + + return IsOurFile(lName); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_gzip.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,22 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCH_GZIP_H__INCLUDED__ +#define __MODPLUG_ARCH_GZIP_H__INCLUDED__ + +#include "archive.h" +#include <string> + +class arch_Gzip: public Archive +{ +public: + arch_Gzip(const string& aFileName); + virtual ~arch_Gzip(); + + static bool ContainsMod(const string& aFileName); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_rar.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,185 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdio.h> + +#include "arch_rar.h" +#include <iostream> +#include <vector> + +arch_Rar::arch_Rar(const string& aFileName) +{ + //check if file exists + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + char lBuffer[350]; + uint32 lLength; + uint32 lCount; + uint32 lPos = 0; + bool lFound = false; + string lName, lGoodName; + + if(lFileDesc == -1) + { + mSize = 0; + return; + } + + close(lFileDesc); + + string lCommand = "unrar l \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if(f <= 0) + { + mSize = 0; + return; + } + + int num = 7; + while (num--) // ignore 7 lines. + fgets(lBuffer, 90, f); + + bool eof = false; + while(!eof) + { + if(fgets(lBuffer, 350, f) <= 0 || f <= 0) + break; + if (strlen(lBuffer) > 1) + lBuffer[strlen(lBuffer)-1] = 0; + + lLength = strlen(lBuffer); + lCount = 0; + for(uint32 i = lLength - 1; i > 0; i--) + { + if(lBuffer[i] == ' ') + { + lBuffer[i] = 0; + if(lBuffer[i - 1] != ' ') + { + lCount++; + if(lCount == 9) + { + lPos = i; + break; + } + } + } + } + + while(lBuffer[lPos] == '\0') + lPos++; + lName = &lBuffer[1]; // get rid of the space. + + mSize = strtol(lBuffer + lPos, NULL, 10); + + if(IsOurFile(lName)) + { + lFound = true; + break; + } + } + + if(!lFound) + { + mSize = 0; + return; + } + + pclose(f); + + mMap = new char[mSize]; + if(mMap == NULL) + { + mSize = 0; + return; + } + + lCommand = "unrar p -inul \"" + aFileName + "\" \"" + lName + '\"'; + //decompress to stdout + f = popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + fread((char *)mMap, sizeof(char), mSize, f); + + pclose(f); +} + +arch_Rar::~arch_Rar() +{ + if(mSize != 0) + delete [] (char*)mMap; +} + +bool arch_Rar::ContainsMod(const string& aFileName) +{ + //check if file exists + string lName; + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + char lBuffer[350]; + uint32 lLength; + uint32 lCount; + + if(lFileDesc == -1) + return false; + + close(lFileDesc); + + string lCommand = "unrar l \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if(f <= 0) + return false; + + int num = 7; + while (num--) + fgets(lBuffer, 90, f); //ignore a line. + + bool eof = false; + while(!eof) + { + if(fgets(lBuffer, 350, f) || f <= 0) + if(f <= 0) + break; + if (strlen(lBuffer) > 1) + lBuffer[strlen(lBuffer)-1] = 0; + + lLength = strlen(lBuffer); + lCount = 0; + for(uint32 i = lLength - 1; i > 0; i--) + { + if(lBuffer[i] == ' ') + { + lBuffer[i] = 0; + if(lBuffer[i - 1] != ' ') + { + lCount++; + if(lCount == 9) + break; + } + } + } + + lName = lBuffer; + + if(IsOurFile(lName)) { + pclose(f); + return true; + } + } + + pclose(f); + return false; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_rar.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,22 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCH_RAR_H__INCLUDED__ +#define __MODPLUG_ARCH_RAR_H__INCLUDED__ + +#include "archive.h" +#include <string> + +class arch_Rar: public Archive +{ +public: + arch_Rar(const string& aFileName); + virtual ~arch_Rar(); + + static bool ContainsMod(const string& aFileName); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_raw.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,55 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +//mmap() +#include <unistd.h> +#include <sys/mman.h> + +#include "arch_raw.h" + +arch_Raw::arch_Raw(const string& aFileName) +{ + mFileDesc = open(aFileName.c_str(), O_RDONLY); + + struct stat lStat; + + //open and mmap the file + if(mFileDesc == -1) + { + mSize = 0; + return; + } + fstat(mFileDesc, &lStat); + mSize = lStat.st_size; + + mMap = + (uchar*)mmap(0, mSize, PROT_READ, + MAP_PRIVATE, mFileDesc, 0); + if(!mMap) + { + close(mFileDesc); + mSize = 0; + return; + } +} + +arch_Raw::~arch_Raw() +{ + if(mSize != 0) + { + munmap(mMap, mSize); + close(mFileDesc); + } +} + +bool arch_Raw::ContainsMod(const string& aFileName) +{ + return IsOurFile(aFileName); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_raw.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,24 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCH_RAW_H__INCLUDED__ +#define __MODPLUG_ARCH_RAW_H__INCLUDED__ + +#include "archive.h" +#include <string> + +class arch_Raw: public Archive +{ + int mFileDesc; + +public: + arch_Raw(const string& aFileName); + virtual ~arch_Raw(); + + static bool ContainsMod(const string& aFileName); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_zip.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,143 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> + +#include "arch_zip.h" +#include <iostream> +#include <vector> + +arch_Zip::arch_Zip(const string& aFileName) +{ + //check if file exists + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + string lGoodName; + bool bFound = false; + + if(lFileDesc == -1) + { + mSize = 0; + return; + } + + close(lFileDesc); + + // file exists. + string lCommand = "unzip -l -qq \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if(f <= 0) + { + mSize = 0; + return; + } + + + bool eof = false; + while(!eof) + { + char line[301]; + char lUncompName[300]; + if (fgets(line, 300, f) <= 0) + { + eof = true; + break; + } + + if (processLine(line, &mSize, lUncompName)) + { + lGoodName = lUncompName; + bFound = true; + break; + } + + } + if(!bFound) + { + mSize = 0; + return; + } + + pclose(f); + + mMap = new char[mSize]; + + lCommand = "unzip -p \"" + aFileName + "\" \"" + lGoodName + '\"'; + //decompress to stdout + f = popen(lCommand.c_str(), "r"); + + if (f <= 0) + { + mSize = 0; + return; + } + + fread((char *)mMap, sizeof(char), mSize, f); + + pclose(f); + +} + +bool arch_Zip::processLine(char *buffer, uint32 *mSize, char *filename) +{ + uint32 mlSize; + mlSize = 0; + + if (sscanf(buffer, "%u %*s %*s %s\n", &mlSize, &filename[0]) <= 0) + return false; + + *mSize = mlSize; + string lName = filename; + + // size date time name + return IsOurFile(lName); +} + +arch_Zip::~arch_Zip() +{ + if(mSize != 0) + delete [] (char*)mMap; +} + +bool arch_Zip::ContainsMod(const string& aFileName) +{ + int lFileDesc = open(aFileName.c_str(), O_RDONLY); + + if(lFileDesc == -1) + return false; + + close(lFileDesc); + + // file exists. + string lCommand = "unzip -l -qq \"" + aFileName + '\"'; //get info + FILE *f = popen(lCommand.c_str(), "r"); + + if(f <= 0) + return false; + + bool eof = false; + while(!eof) + { + char line[301], lName[300]; + if (fgets(line, 300, f) <= 0) + return false; + + uint32 tempSize; + // Simplification of previous if statement + pclose(f); + return (processLine(line, &tempSize, lName)); + + } + + pclose(f); + return false; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/arch_zip.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,23 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCH_ZIP_H__INCLUDED__ +#define __MODPLUG_ARCH_ZIP_H__INCLUDED__ + +#include "archive.h" +#include <string> + +class arch_Zip: public Archive +{ +public: + arch_Zip(const string& aFileName); + virtual ~arch_Zip(); + + static bool ContainsMod(const string& aFileName); + static bool processLine(char *buffer, uint32 *mSize, char *filename); +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/archive.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,80 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#include "archive.h" + + + +///* Open a read pipe */ File f; +//f=popen("gzip -d compressed.file.name","r"); +///* Read some data in the usual manner, for example */ +//fscanf(f,"%d %f %f",name,&age,$id); +///* Close the pipe */ +//pclose(f); + +Archive::~Archive() +{ +} + +bool Archive::IsOurFile(const string& aFileName) +{ + string lExt; + uint32 lPos; + + lPos = aFileName.find_last_of('.'); + if((int)lPos == -1) + return false; + lExt = aFileName.substr(lPos); + for(uint32 i = 0; i < lExt.length(); i++) + lExt[i] = tolower(lExt[i]); + + if (lExt == ".669") + return true; + if (lExt == ".amf") + return true; + if (lExt == ".ams") + return true; + if (lExt == ".dbm") + return true; + if (lExt == ".dbf") + return true; + if (lExt == ".dsm") + return true; + if (lExt == ".far") + return true; + if (lExt == ".it") + return true; + if (lExt == ".mdl") + return true; + if (lExt == ".med") + return true; + if (lExt == ".mod") + return true; + if (lExt == ".mtm") + return true; + if (lExt == ".okt") + return true; + if (lExt == ".ptm") + return true; + if (lExt == ".s3m") + return true; + if (lExt == ".stm") + return true; + if (lExt == ".ult") + return true; + if (lExt == ".umx") //Unreal rocks! + return true; + if (lExt == ".xm") + return true; + if (lExt == ".j2b") + return true; + if (lExt == ".mt2") + return true; + if (lExt == ".psm") + return true; + + return false; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/archive.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,32 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCHIVE_H__INCLUDED__ +#define __MODPLUG_ARCHIVE_H__INCLUDED__ + +#include "../stddefs.h" +#include <string> +#include <cctype> + +using namespace std; + +class Archive +{ +protected: + uint32 mSize; + void* mMap; + + //This version of IsOurFile is slightly different... + static bool IsOurFile(const string& aFileName); + +public: + virtual ~Archive(); + + inline uint32 Size() {return mSize;} + inline void* Map() {return mMap;} +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/open.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,112 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#include "open.h" +#include "arch_raw.h" +#include "arch_gzip.h" +#include "arch_zip.h" +#include "arch_rar.h" +#include "arch_bz2.h" + +Archive* OpenArchive(const string& aFileName) +{ + string lExt; + uint32 lPos; + + lPos = aFileName.find_last_of('.'); + if(lPos < 0) + return NULL; + lExt = aFileName.substr(lPos); + for(uint32 i = 0; i < lExt.length(); i++) + lExt[i] = tolower(lExt[i]); + + if (lExt == ".mdz") + return new arch_Zip(aFileName); + if (lExt == ".mdr") + return new arch_Rar(aFileName); + if (lExt == ".mdgz") + return new arch_Gzip(aFileName); + if (lExt == ".mdbz") + return new arch_Bzip2(aFileName); + if (lExt == ".s3z") + return new arch_Zip(aFileName); + if (lExt == ".s3r") + return new arch_Rar(aFileName); + if (lExt == ".s3gz") + return new arch_Gzip(aFileName); + if (lExt == ".xmz") + return new arch_Zip(aFileName); + if (lExt == ".xmr") + return new arch_Rar(aFileName); + if (lExt == ".xmgz") + return new arch_Gzip(aFileName); + if (lExt == ".itz") + return new arch_Zip(aFileName); + if (lExt == ".itr") + return new arch_Rar(aFileName); + if (lExt == ".itgz") + return new arch_Gzip(aFileName); + if (lExt == ".zip") + return new arch_Zip(aFileName); + if (lExt == ".rar") + return new arch_Rar(aFileName); + if (lExt == ".gz") + return new arch_Gzip(aFileName); + if (lExt == ".bz2") + return new arch_Bzip2(aFileName); + + return new arch_Raw(aFileName); +} + +bool ContainsMod(const string& aFileName) +{ + string lExt; + uint32 lPos; + + lPos = aFileName.find_last_of('.'); + if(lPos < 0) + return false; + lExt = aFileName.substr(lPos); + for(uint32 i = 0; i < lExt.length(); i++) + lExt[i] = tolower(lExt[i]); + + if (lExt == ".mdz") + return arch_Zip::ContainsMod(aFileName); + if (lExt == ".mdr") + return arch_Rar::ContainsMod(aFileName); + if (lExt == ".mdgz") + return arch_Gzip::ContainsMod(aFileName); + if (lExt == ".mdbz") + return arch_Bzip2::ContainsMod(aFileName); + if (lExt == ".s3z") + return arch_Zip::ContainsMod(aFileName); + if (lExt == ".s3r") + return arch_Rar::ContainsMod(aFileName); + if (lExt == ".s3gz") + return arch_Gzip::ContainsMod(aFileName); + if (lExt == ".xmz") + return arch_Zip::ContainsMod(aFileName); + if (lExt == ".xmr") + return arch_Rar::ContainsMod(aFileName); + if (lExt == ".xmgz") + return arch_Gzip::ContainsMod(aFileName); + if (lExt == ".itz") + return arch_Zip::ContainsMod(aFileName); + if (lExt == ".itr") + return arch_Rar::ContainsMod(aFileName); + if (lExt == ".itgz") + return arch_Gzip::ContainsMod(aFileName); + if (lExt == ".zip") + return arch_Zip::ContainsMod(aFileName); + if (lExt == ".rar") + return arch_Rar::ContainsMod(aFileName); + if (lExt == ".gz") + return arch_Gzip::ContainsMod(aFileName); + if (lExt == ".bz2") + return arch_Bzip2::ContainsMod(aFileName); + + return arch_Raw::ContainsMod(aFileName); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/archive/open.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,16 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUG_ARCHIVE_OPEN_H__INCLUDED__ +#define __MODPLUG_ARCHIVE_OPEN_H__INCLUDED__ + +#include "archive.h" +#include <string> + +Archive* OpenArchive(const string& aFileName); +bool ContainsMod(const string& aFileName); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/Makefile.am Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,7 @@ +INCLUDES = @GTK_CFLAGS@ + +noinst_LTLIBRARIES = libgui.la +libgui_la_LDFLAGS = -module -avoid-version +libgui_la_SOURCES = main.cpp support.cpp interface.cpp callbacks.cpp + +noinst_HEADERS = callbacks.h interface.h support.h main.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/callbacks.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,171 @@ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <gtk/gtk.h> +#include <iostream> + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + +#include "../modplugbmp.h" + + +gboolean +hide_window (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + gtk_widget_hide(widget); + return TRUE; +} + +void +on_about_close_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget* lAboutWindow; + + lAboutWindow = lookup_widget((GtkWidget*)button, "About"); + if(!lAboutWindow) + cerr << "ModPlug: on_about_close_clicked: Could not find about window!" << endl; + else + gtk_widget_hide(lAboutWindow); +} + + +void +on_config_apply_clicked (GtkButton *button, + gpointer user_data) +{ + ModplugXMMS::Settings lProps; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "bit8"))) + lProps.mBits = 8; + else + lProps.mBits = 16; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "samp11"))) + lProps.mFrequency = 11025; + else if (gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "samp22"))) + lProps.mFrequency = 22050; + else + lProps.mFrequency = 44100; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "resampNearest"))) + lProps.mResamplingMode = 0; + else if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "resampLinear"))) + lProps.mResamplingMode = 1; + else if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "resampSpline"))) + lProps.mResamplingMode = 2; + else + lProps.mResamplingMode = 3; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "mono"))) + lProps.mChannels = 1; + else + lProps.mChannels = 2; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxNR"))) + lProps.mNoiseReduction = true; + else + lProps.mNoiseReduction = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxFastInfo"))) + lProps.mFastinfo = true; + else + lProps.mFastinfo = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxUseFilename"))) + lProps.mUseFilename = true; + else + lProps.mUseFilename = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxReverb"))) + lProps.mReverb = true; + else + lProps.mReverb = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxBassBoost"))) + lProps.mMegabass = true; + else + lProps.mMegabass = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxSurround"))) + lProps.mSurround = true; + else + lProps.mSurround = false; + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxPreamp"))) + lProps.mPreamp = true; + else + lProps.mPreamp = false; + + if(gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxLoopForever"))) + lProps.mLoopCount = -1; + else if (gtk_toggle_button_get_active((GtkToggleButton*)lookup_widget((GtkWidget*)button, "fxLoopFinite"))) + { + lProps.mLoopCount = + (uint32)gtk_spin_button_get_adjustment( + (GtkSpinButton*)lookup_widget((GtkWidget*)button, "fxLoopCount"))->value; + } + else + lProps.mLoopCount = 0; + + //hmm... GTK objects have un-protected data members? That's not good... + lProps.mReverbDepth = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxReverbDepth"))->value; + lProps.mReverbDelay = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxReverbDelay"))->value; + lProps.mBassAmount = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxBassAmount"))->value; + lProps.mBassRange = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxBassRange"))->value; + lProps.mSurroundDepth = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxSurroundDepth"))->value; + lProps.mSurroundDelay = + (uint32)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxSurroundDelay"))->value; + lProps.mPreampLevel = + (float)gtk_range_get_adjustment((GtkRange*)lookup_widget((GtkWidget*)button, "fxPreampLevel"))->value; + + gModplugXMMS.SetModProps(lProps); +} + + +void +on_config_ok_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget* lConfigWindow; + + on_config_apply_clicked(button, user_data); + + lConfigWindow = lookup_widget((GtkWidget*)button, "Config"); + if(!lConfigWindow) + cerr << "ModPlug: on_config_ok_clicked: Could not find config window!" << endl; + else + gtk_widget_hide(lConfigWindow); +} + + +void +on_config_cancel_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget* lConfigWindow; + + lConfigWindow = lookup_widget((GtkWidget*)button, "Config"); + if(!lConfigWindow) + cerr << "ModPlug: on_config_ok_clicked: Could not find config window!" << endl; + else + gtk_widget_hide(lConfigWindow); +} + + +void +on_info_close_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget* lInfoWindow; + + lInfoWindow = lookup_widget((GtkWidget*)button, "Info"); + if(!lInfoWindow) + cerr << "ModPlug: on_info_close_clicked: Could not find info window!" << endl; + else + gtk_widget_hide(lInfoWindow); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/callbacks.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,27 @@ +#include <gtk/gtk.h> + + +gboolean +hide_window (GtkWidget *widget, + GdkEvent *event, + gpointer user_data); + +void +on_about_close_clicked (GtkButton *button, + gpointer user_data); + +void +on_config_ok_clicked (GtkButton *button, + gpointer user_data); + +void +on_config_apply_clicked (GtkButton *button, + gpointer user_data); + +void +on_config_cancel_clicked (GtkButton *button, + gpointer user_data); + +void +on_info_close_clicked (GtkButton *button, + gpointer user_data);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/interface.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,1009 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gdk/gdkkeysyms.h> +#include <gtk/gtk.h> + +#include "callbacks.h" +#include "interface.h" +#include "support.h" + +GtkWidget* +create_About (void) +{ + GtkWidget *About; + GtkWidget *vbox1; + GtkWidget *label1; + GtkWidget *hseparator1; + GtkWidget *hbuttonbox1; + GtkWidget *about_close; + + About = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (About), "About", About); + gtk_window_set_title (GTK_WINDOW (About), _("About Modplug")); + gtk_window_set_policy (GTK_WINDOW (About), FALSE, FALSE, FALSE); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox1); + gtk_object_set_data_full (GTK_OBJECT (About), "vbox1", vbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (About), vbox1); + + label1 = gtk_label_new (_("Modplug Input Plugin for BMP ver" + VERSION + "\nModplug sound engine written by Olivier Lapicque.\nXMMS interface for Modplug by Kenton Varda.\n(c)2000 Olivier Lapicque and Kenton Varda.\nUpdates and Maintainance by Konstanty Bialkowski.\nPorted to BMP by Theofilos Intzoglou.")); + gtk_widget_ref (label1); + gtk_object_set_data_full (GTK_OBJECT (About), "label1", label1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label1); + gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0); + gtk_misc_set_padding (GTK_MISC (label1), 6, 6); + + hseparator1 = gtk_hseparator_new (); + gtk_widget_ref (hseparator1); + gtk_object_set_data_full (GTK_OBJECT (About), "hseparator1", hseparator1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hseparator1); + gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, TRUE, TRUE, 0); + gtk_widget_set_usize (hseparator1, -2, 18); + + hbuttonbox1 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox1); + gtk_object_set_data_full (GTK_OBJECT (About), "hbuttonbox1", hbuttonbox1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox1); + gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0); + + about_close = gtk_button_new_with_label (_("Close")); + gtk_widget_ref (about_close); + gtk_object_set_data_full (GTK_OBJECT (About), "about_close", about_close, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (about_close); + gtk_container_add (GTK_CONTAINER (hbuttonbox1), about_close); + GTK_WIDGET_SET_FLAGS (about_close, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (About), "delete_event", + GTK_SIGNAL_FUNC (hide_window), + NULL); + gtk_signal_connect (GTK_OBJECT (about_close), "clicked", + GTK_SIGNAL_FUNC (on_about_close_clicked), + NULL); + + return About; +} + +GtkWidget* +create_Config (void) +{ + GtkWidget *Config; + GtkWidget *vbox2; + GtkWidget *notebook1; + GtkWidget *vbox3; + GtkWidget *hbox2; + GtkWidget *frame1; + GtkWidget *vbox4; + GSList *vbox4_group = NULL; + GtkWidget *bit16; + GtkWidget *bit8; + GtkWidget *frame2; + GtkWidget *vbox5; + GSList *vbox5_group = NULL; + GtkWidget *stereo; + GtkWidget *mono; + GtkWidget *hbox10; + GtkWidget *frame3; + GtkWidget *vbox6; + GSList *vbox6_group = NULL; + GtkWidget *samp44; + GtkWidget *samp22; + GtkWidget *samp11; + GtkWidget *frame9; + GtkWidget *vbox15; + GSList *vbox15_group = NULL; + GtkWidget *resampNearest; + GtkWidget *resampLinear; + GtkWidget *resampSpline; + GtkWidget *resampPolyphase; + GtkWidget *label2; + GtkWidget *vbox7; + GtkWidget *frame4; + GtkWidget *hbox3; + GtkWidget *vbox8; + GtkWidget *fxUseFilename; + GtkWidget *fxFastInfo; + GtkWidget *vbox9; + GtkWidget *fxNR; + GtkWidget *frame5; + GtkWidget *hbox4; + GtkWidget *fxReverb; + GtkWidget *vbox10; + GtkWidget *table1; + GtkWidget *fxReverbDepth; + GtkWidget *fxReverbDelay; + GtkWidget *label3; + GtkWidget *label4; + GtkWidget *frame6; + GtkWidget *hbox5; + GtkWidget *fxBassBoost; + GtkWidget *vbox11; + GtkWidget *table2; + GtkWidget *fxBassAmount; + GtkWidget *fxBassRange; + GtkWidget *label5; + GtkWidget *label6; + GtkWidget *frame7; + GtkWidget *hbox6; + GtkWidget *fxSurround; + GtkWidget *vbox12; + GtkWidget *table3; + GtkWidget *fxSurroundDepth; + GtkWidget *fxSurroundDelay; + GtkWidget *label7; + GtkWidget *label8; + GtkWidget *frame10; + GtkWidget *vbox16; + GtkWidget *label20; + GtkWidget *hbox11; + GtkWidget *fxPreamp; + GtkWidget *label19; + GtkWidget *fxPreampLevel; + GtkWidget *frame11; + GtkWidget *vbox17; + GSList *loopGroup_group = NULL; + GtkWidget *fxNoLoop; + GtkWidget *hbox13; + GtkWidget *fxLoopFinite; + GtkObject *fxLoopCount_adj; + GtkWidget *fxLoopCount; + GtkWidget *label21; + GtkWidget *fxLoopForever; + GtkWidget *label10; + GtkWidget *hbuttonbox2; + GtkWidget *config_ok; + GtkWidget *config_apply; + GtkWidget *config_cancel; + + Config = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (Config), "Config", Config); + gtk_widget_set_usize (Config, 350, -2); + gtk_window_set_title (GTK_WINDOW (Config), _("ModPlug Configuration")); + gtk_window_set_policy (GTK_WINDOW (Config), FALSE, FALSE, FALSE); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox2); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox2", vbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox2); + gtk_container_add (GTK_CONTAINER (Config), vbox2); + + notebook1 = gtk_notebook_new (); + gtk_widget_ref (notebook1); + gtk_object_set_data_full (GTK_OBJECT (Config), "notebook1", notebook1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (notebook1); + gtk_box_pack_start (GTK_BOX (vbox2), notebook1, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (notebook1), 6); + + vbox3 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox3); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox3", vbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox3); + gtk_container_add (GTK_CONTAINER (notebook1), vbox3); + gtk_container_set_border_width (GTK_CONTAINER (vbox3), 6); + + hbox2 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox2); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox2", hbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox2); + gtk_box_pack_start (GTK_BOX (vbox3), hbox2, TRUE, TRUE, 0); + + frame1 = gtk_frame_new (_("Resolution")); + gtk_widget_ref (frame1); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame1", frame1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame1); + gtk_box_pack_start (GTK_BOX (hbox2), frame1, TRUE, TRUE, 0); + + vbox4 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox4); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox4", vbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox4); + gtk_container_add (GTK_CONTAINER (frame1), vbox4); + + bit16 = gtk_radio_button_new_with_label (vbox4_group, _("16 bit")); + vbox4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (bit16)); + gtk_widget_ref (bit16); + gtk_object_set_data_full (GTK_OBJECT (Config), "bit16", bit16, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (bit16); + gtk_box_pack_start (GTK_BOX (vbox4), bit16, FALSE, FALSE, 0); + + bit8 = gtk_radio_button_new_with_label (vbox4_group, _("8 bit")); + vbox4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (bit8)); + gtk_widget_ref (bit8); + gtk_object_set_data_full (GTK_OBJECT (Config), "bit8", bit8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (bit8); + gtk_box_pack_start (GTK_BOX (vbox4), bit8, FALSE, FALSE, 0); + + frame2 = gtk_frame_new (_("Channels")); + gtk_widget_ref (frame2); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame2", frame2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame2); + gtk_box_pack_start (GTK_BOX (hbox2), frame2, TRUE, TRUE, 0); + + vbox5 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox5); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox5", vbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox5); + gtk_container_add (GTK_CONTAINER (frame2), vbox5); + + stereo = gtk_radio_button_new_with_label (vbox5_group, _("Stereo")); + vbox5_group = gtk_radio_button_group (GTK_RADIO_BUTTON (stereo)); + gtk_widget_ref (stereo); + gtk_object_set_data_full (GTK_OBJECT (Config), "stereo", stereo, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (stereo); + gtk_box_pack_start (GTK_BOX (vbox5), stereo, FALSE, FALSE, 0); + + mono = gtk_radio_button_new_with_label (vbox5_group, _("Mono (downmix)")); + vbox5_group = gtk_radio_button_group (GTK_RADIO_BUTTON (mono)); + gtk_widget_ref (mono); + gtk_object_set_data_full (GTK_OBJECT (Config), "mono", mono, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (mono); + gtk_box_pack_start (GTK_BOX (vbox5), mono, FALSE, FALSE, 0); + + hbox10 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox10); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox10", hbox10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox10); + gtk_box_pack_start (GTK_BOX (vbox3), hbox10, TRUE, TRUE, 0); + + frame3 = gtk_frame_new (_("Sampling Rate")); + gtk_widget_ref (frame3); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame3", frame3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame3); + gtk_box_pack_start (GTK_BOX (hbox10), frame3, TRUE, TRUE, 0); + + vbox6 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox6); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox6", vbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox6); + gtk_container_add (GTK_CONTAINER (frame3), vbox6); + + samp44 = gtk_radio_button_new_with_label (vbox6_group, _("44 kHz")); + vbox6_group = gtk_radio_button_group (GTK_RADIO_BUTTON (samp44)); + gtk_widget_ref (samp44); + gtk_object_set_data_full (GTK_OBJECT (Config), "samp44", samp44, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (samp44); + gtk_box_pack_start (GTK_BOX (vbox6), samp44, FALSE, FALSE, 0); + + samp22 = gtk_radio_button_new_with_label (vbox6_group, _("22 kHz")); + vbox6_group = gtk_radio_button_group (GTK_RADIO_BUTTON (samp22)); + gtk_widget_ref (samp22); + gtk_object_set_data_full (GTK_OBJECT (Config), "samp22", samp22, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (samp22); + gtk_box_pack_start (GTK_BOX (vbox6), samp22, FALSE, FALSE, 0); + + samp11 = gtk_radio_button_new_with_label (vbox6_group, _("11 kHz")); + vbox6_group = gtk_radio_button_group (GTK_RADIO_BUTTON (samp11)); + gtk_widget_ref (samp11); + gtk_object_set_data_full (GTK_OBJECT (Config), "samp11", samp11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (samp11); + gtk_box_pack_start (GTK_BOX (vbox6), samp11, FALSE, FALSE, 0); + + frame9 = gtk_frame_new (_("Resampling")); + gtk_widget_ref (frame9); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame9", frame9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame9); + gtk_box_pack_start (GTK_BOX (hbox10), frame9, TRUE, TRUE, 0); + + vbox15 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox15); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox15", vbox15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox15); + gtk_container_add (GTK_CONTAINER (frame9), vbox15); + + resampNearest = gtk_radio_button_new_with_label (vbox15_group, _("Nearest (fastest)")); + vbox15_group = gtk_radio_button_group (GTK_RADIO_BUTTON (resampNearest)); + gtk_widget_ref (resampNearest); + gtk_object_set_data_full (GTK_OBJECT (Config), "resampNearest", resampNearest, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (resampNearest); + gtk_box_pack_start (GTK_BOX (vbox15), resampNearest, FALSE, FALSE, 0); + + resampLinear = gtk_radio_button_new_with_label (vbox15_group, _("Linear (fast)")); + vbox15_group = gtk_radio_button_group (GTK_RADIO_BUTTON (resampLinear)); + gtk_widget_ref (resampLinear); + gtk_object_set_data_full (GTK_OBJECT (Config), "resampLinear", resampLinear, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (resampLinear); + gtk_box_pack_start (GTK_BOX (vbox15), resampLinear, FALSE, FALSE, 0); + + resampSpline = gtk_radio_button_new_with_label (vbox15_group, _("Spline (good quality)")); + vbox15_group = gtk_radio_button_group (GTK_RADIO_BUTTON (resampSpline)); + gtk_widget_ref (resampSpline); + gtk_object_set_data_full (GTK_OBJECT (Config), "resampSpline", resampSpline, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (resampSpline); + gtk_box_pack_start (GTK_BOX (vbox15), resampSpline, FALSE, FALSE, 0); + + resampPolyphase = gtk_radio_button_new_with_label (vbox15_group, _("8-tap Fir (extremely high quality)")); + vbox15_group = gtk_radio_button_group (GTK_RADIO_BUTTON (resampPolyphase)); + gtk_widget_ref (resampPolyphase); + gtk_object_set_data_full (GTK_OBJECT (Config), "resampPolyphase", resampPolyphase, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (resampPolyphase); + gtk_box_pack_start (GTK_BOX (vbox15), resampPolyphase, FALSE, FALSE, 0); + + label2 = gtk_label_new (_("Quality")); + gtk_widget_ref (label2); + gtk_object_set_data_full (GTK_OBJECT (Config), "label2", label2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label2); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label2); + + vbox7 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox7); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox7", vbox7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox7); + gtk_container_add (GTK_CONTAINER (notebook1), vbox7); + gtk_container_set_border_width (GTK_CONTAINER (vbox7), 6); + + frame4 = gtk_frame_new (_("General")); + gtk_widget_ref (frame4); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame4", frame4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame4); + gtk_box_pack_start (GTK_BOX (vbox7), frame4, TRUE, TRUE, 0); + + hbox3 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox3); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox3", hbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox3); + gtk_container_add (GTK_CONTAINER (frame4), hbox3); + + vbox8 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox8); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox8", vbox8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox8); + gtk_box_pack_start (GTK_BOX (hbox3), vbox8, TRUE, TRUE, 0); + + fxUseFilename = gtk_check_button_new_with_label (_("Use Filename as Song Title")); + gtk_widget_ref (fxUseFilename); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxUseFilename", fxUseFilename, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxUseFilename); + gtk_box_pack_start (GTK_BOX (vbox8), fxUseFilename, FALSE, FALSE, 0); + + fxFastInfo = gtk_check_button_new_with_label (_("Fast Playlist Info")); + gtk_widget_ref (fxFastInfo); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxFastInfo", fxFastInfo, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxFastInfo); + gtk_box_pack_start (GTK_BOX (vbox8), fxFastInfo, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fxFastInfo), TRUE); + + vbox9 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox9); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox9", vbox9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox9); + gtk_box_pack_start (GTK_BOX (hbox3), vbox9, TRUE, TRUE, 0); + + fxNR = gtk_check_button_new_with_label (_("Noise Reduction")); + gtk_widget_ref (fxNR); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxNR", fxNR, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxNR); + gtk_box_pack_start (GTK_BOX (vbox9), fxNR, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fxNR), TRUE); + + frame5 = gtk_frame_new (_("Reverb")); + gtk_widget_ref (frame5); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame5", frame5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame5); + gtk_box_pack_start (GTK_BOX (vbox7), frame5, TRUE, TRUE, 0); + + hbox4 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox4); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox4", hbox4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox4); + gtk_container_add (GTK_CONTAINER (frame5), hbox4); + + fxReverb = gtk_check_button_new_with_label (_("Enable")); + gtk_widget_ref (fxReverb); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxReverb", fxReverb, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxReverb); + gtk_box_pack_start (GTK_BOX (hbox4), fxReverb, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fxReverb), TRUE); + + vbox10 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox10); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox10", vbox10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox10); + gtk_box_pack_start (GTK_BOX (hbox4), vbox10, TRUE, TRUE, 0); + + table1 = gtk_table_new (2, 2, FALSE); + gtk_widget_ref (table1); + gtk_object_set_data_full (GTK_OBJECT (Config), "table1", table1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (table1); + gtk_box_pack_start (GTK_BOX (vbox10), table1, TRUE, TRUE, 0); + + fxReverbDepth = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (30, 0, 100, 0, 0, 0))); + gtk_widget_ref (fxReverbDepth); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxReverbDepth", fxReverbDepth, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxReverbDepth); + gtk_table_attach (GTK_TABLE (table1), fxReverbDepth, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + fxReverbDelay = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (90, 40, 200, 0, 0, 0))); + gtk_widget_ref (fxReverbDelay); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxReverbDelay", fxReverbDelay, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxReverbDelay); + gtk_table_attach (GTK_TABLE (table1), fxReverbDelay, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + label3 = gtk_label_new (_("Depth")); + gtk_widget_ref (label3); + gtk_object_set_data_full (GTK_OBJECT (Config), "label3", label3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label3); + gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 0, 1, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + label4 = gtk_label_new (_("Delay")); + gtk_widget_ref (label4); + gtk_object_set_data_full (GTK_OBJECT (Config), "label4", label4, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label4); + gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 1, 2, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + frame6 = gtk_frame_new (_("Bass Boost")); + gtk_widget_ref (frame6); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame6", frame6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame6); + gtk_box_pack_start (GTK_BOX (vbox7), frame6, TRUE, TRUE, 0); + + hbox5 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox5); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox5", hbox5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox5); + gtk_container_add (GTK_CONTAINER (frame6), hbox5); + + fxBassBoost = gtk_check_button_new_with_label (_("Enable")); + gtk_widget_ref (fxBassBoost); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxBassBoost", fxBassBoost, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxBassBoost); + gtk_box_pack_start (GTK_BOX (hbox5), fxBassBoost, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fxBassBoost), TRUE); + + vbox11 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox11); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox11", vbox11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox11); + gtk_box_pack_start (GTK_BOX (hbox5), vbox11, TRUE, TRUE, 0); + + table2 = gtk_table_new (2, 2, FALSE); + gtk_widget_ref (table2); + gtk_object_set_data_full (GTK_OBJECT (Config), "table2", table2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (table2); + gtk_box_pack_start (GTK_BOX (vbox11), table2, TRUE, TRUE, 0); + + fxBassAmount = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (30, 0, 100, 0, 0, 0))); + gtk_widget_ref (fxBassAmount); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxBassAmount", fxBassAmount, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxBassAmount); + gtk_table_attach (GTK_TABLE (table2), fxBassAmount, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + fxBassRange = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (30, 10, 100, 0, 0, 0))); + gtk_widget_ref (fxBassRange); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxBassRange", fxBassRange, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxBassRange); + gtk_table_attach (GTK_TABLE (table2), fxBassRange, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + label5 = gtk_label_new (_("Amount")); + gtk_widget_ref (label5); + gtk_object_set_data_full (GTK_OBJECT (Config), "label5", label5, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label5); + gtk_table_attach (GTK_TABLE (table2), label5, 0, 1, 0, 1, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + label6 = gtk_label_new (_("Range")); + gtk_widget_ref (label6); + gtk_object_set_data_full (GTK_OBJECT (Config), "label6", label6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label6); + gtk_table_attach (GTK_TABLE (table2), label6, 0, 1, 1, 2, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + frame7 = gtk_frame_new (_("Surround")); + gtk_widget_ref (frame7); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame7", frame7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame7); + gtk_box_pack_start (GTK_BOX (vbox7), frame7, TRUE, TRUE, 0); + + hbox6 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox6); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox6", hbox6, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox6); + gtk_container_add (GTK_CONTAINER (frame7), hbox6); + + fxSurround = gtk_check_button_new_with_label (_("Enable")); + gtk_widget_ref (fxSurround); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxSurround", fxSurround, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxSurround); + gtk_box_pack_start (GTK_BOX (hbox6), fxSurround, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fxSurround), TRUE); + + vbox12 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox12); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox12", vbox12, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox12); + gtk_box_pack_start (GTK_BOX (hbox6), vbox12, TRUE, TRUE, 0); + + table3 = gtk_table_new (2, 2, FALSE); + gtk_widget_ref (table3); + gtk_object_set_data_full (GTK_OBJECT (Config), "table3", table3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (table3); + gtk_box_pack_start (GTK_BOX (vbox12), table3, TRUE, TRUE, 0); + + fxSurroundDepth = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (20, 0, 100, 0, 0, 0))); + gtk_widget_ref (fxSurroundDepth); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxSurroundDepth", fxSurroundDepth, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxSurroundDepth); + gtk_table_attach (GTK_TABLE (table3), fxSurroundDepth, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + fxSurroundDelay = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (20, 5, 40, 0, 0, 0))); + gtk_widget_ref (fxSurroundDelay); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxSurroundDelay", fxSurroundDelay, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxSurroundDelay); + gtk_table_attach (GTK_TABLE (table3), fxSurroundDelay, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + + label7 = gtk_label_new (_("Depth")); + gtk_widget_ref (label7); + gtk_object_set_data_full (GTK_OBJECT (Config), "label7", label7, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label7); + gtk_table_attach (GTK_TABLE (table3), label7, 0, 1, 0, 1, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + label8 = gtk_label_new (_("Delay")); + gtk_widget_ref (label8); + gtk_object_set_data_full (GTK_OBJECT (Config), "label8", label8, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label8); + gtk_table_attach (GTK_TABLE (table3), label8, 0, 1, 1, 2, + (GtkAttachOptions) (0), + (GtkAttachOptions) (0), 0, 0); + + frame10 = gtk_frame_new (_("Preamp")); + gtk_widget_ref (frame10); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame10", frame10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame10); + gtk_box_pack_start (GTK_BOX (vbox7), frame10, TRUE, TRUE, 0); + + vbox16 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox16); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox16", vbox16, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox16); + gtk_container_add (GTK_CONTAINER (frame10), vbox16); + + label20 = gtk_label_new (_("Note: Setting the preamp too high may cause\nclipping / distortion!")); + gtk_widget_ref (label20); + gtk_object_set_data_full (GTK_OBJECT (Config), "label20", label20, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label20); + gtk_box_pack_start (GTK_BOX (vbox16), label20, FALSE, FALSE, 0); + + hbox11 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox11); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox11", hbox11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox11); + gtk_box_pack_start (GTK_BOX (vbox16), hbox11, TRUE, TRUE, 0); + + fxPreamp = gtk_check_button_new_with_label (_("Enable")); + gtk_widget_ref (fxPreamp); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxPreamp", fxPreamp, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxPreamp); + gtk_box_pack_start (GTK_BOX (hbox11), fxPreamp, FALSE, FALSE, 0); + + label19 = gtk_label_new (_("Volume")); + gtk_widget_ref (label19); + gtk_object_set_data_full (GTK_OBJECT (Config), "label19", label19, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label19); + gtk_box_pack_start (GTK_BOX (hbox11), label19, FALSE, FALSE, 0); + + fxPreampLevel = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, -3, 3, 1, 0, 0))); + gtk_widget_ref (fxPreampLevel); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxPreampLevel", fxPreampLevel, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxPreampLevel); + gtk_box_pack_start (GTK_BOX (hbox11), fxPreampLevel, TRUE, TRUE, 0); + + frame11 = gtk_frame_new (_("Looping")); + gtk_widget_ref (frame11); + gtk_object_set_data_full (GTK_OBJECT (Config), "frame11", frame11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (frame11); + gtk_box_pack_start (GTK_BOX (vbox7), frame11, TRUE, TRUE, 0); + + vbox17 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox17); + gtk_object_set_data_full (GTK_OBJECT (Config), "vbox17", vbox17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox17); + gtk_container_add (GTK_CONTAINER (frame11), vbox17); + + fxNoLoop = gtk_radio_button_new_with_label (loopGroup_group, _("Don't loop")); + loopGroup_group = gtk_radio_button_group (GTK_RADIO_BUTTON (fxNoLoop)); + gtk_widget_ref (fxNoLoop); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxNoLoop", fxNoLoop, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxNoLoop); + gtk_box_pack_start (GTK_BOX (vbox17), fxNoLoop, FALSE, FALSE, 0); + + hbox13 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox13); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbox13", hbox13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox13); + gtk_box_pack_start (GTK_BOX (vbox17), hbox13, FALSE, FALSE, 0); + + fxLoopFinite = gtk_radio_button_new_with_label (loopGroup_group, _("Loop")); + loopGroup_group = gtk_radio_button_group (GTK_RADIO_BUTTON (fxLoopFinite)); + gtk_widget_ref (fxLoopFinite); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxLoopFinite", fxLoopFinite, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxLoopFinite); + gtk_box_pack_start (GTK_BOX (hbox13), fxLoopFinite, FALSE, FALSE, 0); + + fxLoopCount_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10); + fxLoopCount = gtk_spin_button_new (GTK_ADJUSTMENT (fxLoopCount_adj), 1, 0); + gtk_widget_ref (fxLoopCount); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxLoopCount", fxLoopCount, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxLoopCount); + gtk_box_pack_start (GTK_BOX (hbox13), fxLoopCount, FALSE, TRUE, 0); + + label21 = gtk_label_new (_("time(s)")); + gtk_widget_ref (label21); + gtk_object_set_data_full (GTK_OBJECT (Config), "label21", label21, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label21); + gtk_box_pack_start (GTK_BOX (hbox13), label21, FALSE, FALSE, 0); + + fxLoopForever = gtk_radio_button_new_with_label (loopGroup_group, _("Loop forever")); + loopGroup_group = gtk_radio_button_group (GTK_RADIO_BUTTON (fxLoopForever)); + gtk_widget_ref (fxLoopForever); + gtk_object_set_data_full (GTK_OBJECT (Config), "fxLoopForever", fxLoopForever, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (fxLoopForever); + gtk_box_pack_start (GTK_BOX (vbox17), fxLoopForever, FALSE, FALSE, 0); + + label10 = gtk_label_new (_("Effects")); + gtk_widget_ref (label10); + gtk_object_set_data_full (GTK_OBJECT (Config), "label10", label10, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label10); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label10); + + hbuttonbox2 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox2); + gtk_object_set_data_full (GTK_OBJECT (Config), "hbuttonbox2", hbuttonbox2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox2); + gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0); + gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_END); + gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox2), 0); + + config_ok = gtk_button_new_with_label (_("OK")); + gtk_widget_ref (config_ok); + gtk_object_set_data_full (GTK_OBJECT (Config), "config_ok", config_ok, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (config_ok); + gtk_container_add (GTK_CONTAINER (hbuttonbox2), config_ok); + GTK_WIDGET_SET_FLAGS (config_ok, GTK_CAN_DEFAULT); + + config_apply = gtk_button_new_with_label (_("Apply")); + gtk_widget_ref (config_apply); + gtk_object_set_data_full (GTK_OBJECT (Config), "config_apply", config_apply, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (config_apply); + gtk_container_add (GTK_CONTAINER (hbuttonbox2), config_apply); + GTK_WIDGET_SET_FLAGS (config_apply, GTK_CAN_DEFAULT); + + config_cancel = gtk_button_new_with_label (_("Cancel")); + gtk_widget_ref (config_cancel); + gtk_object_set_data_full (GTK_OBJECT (Config), "config_cancel", config_cancel, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (config_cancel); + gtk_container_add (GTK_CONTAINER (hbuttonbox2), config_cancel); + GTK_WIDGET_SET_FLAGS (config_cancel, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (Config), "delete_event", + GTK_SIGNAL_FUNC (hide_window), + NULL); + gtk_signal_connect (GTK_OBJECT (config_ok), "clicked", + GTK_SIGNAL_FUNC (on_config_ok_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (config_apply), "clicked", + GTK_SIGNAL_FUNC (on_config_apply_clicked), + NULL); + gtk_signal_connect (GTK_OBJECT (config_cancel), "clicked", + GTK_SIGNAL_FUNC (on_config_cancel_clicked), + NULL); + + return Config; +} + +GtkWidget* +create_Info (void) +{ + GtkWidget *Info; + GtkWidget *vbox14; + GtkWidget *notebook2; + GtkWidget *hbox9; + GtkWidget *label11; + GtkWidget *info_general; + GtkWidget *label13; + GtkWidget *scrolledwindow1; + GtkWidget *viewport1; + GtkWidget *info_samples; + GtkWidget *label15; + GtkWidget *scrolledwindow2; + GtkWidget *viewport2; + GtkWidget *info_instruments; + GtkWidget *label17; + GtkWidget *scrolledwindow3; + GtkWidget *viewport3; + GtkWidget *info_message; + GtkWidget *label18; + GtkWidget *hbuttonbox3; + GtkWidget *info_close; + + Info = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_object_set_data (GTK_OBJECT (Info), "Info", Info); + gtk_widget_set_usize (Info, 290, 264); + gtk_window_set_title (GTK_WINDOW (Info), _("MOD Info")); + + vbox14 = gtk_vbox_new (FALSE, 0); + gtk_widget_ref (vbox14); + gtk_object_set_data_full (GTK_OBJECT (Info), "vbox14", vbox14, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (vbox14); + gtk_container_add (GTK_CONTAINER (Info), vbox14); + + notebook2 = gtk_notebook_new (); + gtk_widget_ref (notebook2); + gtk_object_set_data_full (GTK_OBJECT (Info), "notebook2", notebook2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (notebook2); + gtk_box_pack_start (GTK_BOX (vbox14), notebook2, TRUE, TRUE, 8); + gtk_container_set_border_width (GTK_CONTAINER (notebook2), 6); + + hbox9 = gtk_hbox_new (FALSE, 0); + gtk_widget_ref (hbox9); + gtk_object_set_data_full (GTK_OBJECT (Info), "hbox9", hbox9, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbox9); + gtk_container_add (GTK_CONTAINER (notebook2), hbox9); + + label11 = gtk_label_new (_("Filename:\nTitle:\nType:\nLength:\nSpeed:\nTempo:\nSamples:\nInstruments:\nPatterns:\nChannels:")); + gtk_widget_ref (label11); + gtk_object_set_data_full (GTK_OBJECT (Info), "label11", label11, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label11); + gtk_box_pack_start (GTK_BOX (hbox9), label11, FALSE, FALSE, 4); + gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_LEFT); + + info_general = gtk_label_new (_("---\n---\n---\n---\n---\n---\n---\n---\n---\n---")); + gtk_widget_ref (info_general); + gtk_object_set_data_full (GTK_OBJECT (Info), "info_general", info_general, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (info_general); + gtk_box_pack_start (GTK_BOX (hbox9), info_general, FALSE, FALSE, 4); + gtk_label_set_justify (GTK_LABEL (info_general), GTK_JUSTIFY_LEFT); + + label13 = gtk_label_new (_("General")); + gtk_widget_ref (label13); + gtk_object_set_data_full (GTK_OBJECT (Info), "label13", label13, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label13); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label13); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow1); + gtk_object_set_data_full (GTK_OBJECT (Info), "scrolledwindow1", scrolledwindow1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow1); + gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow1); + gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 6); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + viewport1 = gtk_viewport_new (NULL, NULL); + gtk_widget_ref (viewport1); + gtk_object_set_data_full (GTK_OBJECT (Info), "viewport1", viewport1, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (viewport1); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); + + info_samples = gtk_label_new (""); + gtk_widget_ref (info_samples); + gtk_object_set_data_full (GTK_OBJECT (Info), "info_samples", info_samples, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (info_samples); + gtk_container_add (GTK_CONTAINER (viewport1), info_samples); + gtk_label_set_justify (GTK_LABEL (info_samples), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (info_samples), 7.45058e-09, 7.45058e-09); + gtk_label_set_selectable(GTK_LABEL (info_samples), TRUE); + + label15 = gtk_label_new (_("Samples")); + gtk_widget_ref (label15); + gtk_object_set_data_full (GTK_OBJECT (Info), "label15", label15, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label15); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label15); + + scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow2); + gtk_object_set_data_full (GTK_OBJECT (Info), "scrolledwindow2", scrolledwindow2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow2); + gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow2); + gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow2), 6); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + viewport2 = gtk_viewport_new (NULL, NULL); + gtk_widget_ref (viewport2); + gtk_object_set_data_full (GTK_OBJECT (Info), "viewport2", viewport2, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (viewport2); + gtk_container_add (GTK_CONTAINER (scrolledwindow2), viewport2); + + info_instruments = gtk_label_new (""); + gtk_widget_ref (info_instruments); + gtk_object_set_data_full (GTK_OBJECT (Info), "info_instruments", info_instruments, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (info_instruments); + gtk_container_add (GTK_CONTAINER (viewport2), info_instruments); + gtk_label_set_justify (GTK_LABEL (info_instruments), GTK_JUSTIFY_LEFT); + gtk_misc_set_alignment (GTK_MISC (info_instruments), 1.49012e-08, 7.45058e-09); + gtk_label_set_selectable(GTK_LABEL (info_instruments), TRUE); + + label17 = gtk_label_new (_("Instruments")); + gtk_widget_ref (label17); + gtk_object_set_data_full (GTK_OBJECT (Info), "label17", label17, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label17); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label17); + + scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_ref (scrolledwindow3); + gtk_object_set_data_full (GTK_OBJECT (Info), "scrolledwindow3", scrolledwindow3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (scrolledwindow3); + gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow3); + gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow3), 6); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + + viewport3 = gtk_viewport_new (NULL, NULL); + gtk_widget_ref (viewport3); + gtk_object_set_data_full (GTK_OBJECT (Info), "viewport3", viewport3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (viewport3); + gtk_container_add (GTK_CONTAINER (scrolledwindow3), viewport3); + + info_message = gtk_label_new (""); + gtk_widget_ref (info_message); + gtk_object_set_data_full (GTK_OBJECT (Info), "info_message", info_message, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (info_message); + gtk_container_add (GTK_CONTAINER (viewport3), info_message); + gtk_label_set_justify (GTK_LABEL (info_message), GTK_JUSTIFY_LEFT); + gtk_label_set_line_wrap(GTK_LABEL (info_message), TRUE); + gtk_label_set_selectable(GTK_LABEL (info_message), TRUE); + + label18 = gtk_label_new (_("Message")); + gtk_widget_ref (label18); + gtk_object_set_data_full (GTK_OBJECT (Info), "label18", label18, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (label18); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label18); + + hbuttonbox3 = gtk_hbutton_box_new (); + gtk_widget_ref (hbuttonbox3); + gtk_object_set_data_full (GTK_OBJECT (Info), "hbuttonbox3", hbuttonbox3, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (hbuttonbox3); + gtk_box_pack_start (GTK_BOX (vbox14), hbuttonbox3, FALSE, FALSE, 0); + + info_close = gtk_button_new_with_label (_("Close")); + gtk_widget_ref (info_close); + gtk_object_set_data_full (GTK_OBJECT (Info), "info_close", info_close, + (GtkDestroyNotify) gtk_widget_unref); + gtk_widget_show (info_close); + gtk_container_add (GTK_CONTAINER (hbuttonbox3), info_close); + GTK_WIDGET_SET_FLAGS (info_close, GTK_CAN_DEFAULT); + + gtk_signal_connect (GTK_OBJECT (Info), "delete_event", + GTK_SIGNAL_FUNC (hide_window), + NULL); + gtk_signal_connect (GTK_OBJECT (info_close), "clicked", + GTK_SIGNAL_FUNC (on_info_close_clicked), + NULL); + + return Info; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/interface.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,7 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_About (void); +GtkWidget* create_Config (void); +GtkWidget* create_Info (void);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/main.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,293 @@ +/* + * Initial main.c file generated by Glade. Edit as required. + * Glade will not overwrite this file. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <gtk/gtk.h> +#include <libintl.h> + +#include "interface.h" +#include "support.h" +#include "main.h" + +#include <sstream> +//open() +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +//mmap() +#include <unistd.h> +#include <sys/mman.h> +#include <fstream> + +#include "../stddefs.h" +#include <libmodplug/stdafx.h> +#include <libmodplug/sndfile.h> +#include "../archive/open.h" + +#define MAX_MESSAGE_LENGTH 4000 + +GtkWidget *AboutWin = NULL; +GtkWidget *ConfigWin = NULL; +GtkWidget *InfoWin = NULL; + +void ShowAboutWindow() +{ + if(!AboutWin) + AboutWin = create_About(); + gtk_widget_show(AboutWin); +} + +void ShowConfigureWindow(const ModplugXMMS::Settings& aProps) +{ + if(!ConfigWin) + ConfigWin = create_Config(); + + if(aProps.mBits == 8) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "bit8"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "bit16"), TRUE); + + if(aProps.mFrequency == 11025) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp11"), TRUE); + else if (aProps.mFrequency == 22050) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp22"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "samp44"), TRUE); + + if(aProps.mChannels == 1) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "mono"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "stereo"), TRUE); + + if(aProps.mResamplingMode == 0) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "resampNearest"), TRUE); + else if(aProps.mResamplingMode == 1) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "resampLinear"), TRUE); + else if(aProps.mResamplingMode == 2) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "resampSpline"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "resampPolyphase"), TRUE); + + if(aProps.mNoiseReduction) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxNR"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxNR"), FALSE); + + if(aProps.mFastinfo) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxFastInfo"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxFastInfo"), FALSE); + + if(aProps.mUseFilename) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxUseFilename"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxUseFilename"), FALSE); + + if(aProps.mReverb) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxReverb"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxReverb"), FALSE); + + if(aProps.mMegabass) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxBassBoost"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxBassBoost"), FALSE); + + if(aProps.mSurround) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxSurround"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxSurround"), FALSE); + + if(aProps.mPreamp) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxPreamp"), TRUE); + else + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxPreamp"), FALSE); + + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxReverbDepth")), aProps.mReverbDepth); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxReverbDelay")), aProps.mReverbDelay); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxBassAmount")), aProps.mBassAmount); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxBassRange")), aProps.mBassRange); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxSurroundDepth")), aProps.mSurroundDepth); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxSurroundDelay")), aProps.mSurroundDelay); + gtk_adjustment_set_value(gtk_range_get_adjustment((GtkRange*)lookup_widget(ConfigWin, "fxPreampLevel")), aProps.mPreampLevel); + + if(aProps.mLoopCount < 0) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxLoopForever"), TRUE); + else if(aProps.mLoopCount == 0) + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxNoLoop"), TRUE); + else + { + gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(ConfigWin, "fxLoopFinite"), TRUE); + gtk_adjustment_set_value(gtk_spin_button_get_adjustment( + (GtkSpinButton*)lookup_widget(ConfigWin, "fxLoopCount")), aProps.mLoopCount); + } + + gtk_widget_show(ConfigWin); +} + +void ShowInfoWindow(const string& aFilename) +{ + if(!InfoWin) + InfoWin = create_Info(); + + uint32 lSongTime, lNumSamples, lNumInstruments, i; + string lInfo; + char lBuffer[33]; + stringstream lStrStream(ios::out); //C++ replacement for sprintf() + + CSoundFile* lSoundFile; + + Archive* lArchive; + string lShortFN; + uint32 lPos; + + lPos = aFilename.find_last_of('/') + 1; + lShortFN = aFilename.substr(lPos); + + //open and mmap the file + lArchive = OpenArchive(aFilename); + if(lArchive->Size() == 0) + { + delete lArchive; + return; + } + + lSoundFile = new CSoundFile; + lSoundFile->Create((uchar*)lArchive->Map(), lArchive->Size()); + + lInfo = lShortFN; + lInfo += '\n'; + lInfo += lSoundFile->GetTitle(); + lInfo += '\n'; + + switch(lSoundFile->GetType()) + { + case MOD_TYPE_MOD: + lInfo+= "ProTracker"; + break; + case MOD_TYPE_S3M: + lInfo+= "Scream Tracker 3"; + break; + case MOD_TYPE_XM: + lInfo+= "Fast Tracker 2"; + break; + case MOD_TYPE_IT: + lInfo+= "Impulse Tracker"; + break; + case MOD_TYPE_MED: + lInfo+= "OctaMed"; + break; + case MOD_TYPE_MTM: + lInfo+= "MTM"; + break; + case MOD_TYPE_669: + lInfo+= "669 Composer / UNIS 669"; + break; + case MOD_TYPE_ULT: + lInfo+= "ULT"; + break; + case MOD_TYPE_STM: + lInfo+= "Scream Tracker"; + break; + case MOD_TYPE_FAR: + lInfo+= "Farandole"; + break; + case MOD_TYPE_AMF: + lInfo+= "ASYLUM Music Format"; + break; + case MOD_TYPE_AMS: + lInfo+= "AMS module"; + break; + case MOD_TYPE_DSM: + lInfo+= "DSIK Internal Format"; + break; + case MOD_TYPE_MDL: + lInfo+= "DigiTracker"; + break; + case MOD_TYPE_OKT: + lInfo+= "Oktalyzer"; + break; + case MOD_TYPE_DMF: + lInfo+= "Delusion Digital Music Fileformat (X-Tracker)"; + break; + case MOD_TYPE_PTM: + lInfo+= "PolyTracker"; + break; + case MOD_TYPE_DBM: + lInfo+= "DigiBooster Pro"; + break; + case MOD_TYPE_MT2: + lInfo+= "MT2"; + break; + case MOD_TYPE_AMF0: + lInfo+= "AMF0"; + break; + case MOD_TYPE_PSM: + lInfo+= "PSM"; + break; + default: + lInfo+= "Unknown"; + break; + } + lInfo += '\n'; + + lSongTime = lSoundFile->GetSongTime(); + lStrStream.clear(); + lStrStream << (int)(lSongTime / 60) << ":"; + if(lSongTime % 60 < 10) //single digit for seconds? + lStrStream << '0'; //yes, so add a 0. + lStrStream << (int)(lSongTime % 60); + + lStrStream << '\n'; + + lStrStream << (int)lSoundFile->GetMusicSpeed() << '\n'; + lStrStream << (int)lSoundFile->GetMusicTempo() << '\n'; + lStrStream << (int)(lNumSamples = lSoundFile->GetNumSamples()) << '\n'; + lStrStream << (int)(lNumInstruments = lSoundFile->GetNumInstruments()); + lStrStream << '\n'; + lStrStream << (int)(lSoundFile->GetNumPatterns()) << '\n'; + lStrStream << (int)lSoundFile->GetNumChannels(); + lInfo += lStrStream.str(); + + gtk_label_set_text((GtkLabel*)lookup_widget(InfoWin, "info_general"), lInfo.c_str()); + + lInfo = ""; + for(i = 0; i < lNumSamples; i++) + { + lSoundFile->GetSampleName(i, lBuffer); + lInfo += lBuffer; + lInfo += '\n'; + } + gtk_label_set_text((GtkLabel*)lookup_widget(InfoWin, "info_samples"), lInfo.c_str()); + + lInfo = ""; + for(i = 0; i < lNumInstruments; i++) + { + lSoundFile->GetInstrumentName(i, lBuffer); + lInfo += lBuffer; + lInfo += '\n'; + } + gtk_label_set_text((GtkLabel*)lookup_widget(InfoWin, "info_instruments"), lInfo.c_str()); + + char message[MAX_MESSAGE_LENGTH]; + static int length = 0; + + //textbox = (GtkLabel*)lookup_widget(InfoWin, "info_message"); + //gtk_text_backward_delete(textbox, length); + length = lSoundFile->GetSongComments(message, MAX_MESSAGE_LENGTH, 80); + if (length != 0) { + gtk_label_set_text((GtkLabel*)lookup_widget(InfoWin, "info_message"), message); + } + + //unload the file + lSoundFile->Destroy(); + delete lSoundFile; + delete lArchive; + + gtk_widget_show(InfoWin); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/main.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,12 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#include <string> +#include "../modplugbmp.h" + +void ShowAboutWindow(); +void ShowConfigureWindow(const ModplugXMMS::Settings& aProps); +void ShowInfoWindow(const string& aFileName);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/support.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,159 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <string.h> + +#include <gtk/gtk.h> + +#include "support.h" + +/* This is an internally used function to check if a pixmap file exists. */ +static gchar* check_file_exists (const gchar *directory, + const gchar *filename); + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* create_dummy_pixmap (GtkWidget *widget); + +GtkWidget* +lookup_widget (GtkWidget *widget, + const gchar *widget_name) +{ + GtkWidget *parent, *found_widget; + + for (;;) + { + if (GTK_IS_MENU (widget)) + parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else + parent = widget->parent; + if (parent == NULL) + break; + widget = parent; + } + + found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget), + widget_name); + if (!found_widget) + g_warning ("Widget not found: %s", widget_name); + return found_widget; +} + +/* This is a dummy pixmap we use when a pixmap can't be found. */ +static char *dummy_pixmap_xpm[] = { +/* columns rows colors chars-per-pixel */ +"1 1 1 1", +" c None", +/* pixels */ +" " +}; + +/* This is an internally used function to create pixmaps. */ +static GtkWidget* +create_dummy_pixmap (GtkWidget *widget) +{ + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, + NULL, dummy_pixmap_xpm); + if (gdkpixmap == NULL) + g_error ("Couldn't create replacement pixmap."); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +static GList *pixmaps_directories = NULL; + +/* Use this function to set the directory containing installed pixmaps. */ +void +add_pixmap_directory (const gchar *directory) +{ + pixmaps_directories = g_list_prepend (pixmaps_directories, + g_strdup (directory)); +} + +/* This is an internally used function to create pixmaps. */ +GtkWidget* +create_pixmap (GtkWidget *widget, + const gchar *filename) +{ + gchar *found_filename = NULL; + GdkColormap *colormap; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + GtkWidget *pixmap; + GList *elem; + + /* We first try any pixmaps directories set by the application. */ + elem = pixmaps_directories; + while (elem) + { + found_filename = check_file_exists ((gchar*)elem->data, filename); + if (found_filename) + break; + elem = elem->next; + } + + /* If we haven't found the pixmap, try the source directory. */ + if (!found_filename) + { + found_filename = check_file_exists ("../pixmaps", filename); + } + + if (!found_filename) + { + g_warning (_("Couldn't find pixmap file: %s"), filename); + return create_dummy_pixmap (widget); + } + + colormap = gtk_widget_get_colormap (widget); + gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask, + NULL, found_filename); + if (gdkpixmap == NULL) + { + g_warning (_("Error loading pixmap file: %s"), found_filename); + g_free (found_filename); + return create_dummy_pixmap (widget); + } + g_free (found_filename); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + gdk_pixmap_unref (gdkpixmap); + gdk_bitmap_unref (mask); + return pixmap; +} + +/* This is an internally used function to check if a pixmap file exists. */ +gchar* +check_file_exists (const gchar *directory, + const gchar *filename) +{ + gchar *full_filename; + struct stat s; + gint status; + + full_filename = (gchar*) g_malloc (strlen (directory) + 1 + + strlen (filename) + 1); + strcpy (full_filename, directory); + strcat (full_filename, G_DIR_SEPARATOR_S); + strcat (full_filename, filename); + + status = stat (full_filename, &s); + if (status == 0 && S_ISREG (s.st_mode)) + return full_filename; + g_free (full_filename); + return NULL; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/gui/support.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,61 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#include <gtk/gtk.h> + +/* + * Standard gettext macros. + */ +#ifdef ENABLE_NLS +# include <libintl.h> +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + + +/* + * Public Functions. + */ + +/* + * This function returns a widget in a component created by Glade. + * Call it with the toplevel widget in the component (i.e. a window/dialog), + * or alternatively any widget in the component, and the name of the widget + * you want returned. + */ +GtkWidget* lookup_widget (GtkWidget *widget, + const gchar *widget_name); + +/* get_widget() is deprecated. Use lookup_widget instead. */ +#define get_widget lookup_widget + +/* Use this function to set the directory containing installed pixmaps. */ +void add_pixmap_directory (const gchar *directory); + + +/* + * Private Functions. + */ + +/* This is used to create the pixmaps in the interface. */ +GtkWidget* create_pixmap (GtkWidget *widget, + const gchar *filename); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/modplugbmp.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,839 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#include <fstream> +#include <unistd.h> +#include <math.h> + +#include "modplugbmp.h" +#include <libmodplug/stdafx.h> +#include <libmodplug/sndfile.h> +#include "stddefs.h" +#include "archive/open.h" + +// ModplugXMMS member functions =============================== + +// operations ---------------------------------------- +ModplugXMMS::ModplugXMMS() +{ + mSoundFile = new CSoundFile; +} +ModplugXMMS::~ModplugXMMS() +{ + delete mSoundFile; +} + +ModplugXMMS::Settings::Settings() +{ + mSurround = true; + mOversamp = true; + mReverb = false; + mMegabass = false; + mNoiseReduction = true; + mVolumeRamp = true; + mFastinfo = true; + mUseFilename = false; + + mChannels = 2; + mFrequency = 44100; + mBits = 16; + mResamplingMode = SRCMODE_POLYPHASE; + + mReverbDepth = 30; + mReverbDelay = 100; + mBassAmount = 40; + mBassRange = 30; + mSurroundDepth = 20; + mSurroundDelay = 20; + + mPreamp = false; + mPreampLevel = 0.0f; + + mLoopCount = 0; //don't loop +} + +void ModplugXMMS::Init(void) +{ + fstream lConfigFile; + string lField, lValue; + string lConfigFilename; + bool lValueB; + char junk; + + //I chose to use a separate config file to avoid conflicts + lConfigFilename = g_get_home_dir(); + lConfigFilename += "/.bmp/modplug-bmp.conf"; + lConfigFile.open(lConfigFilename.c_str(), ios::in); + + if(!lConfigFile.is_open()) + return; + + while(!lConfigFile.eof()) + { + lConfigFile >> lField; + if(lField[0] == '#') //allow comments + { + do + { + lConfigFile.read(&junk, 1); + } + while(junk != '\n'); + } + else + { + if(lField == "reverb_depth") + lConfigFile >> mModProps.mReverbDepth; + else if(lField == "reverb_delay") + lConfigFile >> mModProps.mReverbDelay; + else if(lField == "megabass_amount") + lConfigFile >> mModProps.mBassAmount; + else if(lField == "megabass_range") + lConfigFile >> mModProps.mBassRange; + else if(lField == "surround_depth") + lConfigFile >> mModProps.mSurroundDepth; + else if(lField == "surround_delay") + lConfigFile >> mModProps.mSurroundDelay; + else if(lField == "preamp_volume") + lConfigFile >> mModProps.mPreampLevel; + else if(lField == "loop_count") + lConfigFile >> mModProps.mLoopCount; + else + { + lConfigFile >> lValue; + if(lValue == "on") + lValueB = true; + else + lValueB = false; + + if(lField == "surround") + mModProps.mSurround = lValueB; + else if(lField == "oversampling") + mModProps.mOversamp = lValueB; + else if(lField == "reverb") + mModProps.mReverb = lValueB; + else if(lField == "megabass") + mModProps.mMegabass = lValueB; + else if(lField == "noisereduction") + mModProps.mNoiseReduction = lValueB; + else if(lField == "volumeramping") + mModProps.mVolumeRamp = lValueB; + else if(lField == "fastinfo") + mModProps.mFastinfo = lValueB; + else if(lField == "use_filename") + mModProps.mUseFilename = lValueB; + else if(lField == "preamp") + mModProps.mPreamp = lValueB; + + else if(lField == "channels") + { + if(lValue == "mono") + mModProps.mChannels = 1; + else + mModProps.mChannels = 2; + } + else if(lField == "frequency") + { + if(lValue == "22050") + mModProps.mFrequency = 22050; + else if(lValue == "11025") + mModProps.mFrequency = 11025; + else + mModProps.mFrequency = 44100; + } + else if(lField == "bits") + { + if(lValue == "8") + mModProps.mBits = 8; + else + mModProps.mBits = 16; + } + else if(lField == "resampling") + { + if(lValue == "nearest") + mModProps.mResamplingMode = SRCMODE_NEAREST; + else if(lValue == "linear") + mModProps.mResamplingMode = SRCMODE_LINEAR; + else if(lValue == "spline") + mModProps.mResamplingMode = SRCMODE_SPLINE; + else + mModProps.mResamplingMode = SRCMODE_POLYPHASE; + } + } //if(numerical value) else + } //if(comment) else + } //while(!eof) + + lConfigFile.close(); +} + +bool ModplugXMMS::CanPlayFile(const string& aFilename) +{ + string lExt; + uint32 lPos; + + lPos = aFilename.find_last_of('.'); + if((int)lPos == -1) + return false; + lExt = aFilename.substr(lPos); + for(uint32 i = 0; i < lExt.length(); i++) + lExt[i] = tolower(lExt[i]); + + if (lExt == ".669") + return true; + if (lExt == ".amf") + return true; + if (lExt == ".ams") + return true; + if (lExt == ".dbm") + return true; + if (lExt == ".dbf") + return true; + if (lExt == ".dsm") + return true; + if (lExt == ".far") + return true; + if (lExt == ".it") + return true; + if (lExt == ".mdl") + return true; + if (lExt == ".med") + return true; + if (lExt == ".mod") + return true; + if (lExt == ".mtm") + return true; + if (lExt == ".okt") + return true; + if (lExt == ".ptm") + return true; + if (lExt == ".s3m") + return true; + if (lExt == ".stm") + return true; + if (lExt == ".ult") + return true; + if (lExt == ".umx") //Unreal rocks! + return true; + if (lExt == ".xm") + return true; + if (lExt == ".j2b") + return true; + if (lExt == ".mt2") + return true; + if (lExt == ".psm") + return true; + + if (lExt == ".mdz") + return true; + if (lExt == ".mdr") + return true; + if (lExt == ".mdgz") + return true; + if (lExt == ".mdbz") + return true; + if (lExt == ".s3z") + return true; + if (lExt == ".s3r") + return true; + if (lExt == ".s3gz") + return true; + if (lExt == ".xmz") + return true; + if (lExt == ".xmr") + return true; + if (lExt == ".xmgz") + return true; + if (lExt == ".itz") + return true; + if (lExt == ".itr") + return true; + if (lExt == ".itgz") + return true; + if (lExt == ".dmf") + return true; + + if (lExt == ".zip") + return ContainsMod(aFilename); + if (lExt == ".rar") + return ContainsMod(aFilename); + if (lExt == ".gz") + return ContainsMod(aFilename); + if (lExt == ".bz2") + return ContainsMod(aFilename); + + return false; +} + +void* ModplugXMMS::PlayThread(void* arg) +{ + ((ModplugXMMS*)arg)->PlayLoop(); + return NULL; +} + +void ModplugXMMS::PlayLoop() +{ + uint32 lLength; + //the user might change the number of channels while playing. + // we don't want this to take effect until we are done! + uint8 lChannels = mModProps.mChannels; + + while(!mStopped) + { + if(!(lLength = mSoundFile->Read( + mBuffer, + mBufSize))) + { + //no more to play. Wait for output to finish and then stop. + while((mOutPlug->buffer_playing()) + && (!mStopped)) + usleep(10000); + break; + } + + if(mModProps.mPreamp) + { + //apply preamp + if(mModProps.mBits == 16) + { + uint n = mBufSize >> 1; + for(uint i = 0; i < n; i++) { + short old = ((short*)mBuffer)[i]; + ((short*)mBuffer)[i] *= mPreampFactor; + // detect overflow and clip! + if ((old & 0x8000) != + (((short*)mBuffer)[i] & 0x8000)) + ((short*)mBuffer)[i] = old | 0x7FFF; + + } + } + else + { + for(uint i = 0; i < mBufSize; i++) { + uchar old = ((uchar*)mBuffer)[i]; + ((uchar*)mBuffer)[i] *= mPreampFactor; + // detect overflow and clip! + if ((old & 0x80) != + (((uchar*)mBuffer)[i] & 0x80)) + ((uchar*)mBuffer)[i] = old | 0x7F; + } + } + } + + if(mStopped) + break; + + //wait for buffer space to free up. + while(((mOutPlug->buffer_free() + < (int)mBufSize)) + && (!mStopped)) + usleep(10000); + + if(mStopped) + break; + + mOutPlug->write_audio + ( + mBuffer, + mBufSize + ); + mInPlug->add_vis_pcm + ( + mPlayed, + mFormat, + lChannels, + mBufSize, + mBuffer + ); + + mPlayed += mBufTime; + } + +// mOutPlug->flush(0); + mOutPlug->close_audio(); + + //Unload the file + mSoundFile->Destroy(); + delete mArchive; + + if (mBuffer) + { + delete [] mBuffer; + mBuffer = NULL; + } + + mPaused = false; + mStopped = true; + + g_thread_exit(NULL); +} + +void ModplugXMMS::PlayFile(const string& aFilename) +{ + mStopped = true; + mPaused = false; + + //open and mmap the file + mArchive = OpenArchive(aFilename); + if(mArchive->Size() == 0) + { + delete mArchive; + return; + } + + if (mBuffer) + delete [] mBuffer; + + //find buftime to get approx. 512 samples/block + mBufTime = 512000 / mModProps.mFrequency + 1; + + mBufSize = mBufTime; + mBufSize *= mModProps.mFrequency; + mBufSize /= 1000; //milliseconds + mBufSize *= mModProps.mChannels; + mBufSize *= mModProps.mBits / 8; + + mBuffer = new uchar[mBufSize]; + if(!mBuffer) + return; //out of memory! + + CSoundFile::SetWaveConfig + ( + mModProps.mFrequency, + mModProps.mBits, + mModProps.mChannels + ); + CSoundFile::SetWaveConfigEx + ( + mModProps.mSurround, + !mModProps.mOversamp, + mModProps.mReverb, + true, + mModProps.mMegabass, + mModProps.mNoiseReduction, + false + ); + + // [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] + if(mModProps.mReverb) + { + CSoundFile::SetReverbParameters + ( + mModProps.mReverbDepth, + mModProps.mReverbDelay + ); + } + // [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] + if(mModProps.mMegabass) + { + CSoundFile::SetXBassParameters + ( + mModProps.mBassAmount, + mModProps.mBassRange + ); + } + // [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] + if(mModProps.mSurround) + { + CSoundFile::SetSurroundParameters + ( + mModProps.mSurroundDepth, + mModProps.mSurroundDelay + ); + } + CSoundFile::SetResamplingMode(mModProps.mResamplingMode); + mSoundFile->SetRepeatCount(mModProps.mLoopCount); + mPreampFactor = exp(mModProps.mPreampLevel); + + mPaused = false; + mStopped = false; + + mSoundFile->Create + ( + (uchar*)mArchive->Map(), + mArchive->Size() + ); + mPlayed = 0; + + bool useFilename = mModProps.mUseFilename; + + if(!useFilename) + { + strncpy(mModName, mSoundFile->GetTitle(), 100); + + for(int i = 0; mModName[i] == ' ' || mModName[i] == 0; i++) + { + if(mModName[i] == 0) + { + useFilename = true; //mod name is blank -- use filename + break; + } + } + } + + if(useFilename) + { + strncpy(mModName, strrchr(aFilename.c_str(), '/') + 1, 100); + char* ext = strrchr(mModName, '.'); + if(ext) *ext = '\0'; + } + + mInPlug->set_info + ( + mModName, + mSoundFile->GetSongTime() * 1000, + mSoundFile->GetNumChannels(), + mModProps.mFrequency / 1000, + mModProps.mChannels + ); + + mStopped = mPaused = false; + + if(mModProps.mBits == 16) + mFormat = FMT_S16_NE; + else + mFormat = FMT_U8; + + mOutPlug->open_audio + ( + mFormat, + mModProps.mFrequency, + mModProps.mChannels + ); + + mDecodeThread = g_thread_create( + (GThreadFunc)PlayThread, + this, + TRUE, + NULL + ); +} + +void ModplugXMMS::Stop(void) +{ + if(mStopped) + return; + + mStopped = true; + mPaused = false; + + g_thread_join(mDecodeThread); +} + +void ModplugXMMS::Pause(bool aPaused) +{ + if(aPaused) + mPaused = true; + else + mPaused = false; + + mOutPlug->pause(aPaused); +} + +void ModplugXMMS::Seek(float32 aTime) +{ + uint32 lMax; + uint32 lMaxtime; + float32 lPostime; + + if(aTime > (lMaxtime = mSoundFile->GetSongTime())) + aTime = lMaxtime; + lMax = mSoundFile->GetMaxPosition(); + lPostime = float(lMax) / lMaxtime; + + mSoundFile->SetCurrentPos(int(aTime * lPostime)); + + mOutPlug->flush(int(aTime * 1000)); + mPlayed = uint32(aTime * 1000); +} + +float32 ModplugXMMS::GetTime(void) +{ + if(mStopped) + return -1; + return (float32)mOutPlug->output_time() / 1000; +} + +void ModplugXMMS::GetSongInfo(const string& aFilename, char*& aTitle, int32& aLength) +{ + aLength = -1; + fstream lTestFile; + string lError; + bool lDone; + + lTestFile.open(aFilename.c_str(), ios::in); + if(!lTestFile) + { + lError = "**no such file: "; + lError += strrchr(aFilename.c_str(), '/') + 1; + aTitle = new char[lError.length() + 1]; + strcpy(aTitle, lError.c_str()); + return; + } + + lTestFile.close(); + + if(mModProps.mFastinfo) + { + if(mModProps.mUseFilename) + { + //Use filename as name + aTitle = new char[aFilename.length() + 1]; + strcpy(aTitle, strrchr(aFilename.c_str(), '/') + 1); + *strrchr(aTitle, '.') = '\0'; + return; + } + + fstream lModFile; + string lExt; + uint32 lPos; + + lDone = true; + + // previously ios::nocreate was used (X Standard C++ Library) + lModFile.open(aFilename.c_str(), ios::in); + + lPos = aFilename.find_last_of('.'); + if((int)lPos == 0) + return; + lExt = aFilename.substr(lPos); + for(uint32 i = 0; i < lExt.length(); i++) + lExt[i] = tolower(lExt[i]); + + if (lExt == ".mod") + { + lModFile.read(mModName, 20); + mModName[20] = 0; + } + else if (lExt == ".s3m") + { + lModFile.read(mModName, 28); + mModName[28] = 0; + } + else if (lExt == ".xm") + { + lModFile.seekg(17); + lModFile.read(mModName, 20); + mModName[20] = 0; + } + else if (lExt == ".it") + { + lModFile.seekg(4); + lModFile.read(mModName, 28); + mModName[28] = 0; + } + else + lDone = false; //fall back to slow info + + lModFile.close(); + + if(lDone) + { + for(int i = 0; mModName[i] != 0; i++) + { + if(mModName[i] != ' ') + { + aTitle = new char[strlen(mModName) + 1]; + strcpy(aTitle, mModName); + + return; + } + } + + //mod name is blank. Use filename instead. + aTitle = new char[aFilename.length() + 1]; + strcpy(aTitle, strrchr(aFilename.c_str(), '/') + 1); + *strrchr(aTitle, '.') = '\0'; + return; + } + } + + Archive* lArchive; + CSoundFile* lSoundFile; + const char* lTitle; + + //open and mmap the file + lArchive = OpenArchive(aFilename); + if(lArchive->Size() == 0) + { + lError = "**bad mod file: "; + lError += strrchr(aFilename.c_str(), '/') + 1; + aTitle = new char[lError.length() + 1]; + strcpy(aTitle, lError.c_str()); + delete lArchive; + return; + } + + lSoundFile = new CSoundFile; + lSoundFile->Create((uchar*)lArchive->Map(), lArchive->Size()); + + if(!mModProps.mUseFilename) + { + lTitle = lSoundFile->GetTitle(); + + for(int i = 0; lTitle[i] != 0; i++) + { + if(lTitle[i] != ' ') + { + aTitle = new char[strlen(lTitle) + 1]; + strcpy(aTitle, lTitle); + goto therest; //sorry + } + } + } + + //mod name is blank, or user wants the filename to be used as the title. + aTitle = new char[aFilename.length() + 1]; + strcpy(aTitle, strrchr(aFilename.c_str(), '/') + 1); + *strrchr(aTitle, '.') = '\0'; + +therest: + aLength = lSoundFile->GetSongTime() * 1000; //It wants milliseconds!?! + + //unload the file + lSoundFile->Destroy(); + delete lSoundFile; + delete lArchive; +} + +void ModplugXMMS::SetInputPlugin(InputPlugin& aInPlugin) +{ + mInPlug = &aInPlugin; +} +void ModplugXMMS::SetOutputPlugin(OutputPlugin& aOutPlugin) +{ + mOutPlug = &aOutPlugin; +} + +const ModplugXMMS::Settings& ModplugXMMS::GetModProps() +{ + return mModProps; +} + +const char* ModplugXMMS::Bool2OnOff(bool aValue) +{ + if(aValue) + return "on"; + else + return "off"; +} + +void ModplugXMMS::SetModProps(const Settings& aModProps) +{ + fstream lConfigFile; + string lConfigFilename; + + mModProps = aModProps; + + // [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] + if(mModProps.mReverb) + { + CSoundFile::SetReverbParameters + ( + mModProps.mReverbDepth, + mModProps.mReverbDelay + ); + } + // [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] + if(mModProps.mMegabass) + { + CSoundFile::SetXBassParameters + ( + mModProps.mBassAmount, + mModProps.mBassRange + ); + } + else //modplug seems to ignore the SetWaveConfigEx() setting for bass boost + { + CSoundFile::SetXBassParameters + ( + 0, + 0 + ); + } + // [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] + if(mModProps.mSurround) + { + CSoundFile::SetSurroundParameters + ( + mModProps.mSurroundDepth, + mModProps.mSurroundDelay + ); + } + CSoundFile::SetWaveConfigEx + ( + mModProps.mSurround, + !mModProps.mOversamp, + mModProps.mReverb, + true, + mModProps.mMegabass, + mModProps.mNoiseReduction, + false + ); + CSoundFile::SetResamplingMode(mModProps.mResamplingMode); + mPreampFactor = exp(mModProps.mPreampLevel); + + lConfigFilename = g_get_home_dir(); + lConfigFilename += "/.bmp/modplug-bmp.conf"; + lConfigFile.open(lConfigFilename.c_str(), ios::out); + + lConfigFile << "# Modplug BMP plugin config file\n" + << "# Modplug (C) 1999 Olivier Lapicque\n" + << "# XMMS port (C) 1999 Kenton Varda\n" + << "# BMP port (C) 2004 Theofilos Intzoglou" << endl; + + lConfigFile << "# ---Effects---" << endl; + lConfigFile << "reverb " << Bool2OnOff(mModProps.mReverb) << endl; + lConfigFile << "reverb_depth " << mModProps.mReverbDepth << endl; + lConfigFile << "reverb_delay " << mModProps.mReverbDelay << endl; + lConfigFile << endl; + lConfigFile << "surround " << Bool2OnOff(mModProps.mSurround) << endl; + lConfigFile << "surround_depth " << mModProps.mSurroundDepth << endl; + lConfigFile << "surround_delay " << mModProps.mSurroundDelay << endl; + lConfigFile << endl; + lConfigFile << "megabass " << Bool2OnOff(mModProps.mMegabass) << endl; + lConfigFile << "megabass_amount " << mModProps.mBassAmount << endl; + lConfigFile << "megabass_range " << mModProps.mBassRange << endl; + lConfigFile << endl; + lConfigFile << "oversampling " << Bool2OnOff(mModProps.mOversamp) << endl; + lConfigFile << "noisereduction " << Bool2OnOff(mModProps.mNoiseReduction) << endl; + lConfigFile << "volumeramping " << Bool2OnOff(mModProps.mVolumeRamp) << endl; + lConfigFile << "fastinfo " << Bool2OnOff(mModProps.mFastinfo) << endl; + lConfigFile << "use_filename " << Bool2OnOff(mModProps.mUseFilename) << endl; + lConfigFile << "loop_count " << mModProps.mLoopCount << endl; + lConfigFile << endl; + lConfigFile << "preamp " << Bool2OnOff(mModProps.mPreamp) << endl; + lConfigFile << "preamp_volume " << mModProps.mPreampLevel << endl; + lConfigFile << endl; + + lConfigFile << "# ---Quality---" << endl; + lConfigFile << "channels "; + if(mModProps.mChannels == 1) + lConfigFile << "mono" << endl; + else + lConfigFile << "stereo" << endl; + lConfigFile << "bits " << (int)mModProps.mBits << endl; + lConfigFile << "frequency " << mModProps.mFrequency << endl; + lConfigFile << "resampling "; + switch(mModProps.mResamplingMode) + { + case SRCMODE_NEAREST: + lConfigFile << "nearest" << endl; + break; + case SRCMODE_LINEAR: + lConfigFile << "linear" << endl; + break; + case SRCMODE_SPLINE: + lConfigFile << "spline" << endl; + break; + default: + case SRCMODE_POLYPHASE: + lConfigFile << "fir" << endl; + break; + }; + + lConfigFile.close(); +} + +ModplugXMMS gModplugXMMS;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/modplugbmp.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,112 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#ifndef __MODPLUGXMMS_CMODPLUGXMMS_H_INCLUDED__ +#define __MODPLUGXMMS_CMODPLUGXMMS_H_INCLUDED__ + +#include <string> + +#ifndef __MODPLUGXMMS_STDDEFS_H__INCLUDED__ +#include "stddefs.h" +#endif + +#include "plugin.h" + +using namespace std; + +class CSoundFile; +class Archive; + +class ModplugXMMS +{ +public: + struct Settings + { + bool mSurround; + bool mOversamp; + bool mMegabass; + bool mNoiseReduction; + bool mVolumeRamp; + bool mReverb; + bool mFastinfo; + bool mUseFilename; + bool mPreamp; + + uint8 mChannels; + uint8 mBits; + uint32 mFrequency; + uint32 mResamplingMode; + + uint32 mReverbDepth; + uint32 mReverbDelay; + uint32 mBassAmount; + uint32 mBassRange; + uint32 mSurroundDepth; + uint32 mSurroundDelay; + float mPreampLevel; + int32 mLoopCount; + + Settings(); + }; + + ModplugXMMS(); + ~ModplugXMMS(); + + void Init(); // Called when the plugin is loaded + bool CanPlayFile(const string& aFilename);// Return true if the plugin can handle the file + + void CloseConfigureBox(); + + void PlayFile(const string& aFilename);// Play the file. + void Stop(); // Stop playing. + void Pause(bool aPaused); // Pause or unpause. + + void Seek(float32 aTime); // Seek to the specified time. + float32 GetTime(); // Get the current play time. + + void GetSongInfo(const string& aFilename, char*& aTitle, int32& aLength); // Function to grab the title string + + void SetInputPlugin(InputPlugin& aInPlugin); + void SetOutputPlugin(OutputPlugin& aOutPlugin); + + const Settings& GetModProps(); + void SetModProps(const Settings& aModProps); + +private: + InputPlugin* mInPlug; + OutputPlugin* mOutPlug; + + uchar* mBuffer; + uint32 mBufSize; + + bool mPaused; + volatile bool mStopped; + + Settings mModProps; + + AFormat mFormat; + + uint32 mBufTime; //milliseconds + + CSoundFile* mSoundFile; + Archive* mArchive; + + uint32 mPlayed; + + GThread* mDecodeThread; + + char mModName[100]; + + float mPreampFactor; + + void PlayLoop(); + static void* PlayThread(void* arg); + const char* Bool2OnOff(bool aValue); +}; + +extern ModplugXMMS gModplugXMMS; + +#endif //included
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/plugin.cpp Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,111 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +#include "plugin.h" +#include <libmodplug/modplug.h> +#include "gui/main.h" + +extern InputPlugin gModPlug; + +static void Init(void) +{ + gModplugXMMS.SetInputPlugin(gModPlug); + gModplugXMMS.Init(); +} + +static int CanPlayFile(char* aFilename) +{ + if(gModplugXMMS.CanPlayFile(aFilename)) + return 1; + return 0; +} + +static void PlayFile(char* aFilename) +{ + gModplugXMMS.SetOutputPlugin(*gModPlug.output); + gModplugXMMS.PlayFile(aFilename); +} + +static void Stop(void) +{ + gModplugXMMS.Stop(); +} + +static void Pause(short aPaused) +{ + gModplugXMMS.Pause((bool)aPaused); +} + +static void Seek(int aTime) +{ + gModplugXMMS.Seek(float32(aTime)); +} +static int GetTime(void) +{ + float32 lTime; + + lTime = gModplugXMMS.GetTime(); + if(lTime == -1) + return -1; + else + return (int)(lTime * 1000); +} + +static void GetSongInfo(char* aFilename, char** aTitle, int* aLength) +{ + gModplugXMMS.GetSongInfo(aFilename, *aTitle, *aLength); +} + +void ShowAboutBox(void) +{ + ShowAboutWindow(); +} + +void ShowConfigureBox(void) +{ + ShowConfigureWindow(gModplugXMMS.GetModProps()); +} + +void ShowFileInfoBox(char* aFilename) +{ + ShowInfoWindow(aFilename); +} + +InputPlugin gModPlug = +{ + NULL, + NULL, + "ModPlug Player", + Init, + ShowAboutBox, + ShowConfigureBox, + CanPlayFile, + NULL, + PlayFile, + Stop, + Pause, + Seek, + NULL, + GetTime, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + GetSongInfo, + ShowFileInfoBox, + NULL +}; + +extern "C" +{ + InputPlugin* get_iplugin_info (void) + { + return &gModPlug; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/plugin.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,133 @@ +/* From XMMS... */ + +#ifndef PLUGIN_H +#define PLUGIN_H + +#include<glib.h> + +typedef enum +{ + FMT_U8, FMT_S8, FMT_U16_LE, FMT_U16_BE, FMT_U16_NE, FMT_S16_LE, FMT_S16_BE, FMT_S16_NE +} +AFormat; + +typedef struct +{ + void *handle; /* Filled in by xmms */ + char *filename; /* Filled in by xmms */ + char *description; /* The description that is shown in the preferences box */ + void (*init) (void); + void (*about) (void); /* Show the about box */ + void (*configure) (void); /* Show the configuration dialog */ + void (*get_volume) (int *l, int *r); + void (*set_volume) (int l, int r); /* Set the volume */ + int (*open_audio) (AFormat fmt, int rate, int nch); /* Open the device, if the device can't handle the given + parameters the plugin is responsible for downmixing + the data to the right format before outputting it */ + void (*write_audio) (void *ptr, int length); /* The input plugin calls this to write data to the output + buffer */ + void (*close_audio) (void); /* No comment... */ + void (*flush) (int time); /* Flush the buffer and set the plugins internal timers to time */ + void (*pause) (short paused); /* Pause or unpause the output */ + int (*buffer_free) (void); /* Return the amount of data that can be written to the buffer, + two calls to this without a call to write_audio should make + the plugin output audio directly */ + int (*buffer_playing) (void); /* Returns TRUE if the plugin currently is playing some audio, + otherwise return FALSE */ + int (*output_time) (void); /* Return the current playing time */ + int (*written_time) (void); /* Return the length of all the data that has been written to + the buffer */ +} +OutputPlugin; + +typedef struct +{ + void *handle; /* Filled in by xmms */ + char *filename; /* Filled in by xmms */ + char *description; /* The description that is shown in the preferences box */ + void (*init) (void); /* Called when the plugin is loaded */ + void (*cleanup) (void); /* Called when the plugin is unloaded */ + void (*about) (void); /* Show the about box */ + void (*configure) (void); /* Show the configure box */ + int (*mod_samples) (gpointer *data, gint length, AFormat fmt, gint srate, gint nch); /* Modify samples */ + void (*query_format) (AFormat *fmt,gint *rate, gint *nch); +} +EffectPlugin; + +typedef enum +{ + INPUT_VIS_ANALYZER, INPUT_VIS_SCOPE, INPUT_VIS_VU, INPUT_VIS_OFF +} +InputVisType; + +typedef struct +{ + void *handle; /* Filled in by xmms */ + char *filename; /* Filled in by xmms */ + char *description; /* The description that is shown in the preferences box */ + void (*init) (void); /* Called when the plugin is loaded */ + void (*about) (void); /* Show the about box */ + void (*configure) (void); + int (*is_our_file) (char *filename); /* Return 1 if the plugin can handle the file */ + GList *(*scan_dir) (char *dirname); /* Look in Input/cdaudio/cdaudio.c to see how */ + /* to use this */ + void (*play_file) (char *filename); /* Guess what... */ + void (*stop) (void); /* Tricky one */ + void (*pause) (short paused); /* Pause or unpause */ + void (*seek) (int time); /* Seek to the specified time */ + void (*set_eq) (int on, float preamp, float *bands); /* Set the equalizer, most plugins won't be able to do this */ + int (*get_time) (void); /* Get the time, usually returns the output plugins output time */ + void (*get_volume) (int *l, int *r); /* Input-plugin specific volume functions, just provide a NULL if */ + void (*set_volume) (int l, int r); /* you want the output plugin to handle it */ + void (*add_vis) (int time, unsigned char *data, InputVisType type); /* OBSOLETE, DO NOT USE! */ + InputVisType (*get_vis_type) (void); /* OBSOLETE, DO NOT USE! */ + void (*add_vis_pcm) (int time, AFormat fmt, int nch, int length, void *ptr); /* Send data to the visualization plugins + Preferably 512 samples/block */ + void (*set_info) (char *title, int length, int rate, int freq, int nch); /* Fill in the stuff that is shown in the player window + set length to -1 if it's unknown. Filled in by xmms */ + void (*set_info_text) (char *text); /* Show some text in the song title box in the main window, + call it with NULL as argument to reset it to the song title. + Filled in by xmms */ + void (*get_song_info) (char *filename, char **title, int *length); /* Function to grab the title string */ + void (*file_info_box) (char *filename); /* Bring up an info window for the filename passed in */ + OutputPlugin *output; /* Handle to the current output plugin. Filled in by xmms */ +} +InputPlugin; + +/* So that output plugins can communicate with effect plugins */ +EffectPlugin *get_current_effect_plugin(void); +int effects_enabled(void); + +typedef struct +{ + void *handle; /* Filled in by xmms */ + char *filename; /* Filled in by xmms */ + int xmms_session; /* The session ID for attaching to the control socket */ + char *description; /* The description that is shown in the preferences box */ + void (*init) (void); /* Called when the plugin is enabled */ + void (*about) (void); /* Show the about box */ + void (*configure) (void); + void (*cleanup) (void); /* Called when the plugin is disabled or when xmms exits */ +} +GeneralPlugin; + +typedef struct _VisPlugin +{ + void *handle; /* Filled in by xmms */ + char *filename; /* Filled in by xmms */ + int xmms_session; /* The session ID for attaching to the control socket */ + char *description; /* The description that is shown in the preferences box */ + int num_pcm_chs_wanted; /* Numbers of PCM channels wanted in the call to render_pcm */ + int num_freq_chs_wanted; /* Numbers of freq channels wanted in the call to render_freq */ + void (*init)(void); /* Called when the plugin is enabled */ + void (*cleanup)(void); /* Called when the plugin is disabled */ + void (*about)(void); /* Show the about box */ + void (*configure)(void); /* Show the configure box */ + void (*disable_plugin)(struct _VisPlugin *); /* Call this with a pointer to your plugin to disable the plugin */ + void (*playback_start)(void); /* Called when playback starts */ + void (*playback_stop)(void); /* Called when playback stops */ + void (*render_pcm)(gint16 pcm_data[2][512]); /* Render the PCM data, don't do anything time consuming in here */ + void (*render_freq)(gint16 freq_data[2][256]); /* Render the freq data, don't do anything time consuming in here */ +} VisPlugin; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/Input/modplug/stddefs.h Sat Dec 10 14:31:13 2005 -0800 @@ -0,0 +1,40 @@ +/* Modplug XMMS Plugin + * Authors: Kenton Varda <temporal@gauge3d.org> + * + * This source code is public domain. + */ + +// stddefs.h: Standard defs to streamline coding style. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(__MODPLUGXMMS_STDDEFS_H__INCLUDED__) +#define __MODPLUGXMMS_STDDEFS_H__INCLUDED__ + +//Invalid pointer +#ifndef NULL +#define NULL 0 +#endif + +//Standard types. ---------------------------------------- +//These data types are provided because the standard types vary across +// platforms. For example, long is 64-bit on some 64-bit systems. +//u = unsigned +//# = size in bits +typedef unsigned char uchar; + +typedef char int8; +typedef short int16; +typedef int int32; +typedef long long int64; + +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned int uint32; +typedef unsigned long long uint64; + +typedef float float32; +typedef double float64; +typedef long double float128; + +#endif // included
--- a/configure.ac Sat Dec 10 13:54:12 2005 -0800 +++ b/configure.ac Sat Dec 10 14:31:13 2005 -0800 @@ -377,18 +377,22 @@ AM_CONDITIONAL([HAVE_LIBSNDFILE], test "$enable_sndfile" = "yes") -dnl *** mikmod -AC_ARG_ENABLE( mikmod, -[ --disable-mikmod Disable mikmod input plugin [default=enabled]],, - enable_mikmod="yes") +dnl *** modplug + +AC_ARG_ENABLE(modplug, + [ --disable-modplug disable ModPlug plugin (default=enabled)], + [enable_modplug=$enableval], + [enable_modplug="yes"] +) -if test "x$enable_mikmod" = xyes; then - AM_PATH_LIBMIKMOD(3.1.5,have_mikmod=yes, have_mikmod=no) +if test "$enable_modplug" = "yes"; then + AC_CHECK_LIB([modplug],[XMLinearTable],[have_modplug=yes],[have_modplug=no]) else - AC_MSG_RESULT([*** mikmod plugin disabled per user request ***]) - have_mikmod=no + AC_MSG_RESULT([*** ModPlug plugin disabled per user request ***]) + have_modplug="no" fi -AM_CONDITIONAL(HAVE_MIKMOD,test "x$have_mikmod" = xyes) + +AM_CONDITIONAL([HAVE_MODPLUG], test "$have_modplug" = "yes") dnl *** flac AC_ARG_ENABLE( flc, @@ -728,7 +732,9 @@ Plugins/Input/aac/libmp4v2/Makefile Plugins/Input/aac/libfaad2/Makefile Plugins/Input/aac/src/Makefile - Plugins/Input/mikmod/Makefile + Plugins/Input/modplug/Makefile + Plugins/Input/modplug/archive/Makefile + Plugins/Input/modplug/gui/Makefile Plugins/Input/tonegen/Makefile Plugins/Input/vorbis/Makefile Plugins/Input/cdaudio/Makefile @@ -793,7 +799,7 @@ echo " + id3v2 editing: $have_id3lib" echo " MPEG 4 Audio (AAC): $enable_aac" echo " Windows Media Audio (wma): $enable_wma" -echo " Module decoder (mikmod): $enable_mikmod" +echo " Module decoder (modplug): $enable_modplug" echo " CD Digital Audio (cdda): yes" echo " Microsoft WAV (wav): yes" echo " + sndfile extensions: $enable_sndfile"