diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..a3f6b12e --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..e69de29b diff --git a/Makefile b/Makefile deleted file mode 100644 index 33eae6aa..00000000 --- a/Makefile +++ /dev/null @@ -1,24 +0,0 @@ - -#MAIN_OBJS = getopt.o getopt1.o options.o drivers.o main.o -MAIN_OBJS = sound_alsa.o terminal.o info.o options.o main.o -MAIN_DFILES = Makefile $(MAIN_OBJS:.o=.c) -MAIN_PATH = players/xmp - -dist-main: - mkdir -p $(DIST)/$(MAIN_PATH) - cp -RPp $(addprefix $(MAIN_PATH)/,$(MAIN_DFILES)) $(DIST)/$(MAIN_PATH) - -$(MAIN_PATH)/options.o: Makefile - -M_OBJS = $(addprefix $(MAIN_PATH)/,$(MAIN_OBJS)) - -$(MAIN_PATH)/xmp: $(M_OBJS) - @CMD='$(LD) -o $@ $(LDFLAGS) $(M_OBJS) -Llib -lxmp -lm -lasound'; \ - if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo LD $@ ; fi; \ - eval $$CMD - -install-xmp: $(MAIN_PATH)/xmp - @echo Installing xmp in $(DESTDIR)$(BINDIR) - @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) - @$(INSTALL_PROGRAM) $+ $(DESTDIR)$(BINDIR) - diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..9617cb60 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,70 @@ +VERSION = 3.9.0 + +CC = @CC@ +CFLAGS = -c @CFLAGS@ @DEFS@ @CPPFLAGS@ +LD = @CC@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +INSTALL = @INSTALL@ +DESTDIR = +prefix = @prefix@ +exec_prefix = @prefix@ +datarootdir = @datarootdir@ +BINDIR = @bindir@ +LIBDIR = @libdir@ +MANDIR = @mandir@/man1 +SYSCONFDIR = @sysconfdir@/xmp +SHELL = /bin/sh + +DIST = xmp-$(VERSION) +DFILES = README INSTALL configure configure.ac Makefile.in +DDIRS = src drivers +V = 0 + +all: binaries + +include src/Makefile +include src/drivers/Makefile + +CFLAGS += -I. -DVERSION=\"$(VERSION)\" + +.SUFFIXES: .c .o .lo .a .so .dll + +.c.o: + @CMD='$(CC) $(CFLAGS) -o $*.o $<'; \ + if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo CC $*.o ; fi; \ + eval $$CMD + +binaries: src/xmp + +clean: + @rm -f $(OBJS) + +install: install-xmp install-docs + +depend: + @echo Building dependencies... + @echo > $@ + @for i in $(OBJS) do \ + c="$${i%.o}.c"; l="$${i%.o}.lo"; \ + $(CC) $(CFLAGS) -MM $$c | \ + sed "s!^.*\.o:!$$i $$l:!" >> $@ ; \ + done + +dist: dist-prepare dist-subdirs + +dist-prepare: + rm -Rf $(DIST) $(DIST).tar.gz + mkdir -p $(DIST) + cp -RPp $(DFILES) $(DIST)/ + +dist-subdirs: $(addprefix dist-,$(DDIRS)) + chmod -R u+w $(DIST)/* + tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz + rm -Rf $(DIST) + ls -l $(DIST).tar.gz + +$(OBJS): Makefile + +sinclude depend + diff --git a/README b/README new file mode 100644 index 00000000..e69de29b diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..4fbb9a7c --- /dev/null +++ b/configure.ac @@ -0,0 +1,27 @@ +dnl AC_CONFIG_AUX_DIR(./scripts) +AC_INIT +0>confdefs.h + +AC_ARG_WITH(libxmp, [ --with-libxmp= libxmp prefix (optional)], + libxmp_path="$withval") + +AC_PROG_CC + +if test "$libxmp_path" != ""; then + CINCS="${CINCS} -I${libxmp_path}/include" + LIBS="${LIBS} -L${libxmp_path}/lib" +fi +CPPFLAGS="${CINCS}" + +AC_CHECK_HEADER(xmp.h) +if test "${ac_cv_header_xmp_h}" = "yes"; then + AC_CHECK_LIB(xmp,xmp_player_start,, + AC_MSG_ERROR(Can't find libxmp)) +else + AC_MSG_ERROR(Can't find libxmp header files) +fi + + +AC_PROG_INSTALL +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/install-sh b/install-sh new file mode 100755 index 00000000..6781b987 --- /dev/null +++ b/install-sh @@ -0,0 +1,520 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 00000000..95f6ce0c --- /dev/null +++ b/src/Makefile @@ -0,0 +1,22 @@ + +#SRC_OBJS = getopt.o getopt1.o options.o drivers.o main.o +SRC_OBJS = sound_alsa.o terminal.o info.o options.o main.o +SRC_DFILES = Makefile xmp.1 $(SRC_OBJS:.o=.c) common.h +SRC_PATH = src + +OBJS += $(addprefix $(SRC_PATH)/,$(SRC_OBJS)) + +dist-src: + mkdir -p $(DIST)/$(SRC_PATH) + cp -RPp $(addprefix $(SRC_PATH)/,$(SRC_DFILES)) $(DIST)/$(SRC_PATH) + +$(SRC_PATH)/xmp: $(OBJS) + @CMD='$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) -lasound'; \ + if [ "$(V)" -gt 0 ]; then echo $$CMD; else echo LD $@ ; fi; \ + eval $$CMD + +install-xmp: $(SRC_PATH)/xmp + @echo Installing xmp in $(DESTDIR)$(BINDIR) + @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) + @$(INSTALL_PROGRAM) $+ $(DESTDIR)$(BINDIR) + diff --git a/common.h b/src/common.h similarity index 100% rename from common.h rename to src/common.h diff --git a/drivers.c b/src/drivers.c similarity index 100% rename from drivers.c rename to src/drivers.c diff --git a/drivers/Makefile b/src/drivers/Makefile similarity index 100% rename from drivers/Makefile rename to src/drivers/Makefile diff --git a/drivers/aix.c b/src/drivers/aix.c similarity index 100% rename from drivers/aix.c rename to src/drivers/aix.c diff --git a/drivers/alsa.c b/src/drivers/alsa.c similarity index 100% rename from drivers/alsa.c rename to src/drivers/alsa.c diff --git a/drivers/alsa05.c b/src/drivers/alsa05.c similarity index 100% rename from drivers/alsa05.c rename to src/drivers/alsa05.c diff --git a/drivers/amiga.c b/src/drivers/amiga.c similarity index 100% rename from drivers/amiga.c rename to src/drivers/amiga.c diff --git a/drivers/beos.c b/src/drivers/beos.c similarity index 100% rename from drivers/beos.c rename to src/drivers/beos.c diff --git a/drivers/bsd.c b/src/drivers/bsd.c similarity index 100% rename from drivers/bsd.c rename to src/drivers/bsd.c diff --git a/drivers/debug.c b/src/drivers/debug.c similarity index 100% rename from drivers/debug.c rename to src/drivers/debug.c diff --git a/drivers/file.c b/src/drivers/file.c similarity index 100% rename from drivers/file.c rename to src/drivers/file.c diff --git a/drivers/hpux.c b/src/drivers/hpux.c similarity index 100% rename from drivers/hpux.c rename to src/drivers/hpux.c diff --git a/drivers/netbsd.c b/src/drivers/netbsd.c similarity index 100% rename from drivers/netbsd.c rename to src/drivers/netbsd.c diff --git a/drivers/openbsd.c b/src/drivers/openbsd.c similarity index 100% rename from drivers/openbsd.c rename to src/drivers/openbsd.c diff --git a/drivers/os2_dart.c b/src/drivers/os2_dart.c similarity index 100% rename from drivers/os2_dart.c rename to src/drivers/os2_dart.c diff --git a/drivers/oss.c b/src/drivers/oss.c similarity index 100% rename from drivers/oss.c rename to src/drivers/oss.c diff --git a/drivers/osx.c b/src/drivers/osx.c similarity index 100% rename from drivers/osx.c rename to src/drivers/osx.c diff --git a/drivers/pulseaudio.c b/src/drivers/pulseaudio.c similarity index 100% rename from drivers/pulseaudio.c rename to src/drivers/pulseaudio.c diff --git a/drivers/qnx.c b/src/drivers/qnx.c similarity index 100% rename from drivers/qnx.c rename to src/drivers/qnx.c diff --git a/drivers/sgi.c b/src/drivers/sgi.c similarity index 100% rename from drivers/sgi.c rename to src/drivers/sgi.c diff --git a/drivers/smix.c b/src/drivers/smix.c similarity index 100% rename from drivers/smix.c rename to src/drivers/smix.c diff --git a/drivers/sndio.c b/src/drivers/sndio.c similarity index 100% rename from drivers/sndio.c rename to src/drivers/sndio.c diff --git a/drivers/solaris.c b/src/drivers/solaris.c similarity index 100% rename from drivers/solaris.c rename to src/drivers/solaris.c diff --git a/drivers/wav.c b/src/drivers/wav.c similarity index 100% rename from drivers/wav.c rename to src/drivers/wav.c diff --git a/drivers/win32.c b/src/drivers/win32.c similarity index 100% rename from drivers/win32.c rename to src/drivers/win32.c diff --git a/getopt.c b/src/getopt.c similarity index 100% rename from getopt.c rename to src/getopt.c diff --git a/getopt1.c b/src/getopt1.c similarity index 100% rename from getopt1.c rename to src/getopt1.c diff --git a/info.c b/src/info.c similarity index 100% rename from info.c rename to src/info.c diff --git a/main-old.c b/src/main-old.c similarity index 100% rename from main-old.c rename to src/main-old.c diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/options.c b/src/options.c similarity index 100% rename from options.c rename to src/options.c diff --git a/sound.h b/src/sound.h similarity index 100% rename from sound.h rename to src/sound.h diff --git a/sound_alsa.c b/src/sound_alsa.c similarity index 100% rename from sound_alsa.c rename to src/sound_alsa.c diff --git a/terminal.c b/src/terminal.c similarity index 100% rename from terminal.c rename to src/terminal.c diff --git a/src/xmp.1 b/src/xmp.1 new file mode 100644 index 00000000..723ade13 --- /dev/null +++ b/src/xmp.1 @@ -0,0 +1,239 @@ +.TH "XMP" "1" "Version 3\&.5\&.0" "Jan 2012" "Extended Module Player" +.PP +.SH "NAME" +xmp - Extended Module Player +.PP +.SH "SYNOPSIS" +\fBxmp\fP +[\fB-8, --8bit\fP] +[\fB-a, --amplify\fP \fIfactor\fP] +[\fB-b, --bits\fP \fIbits\fP] +[\fB-c, --stdout\fP] +[\fB-D\fP \fIdevice-specific parameters\fP] +[\fB-d, --driver\fP \fIdriver\fP] +[\fB--fix-sample-loop\fP] +[\fB-F, --click-filter\fP] +[\fB-f, --frequency\fP \fIrate\fP] +[\fB-h, --help\fP] +[\fB-I, --instrument-path\fP] +[\fB-i, --interpolate\fP] +[\fB--load-only\fP] +[\fB-l, --loop\fP] +[\fB-M, --mute\fP \fIchannel-list\fP] +[\fB-m, --mono\fP] +[\fB--nocmd\fP] +[\fB--nofilter\fP] +[\fB-n, --nearest\fP] +[\fB--nopan\fP] +[\fB--norc\fP] +[\fB-o, --output-file\fP \fIfilename\fP] +[\fB-P, --pan\fP \fIpan\fP] +[\fB--probe-only\fP] +[\fB-R --random\fP] +[\fB--realtime\fP] +[\fB-r --reverse\fP] +[\fB--show-time\fP] +[\fB-S, --solo\fP \fIchannel-list\fP] +[\fB-s, --start\fP \fIpos\fP] +[\fB--stereo\fP] +[\fB-T, --tempo\fP \fIbpm\fP] +[\fB-t, --time\fP \fItime\fP] +[\fB-u, --unsigned\fP] +[\fB-V, --version\fP] +[\fB-v, --verbose\fP] +\fImodules\fP +.PP +.SH "DESCRIPTION" +\fBxmp\fP is a tracked music module player\&. It plays many +module formats including Fasttracker II (XM), Noise/Fast/Protracker (MOD), +Scream Tracker 3 (S3M) and Impulse Tracker (IT)\&. Use \f(CWxmp --help\fP +for a complete list of supported formats\&. +.PP +\fBxmp\fP can play through several output devices including the Open +Sound System sequencer, linear and ulaw PCM audio devices or mixing +to a raw or WAV file\&. +.PP +.SH "OPTIONS" +.IP "\fB-8, --8bit\fP" +Convert 16 bit samples to 8 bit\&. You may want to use this mode to +save memory in the sound device (AWE cards will ignore this mode and +always work with 16 bit samples)\&. +.IP "\fB-a, --amplify\fP \fIfactor\fP" +Amplification factor for the software mixer\&. Valid amplification factors +are 0 (normal), 1 (x2), 2 (x4) and 3 (x8)\&. Warning\&: amplification +factors higher than 0 may cause distorted or noisy output\&. +.IP "\fB-b, --bits\fP \fIbits\fP" +Set the software mixer resolution (8 or 16 bits)\&. If ommited, +The audio device will be opened at the highest resolution available\&. +.IP "\fB-c, --stdout\fP" +Mix the module to stdout\&. +.IP "\fB-D\fP \fIdevice-specific parameter\fP" +Pass a configuration parameter to the device driver\&. See the +\fBDEVICE DRIVER PARAMETERS\fP section below for a +list of known parameters\&. +.IP "\fB-d, --driver\fP \fIdriver\fP" +Select the output driver\&. If not specified, \fBxmp\fP will try to +probe each available driver\&. +.IP "\fB--fix-sample-loop\fP" +Force sample loop start in samples instead of 16-bit words\&. This +option affects only MOD files\&. +.IP "\fB-F, --click-filter\fP" +Use the LPF filter to remove clicks from the software mixer output\&. +.IP "\fB-f, --frequency\fP \fIrate\fP" +Set the software mixer sampling rate in hertz\&. +.IP "\fB-h, --help\fP" +Show a short summary of command-line options\&. +.IP "\fB-I, --instrument-path\fP \fIpath\fP" +Set the pathname to the directory containing external samples\&. +.IP "\fB-i, --interpolate\fP" +Enable software mixer linear interpolation\&. +.IP "\fB--load-only\fP" +Exit after loading the module\&. +.IP "\fB-l, --loop\fP" +Enable module looping and backward pattern jumps\&. +.IP "\fB-M, --mute\fP \fIchannel-list\fP" +Mute the specified channels\&. \fIchannel-list\fP is a comma-separated +list of decimal channel ranges\&. Example: 0,2-4,8-16\&. +.IP "\fB-m, --mono\fP" +Force mono output (default is stereo in stereo-capable devices)\&. +.IP "\fB--nocmd\fP" +Disable interactive commands\&. +.IP "\fB--nofilter\fP" +Disable IT filters\&. When using the software mixer, IT filters can +significantly increase CPU usage on slow machines\&. In this case, +disable filtering with this option\&. +.IP "\fB-n, --nearest\fP" +Enable software mixer nearest neighbor interpolation\&. +.IP "\fB--nopan\fP" +Disable dynamic panning\&. This option can be used to prevent +clicking when playing in AWE32 cards\&. Module formats that rely only +in dynamic pan setting to produce stereo output (e\&.g\&. XM) will use +the MOD channel panning (LRRL)\&. +.IP "\fB--norc\fP" +Don't read the configuration files\&. +.IP "\fB-o, --output-file\fP \fIfilename\fP" +Set the output file name when mixing to raw or WAV files\&. If \'-\' is +given as the file name, the output will be sent to stdout\&. +.IP "\fB-P, --pan\fP \fInum\fP" +Set the percentual panning amplitude\&. +.IP "\fB--probe-only\fP" +Exit after probing the audio device\&. +.IP "\fB-R, --random\fP" +Play modules in random order\&. +.IP "\fB--realtime\fP" +Play modules in realtime priority (available for FreeBSD)\&. +.IP "\fB-r, --reverse\fP" +Reverse the left/right stereo channels\&. +.IP "\fB--show-time\fP" +Display elapsed and remaining time\&. +.IP "\fB-S, --solo\fP \fIchannel-list\fP" +Play only the specified channels\&. \fIchannel-list\fP is a +comma-separated list of decimal channel ranges\&. Example: 0,2-4,8-16\&. +.IP "\fB-s, --start\fP \fIpos\fP" +Start playing the module from the position \fIpos\fP\&. +.IP "\fB--stereo\fP" +Force stereo output\&. +.IP "\fB-T, --tempo\fP \fIbpm\fP" +Set the initial tempo in beats per minute (default is 125)\&. +.IP "\fB-t, --time\fP \fItime\fP" +Specifies the maximum playing time to \fItime\fP seconds\&. +.IP "\fB-u, --unsigned\fP" +Tell the software mixer to use unsigned samples when mixing to +a file (default is signed)\&. +.IP "\fB-V, --version\fP" +Print version information\&. +.IP "\fB-v, --verbose\fP" +Verbose mode (incremental)\&. If specified more than once, the +verbosity level will be increased (no messages will be displayed +when the player runs in background)\&. +.PP +.SH "DEVICE DRIVER PARAMETERS" +Use the option \fB-D\fP to send parameters directly to the device +drivers\&. Multiple \fB-D\fP options can be specified in the command line\&. +.PP +OSS software mixing: +.IP "\fB-D\fP \fIfrag=num,size\fP" +Set the maximum number of fragments to \fInum\fP and the size of +each fragment to \fIsize\fP bytes (must be a power of two)\&. +The number and size of fragments set a tradeoff between the buffering +latency and sensibility to system load\&. To get better synchronization, +reduce the values\&. To avoid gaps in the sound playback, increase +the values\&. +.IP "\fB-D\fP \fIdev=device_name\fP" +Set the audio device to open\&. Default is /dev/dsp\&. +.IP "\fB-D\fP \fInosync\fP" +Don\'t sync the OSS audio device between modules\&. +.PP +HP-UX and Solaris audio: +.IP "\fB-D\fP \fIgain=value\fP" +Set the audio gain\&. Valid \fIvalue\fP goes from 0 to 255\&. +The default is 128\&. +.IP "\fB-D\fP \fIport={s|h|l}\fP" +Set the audio port\&. Valid arguments are \fIs\fP for the internal +speaker, \fIh\fP for headphones and \fIl\fP for line out\&. The default +is the internal speaker\&. +.IP "\fB-D\fP \fIbuffer=size\fP" +Set the size in bytes of the audio buffer\&. The default value is 32 Kb\&. +.PP +File output: +.IP "\fB-D\fP \fIbig-endian\fP" +Generate big-endian 16-bit samples (default is the machine byte ordering)\&. +.IP "\fB-D\fP \fIlittle-endian\fP" +Generate little-endian 16-bit samples (default is the machine byte ordering)\&. +.PP +.SH "INTERACTIVE COMMANDS" +The following single key commands can be used when playing modules: +.IP "\fBq\fP" +Stop the currently playing module and quit the player\&. +.IP "\fBf\fP" +Jump to the next pattern\&. +.IP "\fBb\fP" +Jump to the previous pattern\&. +.IP "\fBn\fP" +Jump to the next module\&. +.IP "\fBp\fP" +Jump to the previous module\&. +.IP "\fBSPACE\fP" +Pause the module\&. +.IP "\fB1\fP, \fB2\fP, \fB3\fP, \fB4\fP, \fB5\fP, \fB6\fP, \fB7\fP, \fB8\fP, \fB9\fP, \fB0\fP" +Mute/unmute channels 1 to 10\&. +.IP "\fB!\fP" +Unmute all channels\&. +.PP +Interactive mode can be disabled using the \fB--nocmd\fP command +line option\&. +.PP +.SH "NOTES" +When using the OSS sequencer with an AWE card, xmp will wipe out any +soundfonts already loaded in the card\&. +.PP +.SH "EXAMPLES" +Play module muting channels 0 to 3 and 6\&: +.IP "" +\f(CWxmp --mute=0-3,6 module\&.mod\&.gz\fP +.PP +Play modules in /dev/dsp using the default device settings (unsigned 8bit, +8 kHz mono): +.IP "" +\f(CWxmp -o/dev/dsp -f8000 -m -b8 -u module\&.lha\fP +.PP +Play all XM modules in the /mod directory and all subdirectories in +random order, ignoring any configuration set in the xmp\&.conf file\&: +.IP "" +\f(CWxmp --norc -R `find /mod -name "*\&.xm*" -print`\fP +.PP +.SH "ENVIRONMENT" +.IP "\fBXMP_INSTRUMENT_PATH\fP" +Pathname to directory containing samples if not contained in the module\&. +.PP +.IP "\fBXMP_MED2_INSTRUMENT_PATH\fP" +Overrides samples directory for the MED2 loader\&. +.PP +.SH "FILES" +\f(CW/etc/xmp/xmp\&.conf\&, $HOME/\&.xmp/xmp\&.conf\&, /etc/xmp/modules\&.conf\&, $HOME/\&.xmp/modules\&.conf\fP +.PP +.SH "AUTHOR" +Claudio Matsuoka and Hipolito Carraro Jr. Portions of code +used in xmp have been contributed by several other authors, +see docs/CREDITS for the complete list. +.PP