DBMix-0.9.8/0000777000076400007640000000000007436306703006260 5DBMix-0.9.8/Makefile.in0000664000076400007640000002674307436306702010256 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ SUBDIRS = include dbaudiolib dbfsd_src xmms_plugin dbmixer dbplaylist EXTRA_DIST = Readme.cueing Readme.devel Readme.exmixer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \ config.h.in config.sub configure configure.in install-sh ltconfig \ ltmain.sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/README0000644000076400007640000005755207436306655007100 DBMix Digital Audio Mixing System ================================= Robert Michael S Dean (c) 1999, 2000 Note: If you have not installed dbmix before, you may get the following error during the make process: gcc -O2 -o dbcat -L/usr/lib -L/usr/X11R6/lib -lgtk ... Line truncated /usr/bin/ld: cannot find -ldbaudiolib collect2: ld returned 1 exit status make2: *** dbcat Error 1 make2: Leaving directory /home/futant/DBMix-0.9.7-2' make: *** all-recursive-am Error 2 If this error occurs, cd to the dbaudiolib, make install, then cd back to the top level dbmix directory and do a global make install for the package. Note: If you are having problems with DBMix, and wish for help, please attempt to recreate your problem with dbfsd debugging turned on (run ./configure with the --enable-debug option, make install, and run "dbfsd -d"), and send along the output of "cat /dev/sndstat". This will greatly speed up the diagnosis of your problem. Thanks. Note: I have tested all of this to the best of my ability. You may experience problems, but I doubt it. If you do, email me at BobDean@sourceforge.net I will try to get a patch out as fast as I can (I work full time, which takes precedence). New Features in this release: - unified playlist - dbplaylist - digital sampler w/in dbmixer - beat matching synchronization tools. - rewritten xmms plugin - session recording to wav file - mixing master and cue output into single channel for single soundcard systems (see dbfsd section for more info) - Removal of terminatorX support, as terminatorX does not work on my system, even when installed from rpms. Output audio is corrupted. If you would like to use terminatorX, the files are in CVS, along with directions on how to use them. Contents ======== 1.0 Overveiw 2.0 Forget explaining the system, tell me how to use it Section 3.0 System Components 3.1 DBfsd - the DB Fourier Synthesis Daemon. 3.2 DBCat - command line dbfsd client. 3.2.1 - DBCat use 3.2.2 - Using DBCat with GQMPEG. 3.3 DBIn - command line line input client 3.4 DBMixer - DBMix GUI 3.4.1 Overview 3.4.2 Restrictions 3.4.3 USING DBMIXER: 3.4.3.1 Channel Box Components 3.4.3.2 Crossfading Components 3.4.3.3 The Sample Editor Box 3.4.3.4 The Controls Box 3.5 DBPlaylist - unified playlist 3.5.1 Overview 3.5.2 The playlist 3.5.3 Command buttons 3.6 Exmixer - and external device to control dbmixer 3.7 XMMS Output plugin 4.0 DBAudioLib 5.0 CUEING 1.0 Overveiw ============ The DBMix system allows a user to combine multiple audio streams into a single stream for output using a single sound card. NOTE: It is similar to esound in this regard, but has different design goals and architecture. This document is intended to give a quick introduction to DBMix. More complete doc's will be available at DBMix.souceforge.org as soon as I complete them. Any questions, feel free to email me at BobDean@users.sourceforge.net DBMix was developed on Redhat Linux 6.0. The development machine is a Dual celeron with 256 MB of ram. I have used DBMix to successfully DJ multiple parties. Hopefully it will work as well for you as it does for me. -Bob 2.0 Forget explaining the system, tell me how to use it Section ================================================================ To install dbmix, in the DBMix root directory, configure, make and install. This will install the following DBMix components: dbfsd dbcat dbaudiolib xmms output plugin dbmixer (standalone and xmms general plugin verions) You will need glib/gtk 1.2+ and the xmms-devel files in order to compile the source code successfully. To use terminatorX as a DBMix client, README.terminatorX file in the DBMix/terminatorX directory. Basically, terminatorX is a software program that allows you to "scratch" digital audio just like you can vinyl records. Scratching is just one of terminatorX's capabilities, check out http://www-stud.fht-esslingen.de/~alkoit00/tX/ for more information. It will be well worth your time and effort. =) To use it: 1) run dbfsd. It should be install in /usr/local/bin. Type dbfsd -h to get the list of command line parameters. dbfsd is the sound daemon for DBMix. It must be the first component of DBMix to be launched. 2) run dbmixer. It should also be installed in /usr/local/bin. dbmixer is a DJ Mixer style gui interface to DBMix 3) run xmms. In the Preferences->Audio I/O Plugins dialog, select the DBMix output plugin, 4) Select "Allow Multiple Instances" from the xmms Preferences->Options dialog to use multiple xmms sessions at once. Then you can use the nifty crossfader component of dbmixer. (or use the DBMix client of your choice) 5) Play some audio. 3.0 System Components ===================== The Goal of DBMix is to provide the user with every capability found in an analog DJ System. To accomplish this, DBMix contains the following components: 3.1 DBfsd - the DB Fourier Synthesis Daemon. -------------------------------------------- This is the application that actually combines the input audio and cue streams. DBfsd works by opening a static number of input "channels", and waiting for input on those "channels". When input arrives, it is read, fourier syntheis is applied, and the data is sent to the soundcard. Currently there is only one channel type implemented using pipes to transfer the data.. The idea of a network based channel is also in development, but not included in this release. DBfsd is designed to accept 16 bit unsigned 44.1 KHz audio. This is format commonly associated with digital audio. Combining this with the default input channel type allows a user to send sound to the daemon using command line IO redirection in the traditional concept of UNIX filters: "mpg123 -s filename > /tmp/ch#_comm" Even though IO redirection is supported, if you wish to use the command line interface, please use dbcat. dbcat uses dbaudiolib and therefore allows you to control the audio stream from dbmixer. The command line options for dbfsd are as follows: Supported options (argument type in parens) [defaults in brackets]: -d turn on debug messages to console (none) [Off] -c enable cue output (none) [no cue] -e output cue as left channel of master out (none) [Off] -n set total number of input channels (int) [4] -s set number of input channels to be sockets (int) [0] -a set master output audio device (string) [/dev/dsp0] -b set cue output audio device (string) [/dev/dsp2] -r set number of OSS output fragments (int) [128] -o write mixed output to stdout (none) [Off] -v print version information (none) -h print this message (none) DBFsd now supports cueing with a single soundcard, although two soundcards is the prefered method. This is accomplished be mixing the cue and master data into mono streams, and outputing the master signal as the right channel and the cue signal as the left channel of the soundcard output. Thus, with a couple of "Y" connectors from Radio Shack, you can enjoy master and cue outputs. Enabling this option will also enable cue output. Of particular interest to you should be the -r option, by reducing the number of OSS output fragments, you will reduce the latency between pressing a button in xmms and hearing the results of that action. This is also controllable using the preferences dialog in dbmixer. DBFsd now supports recording of a session. The interface to the recording functionality is handled by dbmixer. The output will be a 16 bit, stereo, 44.1 KHz WAV file. 3.2 DBCat - command line dbfsd client. -------------------------------------- 3.2.1 It is used with commandline piping as follows: "mpg123 -s filename | dbcat" dbcat makes use of the DBAudioLib library which is described below. Supported options [defaults in brackets]: -d turn on debug messages to console [Off] -v print version information. [None] -m input data is mono. [Stereo] -r N input data has a sampling rate of N Hz [44100 Hz] -8 input data is 8 bit unsigned samples [16 bit signed] -c X use channel X if available [first available] -S sample only mode. [none] Of interest here is the -S mode. In this mode, dbcat will output blank audio data ONLY. The purpose of this is to provide a channel for only outputing digitial samples. 3.2.2 To use gqmpeg as a client: 1) run gqmpeg with standard out piped to dbcat: "gqmpeg | dbcat &" 2) Open the preferences dialog for gqmpeg 3) Choose the Output tab 4) In the User Options text field at the bottom, enter "-s" 3.3 DBIn - command line line input client ----------------------------------------- DBin allows you to send line-in audio to dbmix, and control it as you do any other channel. This is the client that will allow you use the microphone jack on your soundcard, or connect an external audio device (CD player, Mini-Disc player, record player, etc...) to the line in jack. The command line options for dbin are as follows: -d print debug messages (none) [off] -l audio input source in line in (none) [mic] -a set audio device path (string) [/dev/dsp] -c X use channel X if available (int) [first available] -m input data is mono. (none) [Stereo] -r N input sampling rate is N Hz (int) [44100 Hz] -8 input data is 8 bit unsigned (none) [16 bit signed] -s output to stdout, not dbmix (none) [dbmix] -h print help screen (none) [mic] The default audio source for dbin is the microphone. To use dbin with a CD player (or other device), use the -l command line option to set the audio source to be line in. IMPORTANT: The audio device used by dbin MUST be duplex. Also, this device MUST NOT be used for the master or cue output of dbmix. Violating either of these restrictions will cause dbin to output an empty audio stream. 3.4 DBMixer - DBMix GUI ----------------------- 3.4.1 Overview This is a quick and dirty explanation. The best way to learn about dbmixer is to use it. DBMixer provides a gui interface to the channel control variables. Currently, DBMixer allows the user to accomplish the following: - control the volume of each channel independently - mute each channel independently - toggle the cue status of each channel - CROSSFADE!! CROSSFADE!!! CROSSFADE!! - Control the master output volume for each of your sound cards. - adjust the pitch (speed) of each channel independently - Change output between soundcards on the fly (useful when your master card blows out during a gig, systems back up and running in about 2 seconds at exactly the same spot as when it stopped) - Mic talkover, mutes all channels that are not a microphone by 75% - Cue Split, places cue output in the right cup of your headphones, and the master output in the left. - Balance control, similar to the balance control found on your stereo. - Digital Sampler, record up to 10 seconds of a song for playback at a later time. 3.4.2 Restrictions ------------------ DBMixer has the following RESTRICTIONS: - If you have a maximum number of clients running, dbmixer will not start. This is a problem with allocating the DBMix system shared memory, and is on the bug list. If this occurs, close one of your clients, start dbmixer, and then restart your last client. 3.4.3 USING DBMIXER: -------------------- DBMixer has three main areaa: 1) The channel boxes - one for each channel. Contains the channel selector, buttons for mute cue and pause, the volume slider, and the pitch slider. 2) The crossfader box - contains the punch buttons, crossfade channel selectors, the crossfader, and the autofade buttons 3) The controls box - contains the clipping light, mic talkover button, cue split button, balance slider, master and cue soundcard volumes, Autofade speed and the Options menu. 3.4.3.1 Channel Box Components ------------------------------ To Cue a channel, select its Cue button. To Mute a channel, select its Mute button. To Pause a channel, select its Pause button. To Play a recorded sample once, select its Once button. To Play a recorded sample in a loop, sleect its Loop button to start playback, and select the button again to stop playback. To change the volume of a channel, use the level slider (the vertical slider). Note that the number associated with the slider is the inverse of what it should be. By this I mean, that a shown value of 0 means that volume is at 100%, a value of 20 means that the volume is at 80% and so on. To speed up or slow down a channel, use the pitch control (the horizontal slider). The "<5" and "5>" buttons will adjust the speed by - and + 5%, and the "-|-" button will reset the pitch to 100%. Below the pitch buttons are the Pitch Sync buttons. While the buttons are depressed, they will temporarially slow (-S button), pause, (.]S[. button), and speed up (S+) button the track. The purpose of these three buttons is to assist in Beat Matching. Once you have two or more tracks playing at the same speed with the pitch buttons/slider, use the sync buttons to get the tracks in perfect beat syncronization. 3.4.3.2 Crossfading Components ------------------------------ The crossfader has 3 parts, the fader slider itself, and the two channel selectors, one on each side of the fader. To crossfade: 1) Select the channels to fade between. This is accomplished by selecting the channel numbers with the channel selectors. 2) Move the fader slider to the desired position. OR 3) Use the Autofade buttons to move the faders for you. There are three autofade buttons located to the right of the fader. They are: "<" fade to the left, "/\" centers the fader, and ">" fades to the right. To adjust the speed of the autofade, position the Autofade Spd. slider found to the right of the autofade buttons. The value of this slider is the fade time from left to right in seconds. Punch Buttons. To either side of the crossfader channel selectors are buttons that say PUNCH. Pressing this button will cause the volume for the selected crossfader channel to be set to maximum while the punch button is pressed. When the button is released, the channel volume will return to its previous value. This is usefull for quickly overlaying soundbytes from one stream over another. 3.4.3.3 The Sample Editor Box ----------------------------- The Sample Editor Box is a little confusing, because labels were left out to condense its size. The description of its elements will occur from top of the box to the bottom. First is the channel selector box. This is used to select the channel to record a sample from, or to edit an existing sample. Next are the Load and Save buttons. These are used to Load a saved sample, and save a recorded sample. Next is the Record Sample button. Select this button to start recording a sample, and select it again to stop recording. Recording will automatically stop when the sample buffer is full (10 seconds), and if this occurs, the button will de-select itself. Next are the start and end sliders. Use these sliders to adjust the start time and end time of your sample. The values at the top of the sliders are the time offsets in seconds within the sample. Hint: I find it best to edit samples while the sample is looping. You may safely slide the sliders while the sample is playing, when you do, the sample will restart from its new start position. After the sliders is the Copy Sample To button followed by another channel selector box. These two elements allow you to copy a sample from one channel to another. For example, to a dbcat channel which is in sample only mode. To copy a sample, first select the channel in the selector, then click the Copy Sample To button. I realize that this is a little unorthodox, but combining the label and button into one saves UI size. 3.4.3.4 The Controls Box ------------------------ Clipping. Clipping is a term which means the strength of the combined audio signals is too large for output, and the excess has been cut off. This can lead to distortion. In the upper right hand corner of dbmixer is the word "Clipping:" next to a green icon. This icon is the Clipping Light. When the icon changes to red, clipping is occuring. To fix this problem, lower the volumes for each playing channel until the light is a steady green again. Clipping is most likely to occur during crossfades. In such a situation it will be temporary and may be ignored at your discretion. The xmms general plugin version of dbmixer is no longer supported, and should be removed from your system. Next is the Mic Talkover button. This will cut all output channels to 1/3 volume to allow Microphone input to be heard. See the DBIn section to learn how to enable microphone input. Next is the balance slider. This element will adjust the balance of the master output, akin to the balance control found on stereo components and DJ Mixers. The Main and Cue sliders allow you to adjust the soundcard volume for the Master and Cue devices. Autofade Spd. slider controls the speed of the autofade. The default is 6 seconds, and the maximum is 15 seconds. A neat trick is to adjust the fade speed while an autofade is occuring. When done correctly, this will cause multiple fade outs. 3.5 DBPlaylist - unified playlist --------------------------------- 3.5.1 Overveiw -------------- DBPlaylist is a unified playlist for controlling dbmix clients. It uses two players, where each player is an dbmix client. The main features of dbplaylist are the ability to "cue" songs, set up one player while the other is playing, to automatically alternate players, and to track what songs have already been played. dbplaylist has no command line options. 3.5.2 The playlist ------------------ The playlist is the list in the gui. Each item in the playlist has two data elements, the name of the song, and the Player where that song will be played. To add songs to the playlist, drag and drop a file from your favorite file manager onto the list. (Dragging onto the buttons will not work) To reorder a song in the list, simply drag the song up or down in the list. As you are dragging, a green highlight bar will appear beneath the mouse. The location that is highlight is the position where the dragged song will be placed when you release the mouse. The pink highlight is used to represent the next song to be cue'd or sent to a player. The hightlight has the following behaviors: - When you reorder songs in the list by dragging, the cue highlight will always stay on the same song unless you drop a song on top of it. - If you drag a song on top of the cue highlight, that song will become the next song to be cued. - If you drag a song from lower in the list to above the cue highlight, the highlight will move down one position. - If you drag a song from above the cue highlight to beneath the cue highlight, the highlight will move up one position. - If you delete the song that has the cue highlight, the next song in the list will inherit the cue hightlight. - The player for the cue highlight'd song will ALWAYS stay the same unless you specifically change it. - The players for the songs beneath the cue highlight will always alternate, regardless of what the player order is for the songs above the cue highlight. The blue highlight represents the currently selected row. This is the row on which delete and swap operations can be performed. 3.5.3 Command buttons --------------------- Cue Next Song - Takes the song under the cue highlight, and sets up that song on the player assigned to that song. The cue hightlight is then moved to the next song in the list. Note that if a song is cued, it's text color will change to red, this way you can track songs that have already been played. Cue /\ - Moves the cue highlight up one position in the playlist, keeping the player for the cue highlight the same. Cue \/ - Moves the cue highlight down one position in the playlist, keeping the player for the cue highlight the same. Swap Player - Swaps the player number for the selected song. (blue highlight) Delete - Deletes the selected song. (blue highlight) Load List - Load an mp3 playlist. Supported play list extensions: .m3u, .M3U Save List - Save the current playlist as an mp3 playlist. This saved list is in a format that can be read by xmms, therefore no state information (player, current cue index, etc) will be saved in the list. Full Cue - When full cue is enabled, dbplaylist will not allow you to cue a song to a player that is current playing a song. You will get an error message box. Player 1 and Player 2 - These are drop down lists, which contain the current list of dbmix clients. dbplaylist only has the concept of two players. But, you the user have the ability to pick which dbmix clients these players represent. Currently, only xmms clients are supported. 3.6 Exmixer - and external device to control dbmixer ---------------------------------------------------- Simon Werner has designed an easy to build external DJ Mixer style device to control dbmixer. He has willingly created a document including directions on how you can build one of your very own. Please see the Readme.emixer document included with the disrtibution. The Exmixer code is not included by default, you must enable it with the --enable-exmixer parameter to the dbmix configure script. 3.7 XMMS plugins ----------------- The xmms output plugin should be automatically installed for you into your xmms directory. Follow the directions that ship with XMMS to select these plugins. 4.0 DBAudioLib -------------- This is the common library used by dbcat and the xmms output plugin to communicate with DBfsd. The purpose of DBAudioLib is to provide a simple, easy to use interface to send data to dbfsd. DBAudiolib also perfroms basic operations to the data it is given, unbeknowst to the client application. Currently DBAudiolib supports the following adjustments: - amplitude/volume control - channel mute - cueing - speed/pitch control - format conversion To develop with DBAudioLib, see Readme.devel 5.0 CUEING ========== Cueing is enabled by specifying the -c command line option for dbfsd. With previous versions of DBMix, the was an issue with synching the cue and master output. This issue has been fixed. 1) The default audio devices are: #define DEFAULT_AUDIO_DEVICE "/dev/dsp0" #define DEFAULT_CUE_AUDIO_DEVICE "/dev/dsp2" if the cue device path is different on your system, you can either a) change the #define in DBMix/dbfsd_src/dbaudio.h or b) use the -a and -b command line options for dbfsd or c) use the dbmixer options dialog and the "Reset Soundcard" options on the dbmixer options menu. d) use the -e option for dbfsd to multiplex master and cue output on the master out signal 2) To use cueing on a channel, use the dbmixer gui. Click the "cue" button to turn it off/on. 3) Cue volume is unaffected by the channel gain level. This is modeled after mixers I have had experience with. This means that the channel volume could be zero, and the cue volume will still be at 100%. Feature in the Next Release =========================== DBPlaylist - a single playlist that will "talk" with multiple xmms sessions and cue songs for you. Network Layer - Because you all are just dying to ship audio through your home network from your PC to your hoe theater... Icecast Support - Believe it or not, people want to use DBMix to run internet radio stations. Go Figure. LADSPA effects stack for xmms DBMix-0.9.8/stamp-h.in0000644000076400007640000000001207436306701010064 timestamp DBMix-0.9.8/AUTHORS0000644000076400007640000000105507346372413007246 Lead Developer: Robert Michael S Dean exmixer code and hardware developed by: Simon Werner , first released with 0.9.7. The following people have greatly helped in debugging DBMix: 0.9.6 Owen Williams - synching the cue and main audio channels in 0.9.7 Martin Herrman for testing possible releases for me, and Park3r for riding me until I realized that, yes, 2.4.x kernels broke dbmix. Which led to the smarter I/O routines in dbfsd. DBMix-0.9.8/COPYING0000755000076400007640000004311007346372413007232 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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) year 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. DBMix-0.9.8/ChangeLog0000644000076400007640000124174507436277256007776 ? config.guess ? Makefile.in ? config.h.in ? config.h ? config.cache ? config.status ? Makefile ? testsample.dbmix ? testrecord.wav ? dbaudiolib/DBAudio_Close.sampler.c ? dbaudiolib/DBAudio_Init.sampler.c ? dbaudiolib/.libs ? dbaudiolib/Makefile.in ? dbaudiolib/Makefile ? dbaudiolib/debug.lo ? dbaudiolib/DBAudio_IPC.lo ? dbaudiolib/DBAudio_Init.lo ? dbaudiolib/DBAudio_Close.lo ? dbaudiolib/DBAudio_Get_Version.lo ? dbaudiolib/DBAudio_Ready.lo ? dbaudiolib/DBAudio_Volume.lo ? dbaudiolib/DBAudio_Rate.lo ? dbaudiolib/DBAudio_Channels.lo ? dbaudiolib/DBAudio_Format.lo ? dbaudiolib/DBAudio_Cue.lo ? dbaudiolib/DBAudio_Pause.lo ? dbaudiolib/DBAudio_Write.lo ? dbaudiolib/DBAudio_Read.lo ? dbaudiolib/DBAudio_Channel_Name.lo ? dbaudiolib/DBAudio_Channel_Type.lo ? dbaudiolib/DBAudio_Channel_Flags.lo ? dbaudiolib/DBAudio_Get_Bufsize.lo ? dbaudiolib/DBAudio_perror.lo ? dbaudiolib/DBAudio_Mute.lo ? dbaudiolib/DBAudio_Sampler.lo ? dbaudiolib/dbaudiolib.lo ? dbaudiolib/libdbaudiolib.la ? dbaudiolib/DBAudio_Sampler.bak.c ? dbaudiolib/.deps/debug.P ? dbaudiolib/.deps/DBAudio_Init.P ? dbaudiolib/.deps/DBAudio_Ready.P ? dbaudiolib/.deps/DBAudio_Volume.P ? dbaudiolib/.deps/DBAudio_IPC.P ? dbaudiolib/.deps/DBAudio_Close.P ? dbaudiolib/.deps/DBAudio_Pause.P ? dbaudiolib/.deps/DBAudio_Format.P ? dbaudiolib/.deps/DBAudio_Get_Version.P ? dbaudiolib/.deps/DBAudio_Write.P ? dbaudiolib/.deps/DBAudio_Rate.P ? dbaudiolib/.deps/DBAudio_Channels.P ? dbaudiolib/.deps/DBAudio_perror.P ? dbaudiolib/.deps/DBAudio_Cue.P ? dbaudiolib/.deps/DBAudio_Channel_Flags.P ? dbaudiolib/.deps/DBAudio_Read.P ? dbaudiolib/.deps/DBAudio_Channel_Name.P ? dbaudiolib/.deps/dbaudiolib.P ? dbaudiolib/.deps/DBAudio_Channel_Type.P ? dbaudiolib/.deps/DBAudio_Get_Bufsize.P ? dbaudiolib/.deps/DBAudio_Mute.P ? dbaudiolib/.deps/DBAudio_Sampler.P ? dbfsd_src/DBAudio_Init.c ? dbfsd_src/dbfsd.sampler.c ? dbfsd_src/Makefile.in ? dbfsd_src/Makefile ? dbfsd_src/.libs ? dbfsd_src/dbfsd ? dbfsd_src/dbcat ? dbfsd_src/dbin ? dbfsd_src/.deps/dbfsd.P ? dbfsd_src/.deps/debug.P ? dbfsd_src/.deps/dbin.P ? dbfsd_src/.deps/fsadders.P ? dbfsd_src/.deps/dbaudio.P ? dbfsd_src/.deps/dbcat.P ? dbmixer/Makefile.in ? dbmixer/Makefile ? dbmixer/.libs ? dbmixer/dbmixer ? dbmixer/dbmsg_test ? dbmixer/testsample.dbmix ? dbmixer/.deps/soundcard_control.P ? dbmixer/.deps/about.P ? dbmixer/.deps/debug.P ? dbmixer/.deps/dbmixer_standalone.P ? dbmixer/.deps/dbmsg_test.P ? dbmixer/.deps/channel.P ? dbmixer/.deps/crossfader.P ? dbmixer/.deps/dbmixer.P ? dbmixer/.deps/exmixer_prefs.P ? dbmixer/.deps/light.P ? dbmixer/.deps/preferences.P ? dbmixer/.deps/exmixer.P ? dbmixer/.deps/save_prefs.P ? dbmixer/.deps/sample_editor.P ? dbplaylist/example.c ? dbplaylist/Makefile.in ? dbplaylist/Makefile ? dbplaylist/.deps ? dbplaylist/.libs ? dbplaylist/dbplaylist ? dbplaylist/MIXES ? dbplaylist/testlist.m3u ? dbplaylist/test.m3u ? include/Makefile.in ? include/Makefile ? terminatorX/tX_audiodevice.cc-v3.70.cc ? xmms_plugin/Makefile.in ? xmms_plugin/Makefile ? xmms_plugin/.libs ? xmms_plugin/dbmix.lo ? xmms_plugin/mixer.lo ? xmms_plugin/about.lo ? xmms_plugin/configure.lo ? xmms_plugin/audio.lo ? xmms_plugin/init.lo ? xmms_plugin/debug.lo ? xmms_plugin/libdbmix.la ? xmms_plugin/audio.bak.c ? xmms_plugin/audio.bak2.c ? xmms_plugin/.deps/dbmix.P ? xmms_plugin/.deps/audio.P ? xmms_plugin/.deps/mixer.P ? xmms_plugin/.deps/about.P ? xmms_plugin/.deps/debug.P ? xmms_plugin/.deps/init.P ? xmms_plugin/.deps/configure.P RCS file: /cvsroot/dbmix/DBMix-cvs/AUTHORS,v Working file: AUTHORS head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/03/13 23:45:32; author: bobdean; state: Exp; lines: +9 -3 Added park3r and martin herrman to the AUTHORS file for testing 0.9.7 releases. ---------------------------- revision 1.3 date: 2001/02/11 08:09:15; author: rgbe; state: Exp; lines: +1 -1 Changed emixer name to exmixer ---------------------------- revision 1.2 date: 2001/01/14 23:57:43; author: bobdean; state: Exp; lines: +5 -1 Added credit for emixer by simon werner ---------------------------- revision 1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/COPYING,v Working file: COPYING head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:50; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:50; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/ChangeLog,v Working file: ChangeLog head: 1.11 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 12; selected revisions: 12 description: ---------------------------- revision 1.11 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +3 -4 Release of 0.9.7 patch 2 ---------------------------- revision 1.10 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +7 -3 massive commit to catch anything I missed. ---------------------------- revision 1.9 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +8 -1 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.8 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +11 -0 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.7 date: 2001/02/23 03:39:57; author: bobdean; state: Exp; lines: +14 -7 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.6 date: 2001/02/19 06:20:10; author: bobdean; state: Exp; lines: +35 -5 ChangeLog: borught list of feature changes up to date. ---------------------------- revision 1.5 date: 2000/12/18 07:45:08; author: bobdean; state: Exp; lines: +30 -4 general commit. ---------------------------- revision 1.4 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +11 -5 general commit in case I missed anything... ---------------------------- revision 1.3 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +12 -2 general commit to make sure everything is in the tree... ---------------------------- revision 1.2 date: 2000/07/14 23:11:15; author: bobdean; state: Exp; lines: +28 -2 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:01:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/INSTALL,v Working file: INSTALL head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +2 -1 general commit in case I missed anything... ---------------------------- revision 1.2 date: 2000/09/16 18:03:47; author: bobdean; state: Exp; lines: +6 -0 INSTALL: added list of required packages. ---------------------------- revision 1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/Makefile,v Working file: Makefile head: 1.7 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 8; selected revisions: 8 description: ---------------------------- revision 1.7 date: 2001/02/23 03:39:57; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.6 date: 2001/02/11 08:02:50; author: rgbe; state: Exp; lines: +1 -1 Changed emixer name to exmixer ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +1 -1 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.3 date: 2000/07/14 23:11:15; author: bobdean; state: Exp; lines: +2 -2 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:19; author: bobdean; state: Exp; lines: +2 -2 cleaned up cvs tree. ---------------------------- revision 1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Makefile.am,v Working file: Makefile.am head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/09/23 16:14:58; author: bobdean; state: Exp; lines: +1 -1 Added dbplaylist to make list. ---------------------------- revision 1.3 date: 2001/02/11 08:06:54; author: rgbe; state: Exp; lines: +1 -1 Changed emixer name to exmixer ---------------------------- revision 1.2 date: 2001/02/05 05:37:38; author: bobdean; state: Exp; lines: +1 -1 Added Readme.emixer to the dist list. ---------------------------- revision 1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/Makefile.in,v Working file: Makefile.in head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/02/23 03:39:57; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.3 date: 2001/02/11 08:10:44; author: rgbe; state: Exp; lines: +1 -1 Changed emixer name to exmixer ---------------------------- revision 1.2 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +1 -1 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/NEWS,v Working file: NEWS head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/README,v Working file: README head: 1.10 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 11; selected revisions: 11 description: ---------------------------- revision 1.10 date: 2001/11/27 07:51:30; author: bobdean; state: Exp; lines: +97 -7 Added section about dbplaylist. ---------------------------- revision 1.9 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +3 -0 Release of 0.9.7 patch 2 ---------------------------- revision 1.8 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +2 -1 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.7 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +12 -22 massive commit to catch anything I missed. ---------------------------- revision 1.6 date: 2001/03/06 06:23:14; author: bobdean; state: Exp; lines: +1 -3 *** empty log message *** ---------------------------- revision 1.5 date: 2001/02/21 06:45:05; author: bobdean; state: Exp; lines: +191 -42 README: updated for 0.9.7 release. ---------------------------- revision 1.4 date: 2000/12/05 07:09:53; author: bobdean; state: Exp; lines: +7 -0 added directions for using gqmpeg as a client ---------------------------- revision 1.3 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +2 -2 general commit in case I missed anything... ---------------------------- revision 1.2 date: 2000/09/16 18:03:20; author: bobdean; state: Exp; lines: +3 -0 README: added list of required packages. ---------------------------- revision 1.1 date: 2000/07/10 01:01:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Readme.cueing,v Working file: Readme.cueing head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Readme.devel,v Working file: Readme.devel head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/03/18 23:37:32; author: bobdean; state: Exp; lines: +1 -2 Converted the user_pitch and base_pitch members of the channel structure to be floats, allowing pitch to be adjusted by tenths of a percent. ---------------------------- revision 1.4 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +15 -10 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +19 -2 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2001/02/23 03:39:57; author: bobdean; state: Exp; lines: +372 -39 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:01:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/Readme.emixer,v Working file: Readme.emixer head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/02/11 08:20:40; author: rgbe; state: dead; lines: +0 -0 Changed emixer name to exmixer ---------------------------- revision 1.2 date: 2001/01/14 23:13:06; author: bobdean; state: Exp; lines: +27 -27 removed three files to fix configure issues with cvs code ---------------------------- revision 1.1 date: 2001/01/14 23:06:48; author: bobdean; state: Exp; Added Readme.emixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Readme.exmixer,v Working file: Readme.exmixer head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/02/11 08:19:08; author: rgbe; state: Exp; Changed emixer name to exmixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/acconfig.h,v Working file: acconfig.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/aclocal.m4,v Working file: aclocal.m4 head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +22 -18 Updating parity between cvs and my dev tree. ---------------------------- revision 1.4 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +149 -0 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.3 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +18 -22 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.2 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +22 -18 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.1 date: 2000/07/10 01:01:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/autogen.sh,v Working file: autogen.sh head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:09; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:09; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/config.cache,v Working file: config.cache head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/01/14 23:18:43; author: bobdean; state: dead; lines: +0 -0 removed more files generated by configure ---------------------------- revision 1.2 date: 2000/07/10 02:40:19; author: bobdean; state: Exp; lines: +1 -0 cleaned up cvs tree. ---------------------------- revision 1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/config.guess,v Working file: config.guess head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/01/14 23:13:06; author: bobdean; state: dead; lines: +0 -0 removed three files to fix configure issues with cvs code ---------------------------- revision 1.1 date: 2000/07/10 01:00:59; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:00:59; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/config.h,v Working file: config.h head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/01/14 23:18:43; author: bobdean; state: dead; lines: +0 -0 removed more files generated by configure ---------------------------- revision 1.3 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.2 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +0 -9 general commit to make sure everything is in the tree... ---------------------------- revision 1.1 date: 2000/07/10 01:01:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/config.h.in,v Working file: config.h.in head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/01/14 23:18:43; author: bobdean; state: dead; lines: +0 -0 removed more files generated by configure ---------------------------- revision 1.2 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +0 -9 general commit to make sure everything is in the tree... ---------------------------- revision 1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/config.log,v Working file: config.log head: 1.11 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 12; selected revisions: 12 description: ---------------------------- revision 1.11 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +1 -21 general commit. ---------------------------- revision 1.10 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +26 -6 Updating parity between cvs and my dev tree. ---------------------------- revision 1.9 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +2 -2 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.8 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +35 -32 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.7 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +5 -5 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.6 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +29 -29 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +10 -10 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.3 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +1 -4 general commit to make sure everything is in the tree... ---------------------------- revision 1.2 date: 2000/07/14 23:11:15; author: bobdean; state: Exp; lines: +0 -1 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:48; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/config.status,v Working file: config.status head: 1.6 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 7; selected revisions: 7 description: ---------------------------- revision 1.6 date: 2001/01/14 23:13:06; author: bobdean; state: dead; lines: +0 -0 removed three files to fix configure issues with cvs code ---------------------------- revision 1.5 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +4 -4 general commit in case I missed anything... ---------------------------- revision 1.4 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +4 -19 general commit to make sure everything is in the tree... ---------------------------- revision 1.3 date: 2000/07/14 23:11:15; author: bobdean; state: Exp; lines: +2 -2 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:19; author: bobdean; state: Exp; lines: +5 -5 cleaned up cvs tree. ---------------------------- revision 1.1 date: 2000/07/10 01:01:53; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:53; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/config.sub,v Working file: config.sub head: 1.6 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 7; selected revisions: 7 description: ---------------------------- revision 1.6 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +52 -16 Updating parity between cvs and my dev tree. ---------------------------- revision 1.5 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +16 -52 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.4 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +52 -16 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.3 date: 2001/02/23 03:45:18; author: bobdean; state: Exp; lines: +0 -0 Added config.sub as it is required for configure to run. ---------------------------- revision 1.2 date: 2001/01/14 23:13:06; author: bobdean; state: dead; lines: +0 -0 removed three files to fix configure issues with cvs code ---------------------------- revision 1.1 date: 2000/07/10 01:01:11; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:11; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/configure,v Working file: configure head: 1.13 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 14; selected revisions: 14 description: ---------------------------- revision 1.13 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +4 -13 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.12 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +3 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.11 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +12 -10 Release of 0.9.7 patch 2 ---------------------------- revision 1.10 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +372 -181 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.9 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +19 -18 massive commit to catch anything I missed. ---------------------------- revision 1.8 date: 2001/03/13 17:25:01; author: bobdean; state: Exp; lines: +26 -21 Changed configure script so that only the plugin install directory is changed based on the local of xmms. Everything should still be installed in /usr/local. ---------------------------- revision 1.7 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +1 -1 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.6 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +100 -59 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.5 date: 2001/02/23 03:39:57; author: bobdean; state: Exp; lines: +31 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.4 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +36 -32 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.3 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +7 -4 general commit in case I missed anything... ---------------------------- revision 1.2 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +18 -63 general commit to make sure everything is in the tree... ---------------------------- revision 1.1 date: 2000/07/10 01:01:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Attic/configure.bob,v Working file: configure.bob head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/01/14 23:18:43; author: bobdean; state: dead; lines: +0 -0 removed more files generated by configure ---------------------------- revision 1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/configure.in,v Working file: configure.in head: 1.14 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 15; selected revisions: 15 description: ---------------------------- revision 1.14 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +4 -13 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.13 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +2 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.12 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +12 -10 Release of 0.9.7 patch 2 ---------------------------- revision 1.11 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +75 -126 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.10 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -0 massive commit to catch anything I missed. ---------------------------- revision 1.9 date: 2001/03/13 17:25:01; author: bobdean; state: Exp; lines: +7 -3 Changed configure script so that only the plugin install directory is changed based on the local of xmms. Everything should still be installed in /usr/local. ---------------------------- revision 1.8 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +1 -1 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.7 date: 2001/03/04 20:45:52; author: bobdean; state: Exp; lines: +23 -2 Added check for location of xmms, and adjusts install directories as necessary to be /usr or /usr/local ---------------------------- revision 1.6 date: 2001/02/24 18:28:53; author: bobdean; state: Exp; lines: +20 -0 Added check for proper install of devel headers, and associated warnings about possible compile issues. ---------------------------- revision 1.5 date: 2001/02/23 03:39:57; author: bobdean; state: Exp; lines: +31 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.4 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +4 -0 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.3 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +4 -1 general commit in case I missed anything... ---------------------------- revision 1.2 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +15 -20 general commit to make sure everything is in the tree... ---------------------------- revision 1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/install-sh,v Working file: install-sh head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:09; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:09; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/liboss.la,v Working file: liboss.la head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/libtool,v Working file: libtool head: 1.7 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 8; selected revisions: 8 description: ---------------------------- revision 1.7 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +1 -1 general commit. ---------------------------- revision 1.6 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +28 -12 Updating parity between cvs and my dev tree. ---------------------------- revision 1.5 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +1 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.4 date: 2001/03/12 05:30:23; author: bobdean; state: Exp; lines: +11 -27 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.3 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +28 -12 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.2 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +1 -1 general commit to make sure everything is in the tree... ---------------------------- revision 1.1 date: 2000/07/10 01:01:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/ltconfig,v Working file: ltconfig head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +74 -38 Updating parity between cvs and my dev tree. ---------------------------- revision 1.3 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +38 -74 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.2 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +74 -38 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/ltmain.sh,v Working file: ltmain.sh head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +23 -7 Updating parity between cvs and my dev tree. ---------------------------- revision 1.3 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +7 -23 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.2 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +23 -7 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.1 date: 2000/07/10 01:01:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/missing,v Working file: missing head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/mkinstalldirs,v Working file: mkinstalldirs head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/stamp-h,v Working file: stamp-h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/stamp-h.in,v Working file: stamp-h.in head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:00:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/stamp.h.in,v Working file: stamp.h.in head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:08; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/architecture.html,v Working file: Documentation/architecture.html head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Flowcharts/DBAudioLib-DBMixer Diagram.dia,v Working file: Documentation/Flowcharts/DBAudioLib-DBMixer Diagram.dia head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Flowcharts/Implementation Diagram.dia,v Working file: Documentation/Flowcharts/Implementation Diagram.dia head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Flowcharts/Implementation Diagram.eps,v Working file: Documentation/Flowcharts/Implementation Diagram.eps head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Flowcharts/Implementation Diagram.svg,v Working file: Documentation/Flowcharts/Implementation Diagram.svg head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Images/DBAudiolib_chart.jpg,v Working file: Documentation/Images/DBAudiolib_chart.jpg head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:42; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:42; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/Documentation/Images/implementation.jpg,v Working file: Documentation/Images/implementation.jpg head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:45; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:45; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/backup/Attic/DBMix-0.9.3.tar.gz,v Working file: backup/DBMix-0.9.3.tar.gz head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/21 06:15:04; author: bobdean; state: dead; lines: +0 -0 removed files to ease checkout bandwidth ---------------------------- revision 1.1 date: 2000/07/10 01:03:30; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:30; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/backup/Attic/DBMix-0.9.4.tar.gz,v Working file: backup/DBMix-0.9.4.tar.gz head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/21 06:15:04; author: bobdean; state: dead; lines: +0 -0 removed files to ease checkout bandwidth ---------------------------- revision 1.1 date: 2000/07/10 01:03:17; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:17; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/backup/Attic/DBMix-0.9.7.tar.gz,v Working file: backup/DBMix-0.9.7.tar.gz head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/03/21 06:15:04; author: bobdean; state: dead; lines: +0 -0 removed files to ease checkout bandwidth ---------------------------- revision 1.1 date: 2001/02/23 03:39:57; author: bobdean; state: Exp; CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Channel_Flags.c,v Working file: dbaudiolib/DBAudio_Channel_Flags.c head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Channel_Name.c,v Working file: dbaudiolib/DBAudio_Channel_Name.c head: 1.7 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 8; selected revisions: 8 description: ---------------------------- revision 1.7 date: 2002/01/01 00:09:54; author: bobdean; state: Exp; lines: +75 -74 fixed all compile warnings in dbaudiolib ---------------------------- revision 1.6 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.5 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +6 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.4 date: 2000/11/19 08:56:07; author: bobdean; state: Exp; lines: +1 -2 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.3 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +15 -3 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +11 -9 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Channel_Name.subs,v Working file: dbaudiolib/DBAudio_Channel_Name.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:22; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:22; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Channel_Type.c,v Working file: dbaudiolib/DBAudio_Channel_Type.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +4 -2 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Channel_Type.subs,v Working file: dbaudiolib/DBAudio_Channel_Type.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:26; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:26; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Channels.c,v Working file: dbaudiolib/DBAudio_Channels.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Channels.subs,v Working file: dbaudiolib/DBAudio_Channels.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:59; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:59; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Close.c,v Working file: dbaudiolib/DBAudio_Close.c head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +8 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/12/02 22:43:00; author: bobdean; state: Exp; lines: +13 -7 Added label a single cleanup section and use of "goto cleanup;" in order to simplify the code. Previously, there were 10 return statements with 10 code cleanups, now there are 10 goto cleanups and about 150 fewer lines of repetitive code =) ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Close.subs,v Working file: dbaudiolib/DBAudio_Close.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:45; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:45; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Cue.c,v Working file: dbaudiolib/DBAudio_Cue.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/09/15 04:22:17; author: bobdean; state: Exp; lines: +1 -1 DBAudio_Init.c: changed if (DBAudio_Cue_Enabled()) to be if(CUE_ENABLED) ---------------------------- revision 1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Cue.subs,v Working file: dbaudiolib/DBAudio_Cue.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:07; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:07; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Format.c,v Working file: dbaudiolib/DBAudio_Format.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Format.subs,v Working file: dbaudiolib/DBAudio_Format.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Get_Bufsize.c,v Working file: dbaudiolib/DBAudio_Get_Bufsize.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:04:30; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:30; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Get_Bufsize.subs,v Working file: dbaudiolib/DBAudio_Get_Bufsize.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Get_Version.c,v Working file: dbaudiolib/DBAudio_Get_Version.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Get_Version.subs,v Working file: dbaudiolib/DBAudio_Get_Version.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_IPC.c,v Working file: dbaudiolib/DBAudio_IPC.c head: 1.12 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 13; selected revisions: 13 description: ---------------------------- revision 1.12 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +2 -2 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.11 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +27 -0 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.10 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +8 -0 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.9 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.8 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +7 -1 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.7 date: 2000/12/18 07:45:08; author: bobdean; state: Exp; lines: +2 -2 general commit. ---------------------------- revision 1.6 date: 2000/12/17 20:14:08; author: bobdean; state: Exp; lines: +42 -38 DBAudio_IPC.c: In Handle_Message_Queue(), dbaudiolib only handles a message if the client did not request to recieve messages of that type. ---------------------------- revision 1.5 date: 2000/12/03 23:51:04; author: bobdean; state: Exp; lines: +0 -4 code cleanup, removed debug statements. ---------------------------- revision 1.4 date: 2000/12/02 22:43:00; author: bobdean; state: Exp; lines: +23 -0 Added label a single cleanup section and use of "goto cleanup;" in order to simplify the code. Previously, there were 10 return statements with 10 code cleanups, now there are 10 goto cleanups and about 150 fewer lines of repetitive code =) ---------------------------- revision 1.3 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +63 -47 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +36 -18 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:04:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Init.c,v Working file: dbaudiolib/DBAudio_Init.c head: 1.13 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 14; selected revisions: 14 description: ---------------------------- revision 1.13 date: 2002/01/01 21:19:14; author: bobdean; state: Exp; lines: +21 -6 Added API functions to control sampler. ---------------------------- revision 1.12 date: 2002/01/01 00:09:54; author: bobdean; state: Exp; lines: +3 -0 fixed all compile warnings in dbaudiolib ---------------------------- revision 1.11 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +14 -12 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.10 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +25 -11 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.9 date: 2001/03/18 23:37:32; author: bobdean; state: Exp; lines: +1 -1 Converted the user_pitch and base_pitch members of the channel structure to be floats, allowing pitch to be adjusted by tenths of a percent. ---------------------------- revision 1.8 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +6 -6 massive commit to catch anything I missed. ---------------------------- revision 1.7 date: 2000/12/02 22:43:00; author: bobdean; state: Exp; lines: +78 -24 Added label a single cleanup section and use of "goto cleanup;" in order to simplify the code. Previously, there were 10 return statements with 10 code cleanups, now there are 10 goto cleanups and about 150 fewer lines of repetitive code =) ---------------------------- revision 1.6 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +3 -4 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.5 date: 2000/11/20 06:53:56; author: bobdean; state: Exp; lines: +11 -0 DBAudio_Init.c: init routine now clears the message queue for the channel. ---------------------------- revision 1.4 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +11 -5 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.3 date: 2000/09/15 04:22:17; author: bobdean; state: Exp; lines: +3 -10 DBAudio_Init.c: changed if (DBAudio_Cue_Enabled()) to be if(CUE_ENABLED) ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +9 -8 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Init.subs,v Working file: dbaudiolib/DBAudio_Init.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Message_Handler.c,v Working file: dbaudiolib/DBAudio_Message_Handler.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +0 -8 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.1 date: 2000/11/19 00:56:41; author: bobdean; state: Exp; DBAudio_Message_Handler.c: added to CVS ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Mute.c,v Working file: dbaudiolib/DBAudio_Mute.c head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.1 date: 2001/04/02 04:47:26; author: bobdean; state: Exp; Created. Includes functions DBAudio_Set_Mute.c and DBAudio_Get_Mute.c ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Pause.c,v Working file: dbaudiolib/DBAudio_Pause.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +8 -7 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Pause.subs,v Working file: dbaudiolib/DBAudio_Pause.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:11; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:11; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Rate.c,v Working file: dbaudiolib/DBAudio_Rate.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Rate.subs,v Working file: dbaudiolib/DBAudio_Rate.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Read.c,v Working file: dbaudiolib/DBAudio_Read.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Read.subs,v Working file: dbaudiolib/DBAudio_Read.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:18; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:18; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Ready.c,v Working file: dbaudiolib/DBAudio_Ready.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Ready.subs,v Working file: dbaudiolib/DBAudio_Ready.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:49; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:49; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Sampler.c,v Working file: dbaudiolib/DBAudio_Sampler.c head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +4 -0 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.3 date: 2002/01/05 21:50:11; author: bobdean; state: Exp; lines: +16 -32 fixed sample copy/load/save problems ---------------------------- revision 1.2 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +150 -2 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.1 date: 2002/01/01 21:19:14; author: bobdean; state: Exp; Added API functions to control sampler. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Volume.c,v Working file: dbaudiolib/DBAudio_Volume.c head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.4 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +12 -8 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.3 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +10 -5 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:41; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:41; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Volume.subs,v Working file: dbaudiolib/DBAudio_Volume.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Write.bak.c,v Working file: dbaudiolib/DBAudio_Write.bak.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/16 22:09:12; author: bobdean; state: dead; lines: +0 -0 While looking at the pitch control loop, I realized that the actaul output was just sample1, and the linear interpolation was calculated but never actaully used. It sounds 10 times better now too. ---------------------------- revision 1.1 date: 2000/07/10 01:04:27; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:27; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Write.bak2.c,v Working file: dbaudiolib/DBAudio_Write.bak2.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/16 22:09:12; author: bobdean; state: dead; lines: +0 -0 While looking at the pitch control loop, I realized that the actaul output was just sample1, and the linear interpolation was calculated but never actaully used. It sounds 10 times better now too. ---------------------------- revision 1.1 date: 2000/07/10 01:04:30; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:30; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_Write.c,v Working file: dbaudiolib/DBAudio_Write.c head: 1.24 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 25; selected revisions: 25 description: ---------------------------- revision 1.24 date: 2002/01/01 00:09:54; author: bobdean; state: Exp; lines: +2 -2 fixed all compile warnings in dbaudiolib ---------------------------- revision 1.23 date: 2001/12/17 07:09:55; author: bobdean; state: Exp; lines: +21 -26 Modified volume loops for master and cue outputs to use integer arithmetic instead of floating point. This was the reason the internal volume range was changed from 0-100 to be 0-128. ---------------------------- revision 1.22 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +6 -6 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.21 date: 2001/11/08 08:07:55; author: bobdean; state: Exp; lines: +20 -2 Added cue volume values to each channel. The channel level slider on dbmixer can now control the volume of the cue output for that channel. ---------------------------- revision 1.20 date: 2001/11/08 07:14:43; author: bobdean; state: Exp; lines: +7 -4 Added support for single output mode. If enabled in dbfsd, then the master output will be output as a mono signal on the right channel, and the cue output will be sent out as a mono singnal on the left channel. Thus, cueing is accomplished with only one soundcard. ---------------------------- revision 1.19 date: 2001/09/27 05:40:16; author: bobdean; state: Exp; lines: +8 -0 Fixed bug in DBAudio_Write: if no sample was recorded, and shot or loop was selected, the function would segfault. Now checks to make sure a sample exists before playing. Oops. That's an "intro to programming" type of error. My bad. ---------------------------- revision 1.18 date: 2001/07/09 05:26:48; author: bobdean; state: Exp; lines: +2 -1 Added sampler_endoffset variable to channel structure to support editing of sample start and end points. ---------------------------- revision 1.17 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +35 -16 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.16 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +171 -86 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.15 date: 2001/03/18 23:37:32; author: bobdean; state: Exp; lines: +0 -2 Converted the user_pitch and base_pitch members of the channel structure to be floats, allowing pitch to be adjusted by tenths of a percent. ---------------------------- revision 1.14 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +9 -5 massive commit to catch anything I missed. ---------------------------- revision 1.13 date: 2001/03/16 22:09:12; author: bobdean; state: Exp; lines: +11 -7 While looking at the pitch control loop, I realized that the actaul output was just sample1, and the linear interpolation was calculated but never actaully used. It sounds 10 times better now too. ---------------------------- revision 1.12 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +14 -1 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.11 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +19 -8 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.10 date: 2000/12/03 23:51:04; author: bobdean; state: Exp; lines: +1 -28 code cleanup, removed debug statements. ---------------------------- revision 1.9 date: 2000/12/02 22:43:00; author: bobdean; state: Exp; lines: +30 -2 Added label a single cleanup section and use of "goto cleanup;" in order to simplify the code. Previously, there were 10 return statements with 10 code cleanups, now there are 10 goto cleanups and about 150 fewer lines of repetitive code =) ---------------------------- revision 1.8 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +1 -1 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.7 date: 2000/11/19 23:08:22; author: bobdean; state: Exp; lines: +6 -18 DBAudio_Write.c: added comments ---------------------------- revision 1.6 date: 2000/11/19 08:56:07; author: bobdean; state: Exp; lines: +8 -4 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.5 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +13 -7 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.4 date: 2000/09/15 04:22:17; author: bobdean; state: Exp; lines: +7 -7 DBAudio_Init.c: changed if (DBAudio_Cue_Enabled()) to be if(CUE_ENABLED) ---------------------------- revision 1.3 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +57 -71 general commit to make sure everything is in the tree... ---------------------------- revision 1.2 date: 2000/09/10 17:16:22; author: bobdean; state: Exp; lines: +329 -266 DBAudio_Write.c: fixed problem with corrupted cue audio. The fix to the pitch control issue was to send buffers to DBAudio_Write that were 1.25xPIPE_BUF in length. This was the pipe is always kept full. But the cue buf is non_blocking. So 4096 would be written to the cue pipe, the write would then fail because the pipe was full. The write to the main pipe would write the full data amount, thus data loss occured in the cue channel. ---------------------------- revision 1.1 date: 2000/07/10 01:03:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/DBAudio_Write.subs,v Working file: dbaudiolib/DBAudio_Write.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/09/15 04:22:17; author: bobdean; state: dead; lines: +0 -0 DBAudio_Init.c: changed if (DBAudio_Cue_Enabled()) to be if(CUE_ENABLED) ---------------------------- revision 1.1 date: 2000/07/10 01:04:14; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:14; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/DBAudio_perror.c,v Working file: dbaudiolib/DBAudio_perror.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/12/02 22:43:00; author: bobdean; state: Exp; lines: +16 -14 Added label a single cleanup section and use of "goto cleanup;" in order to simplify the code. Previously, there were 10 return statements with 10 code cleanups, now there are 10 goto cleanups and about 150 fewer lines of repetitive code =) ---------------------------- revision 1.1 date: 2000/07/10 01:04:34; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:34; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/Makefile,v Working file: dbaudiolib/Makefile head: 1.6 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 7; selected revisions: 7 description: ---------------------------- revision 1.6 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.5 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +5 -6 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.4 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +9 -8 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.3 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +3 -3 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:19; author: bobdean; state: Exp; lines: +3 -3 cleaned up cvs tree. ---------------------------- revision 1.1 date: 2000/07/10 01:03:31; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:31; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Makefile.am,v Working file: dbaudiolib/Makefile.am head: 1.8 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.8 date: 2002/01/01 21:19:14; author: bobdean; state: Exp; lines: +1 -0 Added API functions to control sampler. ---------------------------- revision 1.7 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +1 -0 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.6 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -3 massive commit to catch anything I missed. ---------------------------- revision 1.5 date: 2001/03/16 22:09:12; author: bobdean; state: Exp; lines: +2 -2 While looking at the pitch control loop, I realized that the actaul output was just sample1, and the linear interpolation was calculated but never actaully used. It sounds 10 times better now too. ---------------------------- revision 1.4 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +1 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.3 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +0 -1 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +2 -0 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:31; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:31; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/Makefile.in,v Working file: dbaudiolib/Makefile.in head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.3 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +5 -6 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +8 -7 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/dbaudiolib.c,v Working file: dbaudiolib/dbaudiolib.c head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.4 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +4 -1 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.3 date: 2000/12/03 23:51:04; author: bobdean; state: Exp; lines: +2 -1 code cleanup, removed debug statements. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +2 -1 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/dbaudiolib.subs,v Working file: dbaudiolib/dbaudiolib.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:29; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:29; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/debug.c,v Working file: dbaudiolib/debug.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/Attic/debug.subs,v Working file: dbaudiolib/debug.subs head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/prototypes.h,v Working file: dbaudiolib/prototypes.h head: 1.10 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 11; selected revisions: 11 description: ---------------------------- revision 1.10 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +2 -1 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.9 date: 2002/01/01 21:19:14; author: bobdean; state: Exp; lines: +9 -0 Added API functions to control sampler. ---------------------------- revision 1.8 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +4 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.7 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.6 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +3 -1 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.5 date: 2000/12/18 07:45:08; author: bobdean; state: Exp; lines: +3 -1 general commit. ---------------------------- revision 1.4 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +3 -5 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.3 date: 2000/11/19 08:56:07; author: bobdean; state: Exp; lines: +2 -0 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.2 date: 2000/11/19 01:17:21; author: bobdean; state: Exp; lines: +6 -3 All files: added checks for ch==NULL if they did not exist also added support to pass in an external function to be called by the message_handler function so that the application may be notified of IPC messages after dbaudiolib has acted on them. ---------------------------- revision 1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:33; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/template.c,v Working file: dbaudiolib/template.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Channel_Name.P,v Working file: dbaudiolib/.deps/DBAudio_Channel_Name.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Channel_Type.P,v Working file: dbaudiolib/.deps/DBAudio_Channel_Type.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Channels.P,v Working file: dbaudiolib/.deps/DBAudio_Channels.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Close.P,v Working file: dbaudiolib/.deps/DBAudio_Close.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Cue.P,v Working file: dbaudiolib/.deps/DBAudio_Cue.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Format.P,v Working file: dbaudiolib/.deps/DBAudio_Format.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Get_Bufsize.P,v Working file: dbaudiolib/.deps/DBAudio_Get_Bufsize.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:39; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Get_Version.P,v Working file: dbaudiolib/.deps/DBAudio_Get_Version.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Init.P,v Working file: dbaudiolib/.deps/DBAudio_Init.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Pause.P,v Working file: dbaudiolib/.deps/DBAudio_Pause.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Rate.P,v Working file: dbaudiolib/.deps/DBAudio_Rate.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Read.P,v Working file: dbaudiolib/.deps/DBAudio_Read.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:37; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Ready.P,v Working file: dbaudiolib/.deps/DBAudio_Ready.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:36; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Volume.P,v Working file: dbaudiolib/.deps/DBAudio_Volume.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_Write.P,v Working file: dbaudiolib/.deps/DBAudio_Write.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:38; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/DBAudio_perror.P,v Working file: dbaudiolib/.deps/DBAudio_perror.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/dbaudiolib.P,v Working file: dbaudiolib/.deps/dbaudiolib.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbaudiolib/.deps/Attic/debug.P,v Working file: dbaudiolib/.deps/debug.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:35; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/Attic/Makefile,v Working file: dbfsd_src/Makefile head: 1.8 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.8 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.7 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +2 -2 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.6 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +16 -6 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.5 date: 2000/09/14 06:05:15; author: bobdean; state: Exp; lines: +1 -1 dbaudio.c: removed reference to #include "debug.h" and replaced it with ref to ---------------------------- revision 1.4 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +2 -2 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.3 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +3 -3 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: Exp; lines: +3 -3 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:01:57; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:57; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/Makefile.am,v Working file: dbfsd_src/Makefile.am head: 1.8 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.8 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.7 date: 2001/03/17 18:09:00; author: bobdean; state: Exp; lines: +3 -3 dbcat and dbin now link against libdbauiodlib instead of using dynamic libraries. ---------------------------- revision 1.6 date: 2001/03/08 06:36:19; author: bobdean; state: Exp; lines: +1 -1 Now waits for a full buffer size of data to be in the read pipes before data is read. If reading data is "skipped" ten times, the data is read and cleared as before, but this should only happen when audio is paused or stopped on a channel. WARNING: The current solution is nieve, and has only been tested with one active input channel. ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +1 -1 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +3 -1 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.3 date: 2000/09/14 06:05:15; author: bobdean; state: Exp; lines: +1 -1 dbaudio.c: removed reference to #include "debug.h" and replaced it with ref to ---------------------------- revision 1.2 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +2 -2 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/Attic/Makefile.in,v Working file: dbfsd_src/Makefile.in head: 1.6 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 7; selected revisions: 7 description: ---------------------------- revision 1.6 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +2 -2 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +15 -5 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.3 date: 2000/09/14 06:05:15; author: bobdean; state: Exp; lines: +1 -1 dbaudio.c: removed reference to #include "debug.h" and replaced it with ref to ---------------------------- revision 1.2 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +2 -2 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/Attic/channel.h,v Working file: dbfsd_src/channel.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/08 06:36:19; author: bobdean; state: dead; lines: +0 -0 Now waits for a full buffer size of data to be in the read pipes before data is read. If reading data is "skipped" ten times, the data is read and cleared as before, but this should only happen when audio is paused or stopped on a channel. WARNING: The current solution is nieve, and has only been tested with one active input channel. ---------------------------- revision 1.1 date: 2000/07/10 01:01:57; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:57; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbaudio.c,v Working file: dbfsd_src/dbaudio.c head: 1.9 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 10; selected revisions: 10 description: ---------------------------- revision 1.9 date: 2002/01/14 07:19:30; author: bobdean; state: Exp; lines: +51 -50 Added sample only mode to dbcat, this way you can record samples off of one player, and copy them to dbcat for playback, thus freeing the player to be used. ---------------------------- revision 1.8 date: 2001/11/08 07:14:43; author: bobdean; state: Exp; lines: +8 -0 Added support for single output mode. If enabled in dbfsd, then the master output will be output as a mono signal on the right channel, and the cue output will be sent out as a mono singnal on the left channel. Thus, cueing is accomplished with only one soundcard. ---------------------------- revision 1.7 date: 2001/07/26 05:03:50; author: bobdean; state: Exp; lines: +6 -4 Added check for output stdout mode to pause_audio(). Apparently someone is actually using stdout mode, which is how the problem was found. ---------------------------- revision 1.6 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -2 massive commit to catch anything I missed. ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +5 -1 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +2 -2 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.3 date: 2000/09/14 06:05:15; author: bobdean; state: Exp; lines: +2 -2 dbaudio.c: removed reference to #include "debug.h" and replaced it with ref to ---------------------------- revision 1.2 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +2 -1 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.1 date: 2000/07/10 01:01:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:01:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbaudio.h,v Working file: dbfsd_src/dbaudio.h head: 1.8 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.8 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +2 -2 general commit. ---------------------------- revision 1.7 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.6 date: 2001/03/08 06:36:19; author: bobdean; state: Exp; lines: +4 -1 Now waits for a full buffer size of data to be in the read pipes before data is read. If reading data is "skipped" ten times, the data is read and cleared as before, but this should only happen when audio is paused or stopped on a channel. WARNING: The current solution is nieve, and has only been tested with one active input channel. ---------------------------- revision 1.5 date: 2001/02/19 06:18:47; author: bobdean; state: Exp; lines: +1 -1 dbcat.c: added message handler for dbmix messages and support for the pause and play messages. ---------------------------- revision 1.4 date: 2001/02/09 05:39:54; author: bobdean; state: Exp; lines: +2 -2 Added functionality for the programmer to get/set/clear the channel flags for each channel. Thus, if a channel does not support pitch control (for example, a line in client), the programmer clears this flag after the channel has initialized, and the dbaudiolib library handles this appropriately. New functions in dbauidiolib: DBAudio_Set_Channel_Flag() DBAudio_Clear_Channel_Flag() DBAuiod_Get_Channel_Flags() Valid flags: CUE_FLAG MIC_FLAG PITCH_FLAG PAUSE_FLAG ---------------------------- revision 1.3 date: 2000/09/07 04:57:28; author: bobdean; state: Exp; lines: +1 -1 dbaudio.h: DEFAULT_AUDIO_DEVICE is now back to /dev/dsp as it whould be. ---------------------------- revision 1.2 date: 2000/09/07 04:55:34; author: bobdean; state: Exp; lines: +4 -3 dbaudio.h: changed default audio device to be /dev/dsp0 ---------------------------- revision 1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbcat.c,v Working file: dbfsd_src/dbcat.c head: 1.10 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 11; selected revisions: 11 description: ---------------------------- revision 1.10 date: 2002/01/14 07:19:30; author: bobdean; state: Exp; lines: +73 -44 Added sample only mode to dbcat, this way you can record samples off of one player, and copy them to dbcat for playback, thus freeing the player to be used. ---------------------------- revision 1.9 date: 2001/06/10 09:18:38; author: bobdean; state: Exp; lines: +9 -0 code cleanup ---------------------------- revision 1.8 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +40 -32 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.7 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -3 massive commit to catch anything I missed. ---------------------------- revision 1.6 date: 2001/03/17 18:09:00; author: bobdean; state: Exp; lines: +35 -2 dbcat and dbin now link against libdbauiodlib instead of using dynamic libraries. ---------------------------- revision 1.5 date: 2001/02/19 06:18:47; author: bobdean; state: Exp; lines: +98 -42 dbcat.c: added message handler for dbmix messages and support for the pause and play messages. ---------------------------- revision 1.4 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +1 -1 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.3 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +1 -1 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.2 date: 2000/11/19 00:08:26; author: bobdean; state: Exp; lines: +18 -9 dbcat.c: adjusted code to allow for dbaudiolib to be PAUSED using the new IPC messaging functionality. You can now pause audio streams played with dbcat without any data loss. ---------------------------- revision 1.1 date: 2000/07/10 01:02:05; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:05; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbfsd.c,v Working file: dbfsd_src/dbfsd.c head: 1.32 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 33; selected revisions: 33 description: ---------------------------- revision 1.32 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +108 -1 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.31 date: 2002/01/14 07:19:30; author: bobdean; state: Exp; lines: +3 -3 Added sample only mode to dbcat, this way you can record samples off of one player, and copy them to dbcat for playback, thus freeing the player to be used. ---------------------------- revision 1.30 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +3 -0 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.29 date: 2001/11/08 08:07:55; author: bobdean; state: Exp; lines: +3 -0 Added cue volume values to each channel. The channel level slider on dbmixer can now control the volume of the cue output for that channel. ---------------------------- revision 1.28 date: 2001/11/08 07:14:43; author: bobdean; state: Exp; lines: +77 -13 Added support for single output mode. If enabled in dbfsd, then the master output will be output as a mono signal on the right channel, and the cue output will be sent out as a mono singnal on the left channel. Thus, cueing is accomplished with only one soundcard. ---------------------------- revision 1.27 date: 2001/07/09 05:26:48; author: bobdean; state: Exp; lines: +1 -0 Added sampler_endoffset variable to channel structure to support editing of sample start and end points. ---------------------------- revision 1.26 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +14 -3 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.25 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +15 -7 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.24 date: 2001/06/16 23:45:46; author: bobdean; state: Exp; lines: +11 -18 Fixed code error. ---------------------------- revision 1.23 date: 2001/06/10 09:18:38; author: bobdean; state: Exp; lines: +18 -11 code cleanup ---------------------------- revision 1.22 date: 2001/03/18 23:37:32; author: bobdean; state: Exp; lines: +3 -3 Converted the user_pitch and base_pitch members of the channel structure to be floats, allowing pitch to be adjusted by tenths of a percent. ---------------------------- revision 1.21 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +32 -36 massive commit to catch anything I missed. ---------------------------- revision 1.20 date: 2001/03/17 18:09:00; author: bobdean; state: Exp; lines: +4 -2 dbcat and dbin now link against libdbauiodlib instead of using dynamic libraries. ---------------------------- revision 1.19 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +26 -9 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.18 date: 2001/03/12 04:26:17; author: bobdean; state: Exp; lines: +3 -0 Added code to dbfsd so that the FIONREAD check only sleeps once, before it was possible for it to sleep once for each active channel. ---------------------------- revision 1.17 date: 2001/03/12 04:15:31; author: bobdean; state: Exp; lines: +47 -41 The main loop in dbfsd has been updated to handle the fact that the 2.4.2 kernel handles I/O faster thereby causing the data pipes to not be kept full. Using the FIONREAD ioctl call, data is only read from the pipes if one of the two following situations exsits: 1) All active pipes have at least DB_BUFSIZE_CHAR worth of data ready. 2) A pipe with less than DB_BUFSIZE_CHAR worth of data has been "skipped" for SKIP_MAX number of iterations. This pipe has probably been paused or closed, and therefor the data should be processed and the unused section cleared as usual. If data is not ready, dbfsd will sleep for 5000 microseconds to allow for the pipe to be filled, and the read IO will be skipped for that iteration of the main loop. ---------------------------- revision 1.16 date: 2001/03/08 06:36:19; author: bobdean; state: Exp; lines: +43 -0 Now waits for a full buffer size of data to be in the read pipes before data is read. If reading data is "skipped" ten times, the data is read and cleared as before, but this should only happen when audio is paused or stopped on a channel. WARNING: The current solution is nieve, and has only been tested with one active input channel. ---------------------------- revision 1.15 date: 2001/02/23 03:39:58; author: bobdean; state: Exp; lines: +3 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.14 date: 2001/02/20 05:49:39; author: bobdean; state: Exp; lines: +43 -33 dbfsd.c: move audio reset code from sighup signal handler and into main loop. This is to prevent difficulties with function calls being made from within a signal handler. ---------------------------- revision 1.13 date: 2001/02/19 06:35:48; author: bobdean; state: Exp; lines: +1 -1 dbfsd.c: in reset_channel function, enabled the pause and pitch channel flags by default. ---------------------------- revision 1.12 date: 2001/02/19 06:18:47; author: bobdean; state: Exp; lines: +14 -14 dbcat.c: added message handler for dbmix messages and support for the pause and play messages. ---------------------------- revision 1.11 date: 2001/02/09 05:39:54; author: bobdean; state: Exp; lines: +3 -0 Added functionality for the programmer to get/set/clear the channel flags for each channel. Thus, if a channel does not support pitch control (for example, a line in client), the programmer clears this flag after the channel has initialized, and the dbaudiolib library handles this appropriately. New functions in dbauidiolib: DBAudio_Set_Channel_Flag() DBAudio_Clear_Channel_Flag() DBAuiod_Get_Channel_Flags() Valid flags: CUE_FLAG MIC_FLAG PITCH_FLAG PAUSE_FLAG ---------------------------- revision 1.10 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +3 -1 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.9 date: 2000/12/02 23:06:32; author: bobdean; state: Exp; lines: +36 -0 dbfsd.c: added support for cue split. ---------------------------- revision 1.8 date: 2000/12/02 22:53:42; author: bobdean; state: Exp; lines: +3 -1 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.7 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +4 -2 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.6 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; lines: +8 -5 All files: added support for dbaudiolib's IPC message callback function ---------------------------- revision 1.5 date: 2000/11/18 22:04:27; author: bobdean; state: Exp; lines: +33 -13 dbfsd.c: teh main loop now uses two different timeout values for select. The smaller value will be used while audio is playing. This way, once the audio stops, the audio pause command can be sent to the audio driver quickly, and then the process can enter into a longer sleep cycle. ---------------------------- revision 1.4 date: 2000/11/12 07:04:05; author: bobdean; state: Exp; lines: +15 -9 dbfsd.c: If a timeout occurs, the proper OSS message is sent to the soundcards to pause audio. This is suggested by the OSS Programmers Guide ---------------------------- revision 1.3 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +79 -63 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +279 -276 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:00; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:00; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbin.c,v Working file: dbfsd_src/dbin.c head: 1.9 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.9 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +13 -4 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.8 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -3 massive commit to catch anything I missed. ---------------------------- revision 1.7 date: 2001/03/17 18:09:00; author: bobdean; state: Exp; lines: +37 -3 dbcat and dbin now link against libdbauiodlib instead of using dynamic libraries. ---------------------------- revision 1.6 date: 2001/02/19 06:18:47; author: bobdean; state: Exp; lines: +26 -11 dbcat.c: added message handler for dbmix messages and support for the pause and play messages. ---------------------------- revision 1.5 date: 2001/02/11 05:16:25; author: bobdean; state: Exp; lines: +205 -103 dbin.c: added internal buffer thread to prevent audio skipping. ---------------------------- revision 1.4 date: 2001/02/09 05:39:54; author: bobdean; state: Exp; lines: +3 -0 Added functionality for the programmer to get/set/clear the channel flags for each channel. Thus, if a channel does not support pitch control (for example, a line in client), the programmer clears this flag after the channel has initialized, and the dbaudiolib library handles this appropriately. New functions in dbauidiolib: DBAudio_Set_Channel_Flag() DBAudio_Clear_Channel_Flag() DBAuiod_Get_Channel_Flags() Valid flags: CUE_FLAG MIC_FLAG PITCH_FLAG PAUSE_FLAG ---------------------------- revision 1.3 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +147 -35 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.2 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +1 -1 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.1 date: 2000/11/19 01:19:01; author: bobdean; state: Exp; All files: added support for dbaudiolib's IPC message callback function ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbsem.c,v Working file: dbfsd_src/dbsem.c head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:05; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:05; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/dbsem.h,v Working file: dbfsd_src/dbsem.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/debug.c,v Working file: dbfsd_src/debug.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:01; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:01; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/debug.h,v Working file: dbfsd_src/debug.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/fsadders.c,v Working file: dbfsd_src/fsadders.c head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -2 massive commit to catch anything I missed. ---------------------------- revision 1.4 date: 2001/02/11 05:16:25; author: bobdean; state: Exp; lines: +4 -4 dbin.c: added internal buffer thread to prevent audio skipping. ---------------------------- revision 1.3 date: 2000/09/13 05:13:11; author: bobdean; state: Exp; lines: +23 -21 dbfsd.c: removed cue debug code all files: fixed #include's to local files ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +91 -26 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:02; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/fsadders.h,v Working file: dbfsd_src/fsadders.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/gtkscaletest.c,v Working file: dbfsd_src/gtkscaletest.c head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:06; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:06; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/Attic/soundcard.h,v Working file: dbfsd_src/soundcard.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: dead; lines: +0 -0 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/dbaudio.P,v Working file: dbfsd_src/.deps/dbaudio.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/dbaudiolib.P,v Working file: dbfsd_src/.deps/dbaudiolib.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:13; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:13; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/dbcat.P,v Working file: dbfsd_src/.deps/dbcat.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/dbfsd.P,v Working file: dbfsd_src/.deps/dbfsd.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/dbmixer.P,v Working file: dbfsd_src/.deps/dbmixer.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:14; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:14; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/debug.P,v Working file: dbfsd_src/.deps/debug.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:11; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbfsd_src/.deps/Attic/fsadders.P,v Working file: dbfsd_src/.deps/fsadders.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:12; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/Makefile,v Working file: dbmixer/Makefile head: 1.11 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 12; selected revisions: 12 description: ---------------------------- revision 1.11 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.10 date: 2001/02/21 05:12:44; author: bobdean; state: Exp; lines: +52 -89 Removed libdbmixer from makefile as it is depreciated. ---------------------------- revision 1.9 date: 2001/02/11 08:23:30; author: rgbe; state: Exp; lines: +7 -7 Changed emixer name to exmixer ---------------------------- revision 1.8 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +8 -5 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.7 date: 2000/11/23 08:31:44; author: bobdean; state: Exp; lines: +14 -4 Added dbmsg_test.c and updated the makefile accordingly. dbmsg_test.c will compile into dbmsg_test, a simple gtk program. The UI consists of a menu to select a dbmix channel. Once a channel is selected, pressing one of the buttons to the right of the menu will cause that message to be sent to the previsouly chosen dbmix channel. Becuase dbmixer only implements a subset of the possible dbmix messages, this program allows all dbmix messages to be sent to a dbmix client for testing purposes. ---------------------------- revision 1.6 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.5 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +4 -4 i ---------------------------- revision 1.4 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +4 -4 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.3 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +11 -8 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: Exp; lines: +4 -4 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:46; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:46; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Makefile.am,v Working file: dbmixer/Makefile.am head: 1.12 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 13; selected revisions: 13 description: ---------------------------- revision 1.12 date: 2001/10/12 06:08:33; author: bobdean; state: Exp; lines: +2 -1 Removed record button from channel boxes. Added Sample Editor box in between channel boxes and soundcard controls. This box will allow the user to record on a selected channel, and modify the start and end offsets of the sample. Samples are stilled played using the LOOP and SHOT buttons found on each channel box. ---------------------------- revision 1.11 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +1 -1 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.10 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -0 massive commit to catch anything I missed. ---------------------------- revision 1.9 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +1 -2 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.8 date: 2001/02/21 05:12:44; author: bobdean; state: Exp; lines: +10 -5 Removed libdbmixer from makefile as it is depreciated. ---------------------------- revision 1.7 date: 2001/02/11 08:23:30; author: rgbe; state: Exp; lines: +2 -2 Changed emixer name to exmixer ---------------------------- revision 1.6 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +4 -1 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.5 date: 2000/11/23 08:31:44; author: bobdean; state: Exp; lines: +4 -2 Added dbmsg_test.c and updated the makefile accordingly. dbmsg_test.c will compile into dbmsg_test, a simple gtk program. The UI consists of a menu to select a dbmix channel. Once a channel is selected, pressing one of the buttons to the right of the menu will cause that message to be sent to the previsouly chosen dbmix channel. Becuase dbmixer only implements a subset of the possible dbmix messages, this program allows all dbmix messages to be sent to a dbmix client for testing purposes. ---------------------------- revision 1.4 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +0 -1 i ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +2 -1 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +9 -1 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:46; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:46; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/Makefile.in,v Working file: dbmixer/Makefile.in head: 1.10 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 11; selected revisions: 11 description: ---------------------------- revision 1.10 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.9 date: 2001/02/21 05:12:44; author: bobdean; state: Exp; lines: +52 -89 Removed libdbmixer from makefile as it is depreciated. ---------------------------- revision 1.8 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +1 -1 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.7 date: 2001/02/11 08:23:30; author: rgbe; state: Exp; lines: +7 -7 Changed emixer name to exmixer ---------------------------- revision 1.6 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +8 -5 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.5 date: 2000/11/23 08:31:44; author: bobdean; state: Exp; lines: +14 -4 Added dbmsg_test.c and updated the makefile accordingly. dbmsg_test.c will compile into dbmsg_test, a simple gtk program. The UI consists of a menu to select a dbmix channel. Once a channel is selected, pressing one of the buttons to the right of the menu will cause that message to be sent to the previsouly chosen dbmix channel. Becuase dbmixer only implements a subset of the possible dbmix messages, this program allows all dbmix messages to be sent to a dbmix client for testing purposes. ---------------------------- revision 1.4 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +4 -4 i ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +4 -4 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +7 -4 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/about.c,v Working file: dbmixer/about.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/aclocal.m4,v Working file: dbmixer/aclocal.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:50; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:50; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/channel.c,v Working file: dbmixer/channel.c head: 1.24 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 25; selected revisions: 25 description: ---------------------------- revision 1.24 date: 2002/02/24 23:22:14; author: bobdean; state: Exp; lines: +25 -23 Updated channel volume creation code to reflect switch to 128 step scale. ---------------------------- revision 1.23 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +92 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.22 date: 2002/01/05 21:50:11; author: bobdean; state: Exp; lines: +11 -1 fixed sample copy/load/save problems ---------------------------- revision 1.21 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +3 -3 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.20 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +2 -2 Fixed all compile warnings in dbmixer ---------------------------- revision 1.19 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +8 -2 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.18 date: 2001/11/08 08:07:55; author: bobdean; state: Exp; lines: +1 -0 Added cue volume values to each channel. The channel level slider on dbmixer can now control the volume of the cue output for that channel. ---------------------------- revision 1.17 date: 2001/10/15 05:10:13; author: bobdean; state: Exp; lines: +260 -155 Added Sync+ and Sync- buttons to channel boxes. The buttons will cause the pitch to be increased/decreased by 5% in order to more exactly sync one song with another. ---------------------------- revision 1.16 date: 2001/10/12 06:08:33; author: bobdean; state: Exp; lines: +13 -46 Removed record button from channel boxes. Added Sample Editor box in between channel boxes and soundcard controls. This box will allow the user to record on a selected channel, and modify the start and end offsets of the sample. Samples are stilled played using the LOOP and SHOT buttons found on each channel box. ---------------------------- revision 1.15 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +184 -1 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.14 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +16 -1 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.13 date: 2001/04/02 00:52:40; author: bobdean; state: Exp; lines: +20 -1 exmixer.c: Few modifications. Added code to normalize() to detect if there was a fialure while reading ~/.joystick or /etc/joystick.cal, and to handle the more generic input appropriately. in em_button_pressed, added code to the MUTE CUE and PAUSE case statements to support on/off pushbuttons. The code should still be valid for momentary pushbuttons as well. ---------------------------- revision 1.12 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.11 date: 2001/03/16 03:18:10; author: bobdean; state: Exp; lines: +18 -0 Fixed memory leak caused by auto-update of channel menus. Each channel widget structure now contains a GSList to which all menu data pointers are added. This list is then emptied before the new menus are created. Fixed gtk assertion failure on creation of preferences dialog. ---------------------------- revision 1.10 date: 2001/03/16 02:22:25; author: bobdean; state: Exp; lines: +12 -8 channel.c: If the channel selection menu was in use while the update function was called, bad things would happen becuase the menu object is deleted by the update function. Added a if (!GTK_WIDGET_VISIBLE check around the menu recreation code ---------------------------- revision 1.9 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +44 -23 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.8 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +8 -1 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.7 date: 2000/12/02 23:12:31; author: bobdean; state: Exp; lines: +1 -10 channel.c: channel gain sliders were only going from 1-100 percent volume instead of the proper 0-100 percent. This was causing channel bleed through. ---------------------------- revision 1.6 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +2 -2 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.5 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +16 -17 general commit in case I missed anything... ---------------------------- revision 1.4 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +4 -2 i ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +136 -67 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +1 -1 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/channel.h,v Working file: dbmixer/channel.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: dead; lines: +0 -0 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:50; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:50; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/config.cache,v Working file: dbmixer/config.cache head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:33:45; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removed unneccessary CVS files. ---------------------------- revision 1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/config.log,v Working file: dbmixer/config.log head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:33:45; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removed unneccessary CVS files. ---------------------------- revision 1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/crossfader.c,v Working file: dbmixer/crossfader.c head: 1.16 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 17; selected revisions: 17 description: ---------------------------- revision 1.16 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +17 -18 Fixed all compile warnings in dbmixer ---------------------------- revision 1.15 date: 2001/12/31 19:11:32; author: bobdean; state: Exp; lines: +9 -11 Finally figured out how to have the right crossfader select be initialized to the second channel. The gtk_menu_set_active() call MUST occur before the gtk_option_menu_set_menu() call. Why, I dunno. ---------------------------- revision 1.14 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +25 -9 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.13 date: 2001/04/02 00:52:40; author: bobdean; state: Exp; lines: +4 -19 exmixer.c: Few modifications. Added code to normalize() to detect if there was a fialure while reading ~/.joystick or /etc/joystick.cal, and to handle the more generic input appropriately. in em_button_pressed, added code to the MUTE CUE and PAUSE case statements to support on/off pushbuttons. The code should still be valid for momentary pushbuttons as well. ---------------------------- revision 1.12 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.11 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +20 -3 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.10 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +26 -0 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.9 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +5 -5 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.8 date: 2000/11/12 09:21:15; author: bobdean; state: Exp; lines: +108 -155 crossfader.c: replaced autofade functions with new versions that use gtk timeouts instaed of calls to select(). The new code is simpler, more elegant, and fixes the fade jumping issue. ---------------------------- revision 1.7 date: 2000/11/12 07:39:57; author: bobdean; state: Exp; lines: +9 -52 crossfader.c: made crossfade control flags volatile. This fixes about 75% of the fade jumping problems. ---------------------------- revision 1.6 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +22 -17 i ---------------------------- revision 1.5 date: 2000/07/29 23:23:17; author: bobdean; state: Exp; lines: +40 -25 light.c: Added gtk timeout callback routine to handle toggling the clipping notifier light dbmixer.c: Added gtk timeotu call to setup the clipping light callback timeout ---------------------------- revision 1.4 date: 2000/07/28 05:34:56; author: bobdean; state: Exp; lines: +260 -21 It is now possible to set the autofade speed using the "Autofade Spd." slider. The final speed is the value shown * 2 seconds. 2 seconds being the hardcoded default fade speed. ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +143 -2 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +0 -2 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/dbaudiolib.h,v Working file: dbmixer/dbaudiolib.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: dead; lines: +0 -0 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/dbmixer.c,v Working file: dbmixer/dbmixer.c head: 1.22 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 23; selected revisions: 23 description: ---------------------------- revision 1.22 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +100 -3 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.21 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +48 -5 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.20 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +1 -0 Fixed all compile warnings in dbmixer ---------------------------- revision 1.19 date: 2001/10/15 05:13:22; author: bobdean; state: Exp; lines: +1 -1 Added vertical separator in between sample editor and sound controls boxes. ---------------------------- revision 1.18 date: 2001/10/15 05:10:13; author: bobdean; state: Exp; lines: +1 -16 Added Sync+ and Sync- buttons to channel boxes. The buttons will cause the pitch to be increased/decreased by 5% in order to more exactly sync one song with another. ---------------------------- revision 1.17 date: 2001/10/12 06:08:33; author: bobdean; state: Exp; lines: +15 -0 Removed record button from channel boxes. Added Sample Editor box in between channel boxes and soundcard controls. This box will allow the user to record on a selected channel, and modify the start and end offsets of the sample. Samples are stilled played using the LOOP and SHOT buttons found on each channel box. ---------------------------- revision 1.16 date: 2001/04/02 00:52:40; author: bobdean; state: Exp; lines: +21 -0 exmixer.c: Few modifications. Added code to normalize() to detect if there was a fialure while reading ~/.joystick or /etc/joystick.cal, and to handle the more generic input appropriately. in em_button_pressed, added code to the MUTE CUE and PAUSE case statements to support on/off pushbuttons. The code should still be valid for momentary pushbuttons as well. ---------------------------- revision 1.15 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.14 date: 2001/03/16 03:18:10; author: bobdean; state: Exp; lines: +5 -6 Fixed memory leak caused by auto-update of channel menus. Each channel widget structure now contains a GSList to which all menu data pointers are added. This list is then emptied before the new menus are created. Fixed gtk assertion failure on creation of preferences dialog. ---------------------------- revision 1.13 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +4 -1 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.12 date: 2001/02/11 08:28:07; author: rgbe; state: Exp; lines: +9 -9 Changed emixer name to exmixer ---------------------------- revision 1.11 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +4 -0 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.10 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +37 -6 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.9 date: 2000/12/18 07:42:53; author: bobdean; state: Exp; lines: +1 -1 dbmsg_test: rewind and fastforward messages now include a data value of 5 seconds ---------------------------- revision 1.8 date: 2000/11/19 08:56:13; author: bobdean; state: Exp; lines: +1 -0 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.7 date: 2000/10/30 00:31:06; author: bobdean; state: Exp; lines: +6 -6 dbmixer.c: removed g_thread_init call since gthreads are not used anymore. CV.: ---------------------------------------------------------------------- ---------------------------- revision 1.6 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +7 -17 i ---------------------------- revision 1.5 date: 2000/07/29 23:23:17; author: bobdean; state: Exp; lines: +6 -0 light.c: Added gtk timeout callback routine to handle toggling the clipping notifier light dbmixer.c: Added gtk timeotu call to setup the clipping light callback timeout ---------------------------- revision 1.4 date: 2000/07/28 05:34:56; author: bobdean; state: Exp; lines: +8 -16 It is now possible to set the autofade speed using the "Autofade Spd." slider. The final speed is the value shown * 2 seconds. 2 seconds being the hardcoded default fade speed. ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +37 -14 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +14 -4 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/dbmixer.h,v Working file: dbmixer/dbmixer.h head: 1.28 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 29; selected revisions: 29 description: ---------------------------- revision 1.28 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +2 -0 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.27 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +4 -2 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.26 date: 2002/01/05 21:50:11; author: bobdean; state: Exp; lines: +2 -0 fixed sample copy/load/save problems ---------------------------- revision 1.25 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +10 -3 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.24 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +1 -1 Fixed all compile warnings in dbmixer ---------------------------- revision 1.23 date: 2001/10/15 05:43:08; author: bobdean; state: Exp; lines: +1 -1 Changed label for single play from Shot to Once. ---------------------------- revision 1.22 date: 2001/10/15 05:10:13; author: bobdean; state: Exp; lines: +4 -0 Added Sync+ and Sync- buttons to channel boxes. The buttons will cause the pitch to be increased/decreased by 5% in order to more exactly sync one song with another. ---------------------------- revision 1.21 date: 2001/10/15 00:43:09; author: bobdean; state: Exp; lines: +3 -0 Added start and end sliders to control the start and endpoints of the selected sample. There is a faint click or pop when the sample loops back around, I'm working on finding out why. ---------------------------- revision 1.20 date: 2001/10/12 06:08:33; author: bobdean; state: Exp; lines: +7 -5 Removed record button from channel boxes. Added Sample Editor box in between channel boxes and soundcard controls. This box will allow the user to record on a selected channel, and modify the start and end offsets of the sample. Samples are stilled played using the LOOP and SHOT buttons found on each channel box. ---------------------------- revision 1.19 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +6 -0 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.18 date: 2001/04/02 00:52:40; author: bobdean; state: Exp; lines: +1 -0 exmixer.c: Few modifications. Added code to normalize() to detect if there was a fialure while reading ~/.joystick or /etc/joystick.cal, and to handle the more generic input appropriately. in em_button_pressed, added code to the MUTE CUE and PAUSE case statements to support on/off pushbuttons. The code should still be valid for momentary pushbuttons as well. ---------------------------- revision 1.17 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +0 -2 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.16 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +3 -1 massive commit to catch anything I missed. ---------------------------- revision 1.15 date: 2001/03/16 03:18:10; author: bobdean; state: Exp; lines: +1 -0 Fixed memory leak caused by auto-update of channel menus. Each channel widget structure now contains a GSList to which all menu data pointers are added. This list is then emptied before the new menus are created. Fixed gtk assertion failure on creation of preferences dialog. ---------------------------- revision 1.14 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +1 -0 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.13 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +3 -1 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.12 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +3 -0 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.11 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +6 -2 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.10 date: 2000/12/02 22:53:43; author: bobdean; state: Exp; lines: +1 -0 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.9 date: 2000/11/23 08:31:44; author: bobdean; state: Exp; lines: +3 -0 Added dbmsg_test.c and updated the makefile accordingly. dbmsg_test.c will compile into dbmsg_test, a simple gtk program. The UI consists of a menu to select a dbmix channel. Once a channel is selected, pressing one of the buttons to the right of the menu will cause that message to be sent to the previsouly chosen dbmix channel. Becuase dbmixer only implements a subset of the possible dbmix messages, this program allows all dbmix messages to be sent to a dbmix client for testing purposes. ---------------------------- revision 1.8 date: 2000/11/19 08:56:13; author: bobdean; state: Exp; lines: +3 -1 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.7 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +3 -0 general commit in case I missed anything... ---------------------------- revision 1.6 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +4 -0 i ---------------------------- revision 1.5 date: 2000/07/29 23:23:17; author: bobdean; state: Exp; lines: +4 -0 light.c: Added gtk timeout callback routine to handle toggling the clipping notifier light dbmixer.c: Added gtk timeotu call to setup the clipping light callback timeout ---------------------------- revision 1.4 date: 2000/07/28 05:34:56; author: bobdean; state: Exp; lines: +4 -1 It is now possible to set the autofade speed using the "Autofade Spd." slider. The final speed is the value shown * 2 seconds. 2 seconds being the hardcoded default fade speed. ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +10 -2 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +2 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/dbmixer_plugin.c,v Working file: dbmixer/dbmixer_plugin.c head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/dbmixer_standalone.c,v Working file: dbmixer/dbmixer_standalone.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +1 -0 i ---------------------------- revision 1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/dbmsg_test.c,v Working file: dbmixer/dbmsg_test.c head: 1.5 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.5 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.4 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +2 -3 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.3 date: 2000/12/18 07:42:53; author: bobdean; state: Exp; lines: +10 -0 dbmsg_test: rewind and fastforward messages now include a data value of 5 seconds ---------------------------- revision 1.2 date: 2000/11/23 18:13:25; author: bobdean; state: Exp; lines: +41 -16 updated dbmsg_test UI to be more aesthetically appeasing ---------------------------- revision 1.1 date: 2000/11/23 08:31:44; author: bobdean; state: Exp; Added dbmsg_test.c and updated the makefile accordingly. dbmsg_test.c will compile into dbmsg_test, a simple gtk program. The UI consists of a menu to select a dbmix channel. Once a channel is selected, pressing one of the buttons to the right of the menu will cause that message to be sent to the previsouly chosen dbmix channel. Becuase dbmixer only implements a subset of the possible dbmix messages, this program allows all dbmix messages to be sent to a dbmix client for testing purposes. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/debug.c,v Working file: dbmixer/debug.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/debug.h,v Working file: dbmixer/debug.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +9 -0 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/emixer.c,v Working file: dbmixer/emixer.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/02/20 06:45:05; author: bobdean; state: Exp; lines: +4 -3 The update_channel function is now called be a timeout once a second. Rare functionality (remaking the channel lists) is updated every 3 seconds. ---------------------------- revision 1.2 date: 2001/02/11 08:30:30; author: rgbe; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/emixer.h,v Working file: dbmixer/emixer.h head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/02/11 08:30:30; author: rgbe; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/emixer_prefs.c,v Working file: dbmixer/emixer_prefs.c head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/02/11 08:30:30; author: rgbe; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/Attic/emixer_prefs.h,v Working file: dbmixer/emixer_prefs.h head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/02/11 08:30:30; author: rgbe; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/exmixer.c,v Working file: dbmixer/exmixer.c head: 1.6 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.6 date: 2001/04/02 01:04:01; author: bobdean; state: Exp; lines: +5 -2 fixed typo. ---------------------------- revision 1.5 date: 2001/04/02 00:52:40; author: bobdean; state: Exp; lines: +81 -22 exmixer.c: Few modifications. Added code to normalize() to detect if there was a fialure while reading ~/.joystick or /etc/joystick.cal, and to handle the more generic input appropriately. in em_button_pressed, added code to the MUTE CUE and PAUSE case statements to support on/off pushbuttons. The code should still be valid for momentary pushbuttons as well. ---------------------------- revision 1.4 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -2 massive commit to catch anything I missed. ---------------------------- revision 1.3 date: 2001/02/23 03:33:45; author: bobdean; state: Exp; lines: +2 -2 CVS tree cleanup, removed unneccessary CVS files. ---------------------------- revision 1.2 date: 2001/02/21 05:12:44; author: bobdean; state: Exp; lines: +3 -3 Removed libdbmixer from makefile as it is depreciated. ---------------------------- revision 1.1 date: 2001/02/11 08:24:24; author: rgbe; state: Exp; Changed emixer name to exmixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/exmixer.h,v Working file: dbmixer/exmixer.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/02/11 08:24:24; author: rgbe; state: Exp; Changed emixer name to exmixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/exmixer_prefs.c,v Working file: dbmixer/exmixer_prefs.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -2 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2001/02/21 05:12:44; author: bobdean; state: Exp; lines: +2 -2 Removed libdbmixer from makefile as it is depreciated. ---------------------------- revision 1.1 date: 2001/02/11 08:24:24; author: rgbe; state: Exp; Changed emixer name to exmixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/exmixer_prefs.h,v Working file: dbmixer/exmixer_prefs.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/02/11 08:24:24; author: rgbe; state: Exp; Changed emixer name to exmixer ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/light.c,v Working file: dbmixer/light.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +33 -49 i ---------------------------- revision 1.1 date: 2000/07/29 23:24:26; author: bobdean; state: Exp; Added light.c to cvs. light.c contains the function necessary to create, update, and show the clipping notifier light. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/monitor.c,v Working file: dbmixer/monitor.c head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +48 -22 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.1 date: 2000/07/15 16:50:27; author: bobdean; state: Exp; Added monitor.c, monitor.c will hold the dbmixer montior thread. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/plugin.h,v Working file: dbmixer/plugin.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:53; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:53; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/preferences.c,v Working file: dbmixer/preferences.c head: 1.13 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 14; selected revisions: 14 description: ---------------------------- revision 1.13 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +5 -4 Fixed all compile warnings in dbmixer ---------------------------- revision 1.12 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +3 -3 Release of 0.9.7 patch 2 ---------------------------- revision 1.11 date: 2001/03/18 23:45:33; author: bobdean; state: Exp; lines: +6 -0 Added directions to soundcard section of preferences dialog. ---------------------------- revision 1.10 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +145 -58 massive commit to catch anything I missed. ---------------------------- revision 1.9 date: 2001/03/16 03:18:10; author: bobdean; state: Exp; lines: +1 -2 Fixed memory leak caused by auto-update of channel menus. Each channel widget structure now contains a GSList to which all menu data pointers are added. This list is then emptied before the new menus are created. Fixed gtk assertion failure on creation of preferences dialog. ---------------------------- revision 1.8 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +7 -0 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.7 date: 2001/02/23 03:33:45; author: bobdean; state: Exp; lines: +0 -2 CVS tree cleanup, removed unneccessary CVS files. ---------------------------- revision 1.6 date: 2001/02/11 08:30:30; author: rgbe; state: Exp; lines: +23 -23 *** empty log message *** ---------------------------- revision 1.5 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +22 -3 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.4 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; lines: +69 -4 Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ---------------------------- revision 1.3 date: 2000/11/19 22:54:32; author: bobdean; state: Exp; lines: +34 -5 preferences.c: the output of /dev/sndstat changed with the recent OSS driver release from 4front. the scan_devices() parsing function has been updated to handle this change. ---------------------------- revision 1.2 date: 2000/09/12 05:56:10; author: bobdean; state: Exp; lines: +68 -32 i ---------------------------- revision 1.1 date: 2000/07/10 01:02:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/sample_editor.c,v Working file: dbmixer/sample_editor.c head: 1.11 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 11; selected revisions: 11 description: ---------------------------- revision 1.11 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +5 -5 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.10 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +0 -1 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.9 date: 2002/02/17 08:36:07; author: bobdean; state: Exp; lines: +15 -9 Fixed logic error in calculating sample buffer offsets using sample editor sliders. ---------------------------- revision 1.8 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +29 -10 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.7 date: 2002/01/05 21:50:11; author: bobdean; state: Exp; lines: +38 -36 fixed sample copy/load/save problems ---------------------------- revision 1.6 date: 2002/01/04 06:55:28; author: bobdean; state: Exp; lines: +0 -30 fixed seg fault when using copy selection menu, but segfault still exists on copy sample button clicks. ---------------------------- revision 1.5 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +312 -35 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.4 date: 2002/01/01 00:06:39; author: bobdean; state: Exp; lines: +2 -6 Fixed all compile warnings in dbmixer ---------------------------- revision 1.3 date: 2001/10/15 05:10:13; author: bobdean; state: Exp; lines: +78 -72 Added Sync+ and Sync- buttons to channel boxes. The buttons will cause the pitch to be increased/decreased by 5% in order to more exactly sync one song with another. ---------------------------- revision 1.2 date: 2001/10/15 00:43:09; author: bobdean; state: Exp; lines: +110 -64 Added start and end sliders to control the start and endpoints of the selected sample. There is a faint click or pop when the sample loops back around, I'm working on finding out why. ---------------------------- revision 1.1 date: 2001/10/12 06:08:33; author: bobdean; state: Exp; Removed record button from channel boxes. Added Sample Editor box in between channel boxes and soundcard controls. This box will allow the user to record on a selected channel, and modify the start and end offsets of the sample. Samples are stilled played using the LOOP and SHOT buttons found on each channel box. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/save_prefs.c,v Working file: dbmixer/save_prefs.c head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +14 -2 massive commit to catch anything I missed. ---------------------------- revision 1.3 date: 2001/02/11 08:30:30; author: rgbe; state: Exp; lines: +7 -7 *** empty log message *** ---------------------------- revision 1.2 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +122 -109 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/save_prefs.h,v Working file: dbmixer/save_prefs.h head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2001/02/11 08:30:30; author: rgbe; state: Exp; lines: +1 -1 *** empty log message *** ---------------------------- revision 1.1 date: 2001/01/14 23:04:54; author: bobdean; state: Exp; Addition of Simon Werner's badass emixer code. Now you can build an external DJ Mixer style device to control dbmix. The "emixer" as Simon calls it attaches to any joystick port. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/soundcard_control.c,v Working file: dbmixer/soundcard_control.c head: 1.13 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 14; selected revisions: 14 description: ---------------------------- revision 1.13 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +10 -4 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.12 date: 2001/11/08 07:12:35; author: bobdean; state: Exp; lines: +46 -26 Modified dbmixer such that if single output mode is engaged the following happens: The cue soundcard is not opened The cue split button is disabled since cue split is on by default The cue slider has not affect. ---------------------------- revision 1.11 date: 2001/10/15 05:10:13; author: bobdean; state: Exp; lines: +5 -0 Added Sync+ and Sync- buttons to channel boxes. The buttons will cause the pitch to be increased/decreased by 5% in order to more exactly sync one song with another. ---------------------------- revision 1.10 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +0 -2 Release of 0.9.7 patch 2 ---------------------------- revision 1.9 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.8 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +40 -3 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.7 date: 2001/01/31 05:16:49; author: bobdean; state: Exp; lines: +4 -2 soundcard_control.c: fixed bug with initing the soundcard volume. The wrong bitmask was applied to the values returned by the ioctl calls to the card. ---------------------------- revision 1.6 date: 2000/12/02 22:53:43; author: bobdean; state: Exp; lines: +36 -1 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.5 date: 2000/11/19 08:56:13; author: bobdean; state: Exp; lines: +127 -41 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.4 date: 2000/07/28 05:34:56; author: bobdean; state: Exp; lines: +22 -12 It is now possible to set the autofade speed using the "Autofade Spd." slider. The final speed is the value shown * 2 seconds. 2 seconds being the hardcoded default fade speed. ---------------------------- revision 1.3 date: 2000/07/17 06:51:23; author: bobdean; state: Exp; lines: +0 -8 - Tightened up GUI layout so that mixer takes up much less screen real estate - Added pitch control buttons "<5" and "5>" which will change the pitch by +/- 5% - The reset/center pitch button is now labeld as "-|-" - added monitor thread. The thread causes a seg fault on exit, but this does not effect normal operation - added the "<" "/\" and ">" buttons to the crossfader hbox. "<" will set the crossfader to the far left, ">" will set it to the far right and "/\" will center the crossfader. This functionality is a precursor for the smooth autofade feature. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +8 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:56; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:56; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/template.c,v Working file: dbmixer/template.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +4 -4 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:55; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:55; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/about.P,v Working file: dbmixer/.deps/about.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:59; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:59; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/channel.P,v Working file: dbmixer/.deps/channel.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:03:00; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:00; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/crossfader.P,v Working file: dbmixer/.deps/crossfader.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:57; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:57; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/dbmixer.P,v Working file: dbmixer/.deps/dbmixer.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:58; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:58; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/dbmixer_plugin.P,v Working file: dbmixer/.deps/dbmixer_plugin.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:03:02; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:02; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/dbmixer_standalone.P,v Working file: dbmixer/.deps/dbmixer_standalone.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:03:01; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:01; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/debug.P,v Working file: dbmixer/.deps/debug.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:59; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:59; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/preferences.P,v Working file: dbmixer/.deps/preferences.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:03:04; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:04; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbmixer/.deps/Attic/soundcard_control.P,v Working file: dbmixer/.deps/soundcard_control.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: dead; lines: +0 -0 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:03:03; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:03:03; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/Makefile.am,v Working file: dbplaylist/Makefile.am head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2001/03/16 02:47:49; author: bobdean; state: Exp; lines: +2 -2 Added code to attach dbmix shared memeory so that the IPC layer can be used to send messages to channels. This is necessary because send the xmms PLAY folowed by the PAUSE commands does not always take. ---------------------------- revision 1.1 date: 2001/03/14 00:33:26; author: bobdean; state: Exp; Initial commit. Current only a CList widget that accepts dragged data, and will allow row repositions based on dragging. And the current drag destination is highlighted in green. =) ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/about.c,v Working file: dbplaylist/about.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/05/15 06:15:31; author: bobdean; state: Exp; Added files to CVS. Oops. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/dbplaylist.c,v Working file: dbplaylist/dbplaylist.c head: 1.21 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 21; selected revisions: 21 description: ---------------------------- revision 1.21 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +1 -1 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.20 date: 2002/02/17 01:30:35; author: bobdean; state: Exp; lines: +33 -16 Load playlist now skips any line begining with #EXT tags that xmms 1.2.6 introduced into its saved lists. ---------------------------- revision 1.19 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.18 date: 2001/11/27 07:15:27; author: bobdean; state: Exp; lines: +2 -0 Added check for empty songlist to set_cue_player function. ---------------------------- revision 1.17 date: 2001/11/08 06:08:43; author: bobdean; state: Exp; lines: +80 -69 Added a cue_must_be variable to track the value of the cue player. Added set_cue_player function which will set the player for the song at cue_index to be cue_must_be. Thus insuring that the cue player always has the same value until it is cued, and the player switches. ---------------------------- revision 1.16 date: 2001/11/06 06:30:05; author: bobdean; state: Exp; lines: +27 -1 Made drag n drop and delete code aware of cue point. Still need to add code to support swapping of players if cue point is moved by drag n drop or delete. ---------------------------- revision 1.15 date: 2001/10/09 04:24:27; author: bobdean; state: Exp; lines: +8 -6 Added comments and removed debug printf's. ---------------------------- revision 1.14 date: 2001/10/09 04:18:56; author: bobdean; state: Exp; lines: +11 -3 Fixed bug in drag_data_drop where the cue highlight position was not being kept constant, and the player for the cue was changed when a song was dropped on the cue highlight. ---------------------------- revision 1.13 date: 2001/09/25 04:32:31; author: bobdean; state: Exp; lines: +0 -1 Added message boxes to dbplaylist as appropriate to replace printed error messages. ---------------------------- revision 1.12 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +153 -50 general commit. ---------------------------- revision 1.11 date: 2001/09/25 03:08:52; author: bobdean; state: Exp; lines: +137 -72 Changed colors of cue highlight bar from red back/white text to pink back/black text for better readabiltiy. Re-ordering of players after drag and drop is now "cue aware": - and reorder causes a recalculation of players below the cue point - the player of the cue point stays the same even if another song is moved to the cue position - the cue point will move if songs are moved from below it to above, or from above to below. fixed seg fault on drag. ---------------------------- revision 1.10 date: 2001/08/17 05:42:50; author: bobdean; state: Exp; lines: +67 -4 dbplaylist.c: added support for drag n dropped symlinks. This is useful for when you keep a folder of "current" music that you are more likely to use, so you don't have to go search for a song in the gigs of music you may have. =) ---------------------------- revision 1.9 date: 2001/08/11 23:44:12; author: bobdean; state: Exp; lines: +61 -17 modified the load and save buttons to be "Load List" and "Save List" to ease confusion. The playlist now must also have a recognised playlist extenstion such as m3u or M3U. ---------------------------- revision 1.8 date: 2001/07/09 05:26:48; author: bobdean; state: Exp; lines: +49 -48 Added sampler_endoffset variable to channel structure to support editing of sample start and end points. ---------------------------- revision 1.7 date: 2001/05/15 06:13:55; author: bobdean; state: Exp; lines: +194 -42 Added field to each song data strcture to represnet which player should be used to play that song. The associated player is now displayed in the column of the listbox. The assigned player can be swapped with the other play by pressing the "Swap Plyr" Button. ---------------------------- revision 1.6 date: 2001/04/25 05:37:51; author: bobdean; state: Exp; lines: +8 -16 UI cleanup ---------------------------- revision 1.5 date: 2001/04/25 05:32:48; author: bobdean; state: Exp; lines: +350 -20 Added some list control buttons to delete a selection and mvoe the cue point up and down in the list. ---------------------------- revision 1.4 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +2 -4 massive commit to catch anything I missed. ---------------------------- revision 1.3 date: 2001/03/16 02:47:49; author: bobdean; state: Exp; lines: +285 -70 Added code to attach dbmix shared memeory so that the IPC layer can be used to send messages to channels. This is necessary because send the xmms PLAY folowed by the PAUSE commands does not always take. ---------------------------- revision 1.2 date: 2001/03/14 07:15:06; author: bobdean; state: Exp; lines: +243 -149 Added color support. Next song is highlighted in red, played songs have a white background and red text. ---------------------------- revision 1.1 date: 2001/03/14 00:33:26; author: bobdean; state: Exp; Initial commit. Current only a CList widget that accepts dragged data, and will allow row repositions based on dragging. And the current drag destination is highlighted in green. =) ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/dbplaylist.h,v Working file: dbplaylist/dbplaylist.h head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2002/02/17 01:30:35; author: bobdean; state: Exp; lines: +2 -0 Load playlist now skips any line begining with #EXT tags that xmms 1.2.6 introduced into its saved lists. ---------------------------- revision 1.3 date: 2001/09/25 03:08:52; author: bobdean; state: Exp; lines: +3 -0 Changed colors of cue highlight bar from red back/white text to pink back/black text for better readabiltiy. Re-ordering of players after drag and drop is now "cue aware": - and reorder causes a recalculation of players below the cue point - the player of the cue point stays the same even if another song is moved to the cue position - the cue point will move if songs are moved from below it to above, or from above to below. fixed seg fault on drag. ---------------------------- revision 1.2 date: 2001/08/11 23:44:12; author: bobdean; state: Exp; lines: +2 -2 modified the load and save buttons to be "Load List" and "Save List" to ease confusion. The playlist now must also have a recognised playlist extenstion such as m3u or M3U. ---------------------------- revision 1.1 date: 2001/05/15 06:15:31; author: bobdean; state: Exp; Added files to CVS. Oops. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/debug.c,v Working file: dbplaylist/debug.c head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/05/15 06:15:31; author: bobdean; state: Exp; Added files to CVS. Oops. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/dbplaylist/playerctrl.c,v Working file: dbplaylist/playerctrl.c head: 1.6 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.6 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -0 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.5 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +2 -2 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.4 date: 2001/11/08 06:08:43; author: bobdean; state: Exp; lines: +17 -5 Added a cue_must_be variable to track the value of the cue player. Added set_cue_player function which will set the player for the song at cue_index to be cue_must_be. Thus insuring that the cue player always has the same value until it is cued, and the player switches. ---------------------------- revision 1.3 date: 2001/09/25 04:32:31; author: bobdean; state: Exp; lines: +33 -10 Added message boxes to dbplaylist as appropriate to replace printed error messages. ---------------------------- revision 1.2 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +18 -5 general commit. ---------------------------- revision 1.1 date: 2001/05/15 06:15:31; author: bobdean; state: Exp; Added files to CVS. Oops. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Attic/Makefile,v Working file: include/Makefile head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.4 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.3 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +2 -2 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.2 date: 2000/07/10 02:40:57; author: bobdean; state: Exp; lines: +2 -2 cleaned up cvs tree ---------------------------- revision 1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Makefile.am,v Working file: include/Makefile.am head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Attic/Makefile.in,v Working file: include/Makefile.in head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Attic/channel.h,v Working file: include/channel.h head: 1.14 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 15; selected revisions: 15 description: ---------------------------- revision 1.14 date: 2001/03/21 06:24:24; author: bobdean; state: dead; lines: +0 -0 Changed all header files to have prefix of db to distinguish them from other system headers. ---------------------------- revision 1.13 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +3 -1 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.12 date: 2001/03/08 06:37:35; author: bobdean; state: Exp; lines: +4 -1 Updated channel.h to support dbfsd's use of FIONREAD to make sure that at least an output buffer's worth of data is sitting in the comm pipes before data is read. ---------------------------- revision 1.11 date: 2001/02/21 15:12:02; author: bobdean; state: Exp; lines: +14 -6 Added channel flags to channel.h ---------------------------- revision 1.10 date: 2001/02/06 05:45:48; author: bobdean; state: Exp; lines: +2 -0 Added talkover button to dbmixer. Clicking this button will drop all channel volumes to 25% so that mic input can clearly be heard. ---------------------------- revision 1.9 date: 2000/12/18 07:45:08; author: bobdean; state: Exp; lines: +29 -27 general commit. ---------------------------- revision 1.8 date: 2000/12/02 22:53:43; author: bobdean; state: Exp; lines: +13 -8 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.7 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +11 -3 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.6 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +13 -10 general commit in case I missed anything... ---------------------------- revision 1.5 date: 2000/09/13 05:15:49; author: bobdean; state: Exp; lines: +3 -1 general commit to make sure everything is in the tree... ---------------------------- revision 1.4 date: 2000/09/03 07:42:58; author: bobdean; state: Exp; lines: +3 -3 Added () around #defines that involve arithmetic Updated DBMIX_VERSION to be "v0.9.7" ---------------------------- revision 1.3 date: 2000/09/03 07:41:07; author: bobdean; state: Exp; lines: +122 -117 Added #include unistd.h stdio.h and stdlib.h Commented out networking support since it is unneeded at this time. ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: Exp; lines: +8 -7 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:02:25; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:25; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/dbaudiolib.h,v Working file: include/dbaudiolib.h head: 1.14 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 15; selected revisions: 15 description: ---------------------------- revision 1.14 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +1 -1 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.13 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +19 -10 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.12 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +56 -1 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.11 date: 2002/01/01 21:19:42; author: bobdean; state: Exp; lines: +4 -0 Added additional dbaudiolib functions for controlling sampler. ---------------------------- revision 1.10 date: 2002/01/01 21:08:51; author: bobdean; state: Exp; lines: +14 -1 Added dbaudiolib functions to support sampler control. ---------------------------- revision 1.9 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +4 -3 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.8 date: 2001/06/10 04:47:49; author: bobdean; state: Exp; lines: +6 -4 Added support to local_channel struct for sampler, and dbmsg to support setting the size of the sample buffer. ---------------------------- revision 1.7 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +17 -20 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.6 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.5 date: 2001/02/21 15:12:02; author: bobdean; state: Exp; lines: +8 -0 Added channel flags to channel.h ---------------------------- revision 1.4 date: 2000/12/18 07:45:08; author: bobdean; state: Exp; lines: +3 -3 general commit. ---------------------------- revision 1.3 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +7 -6 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.2 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +11 -7 general commit in case I missed anything... ---------------------------- revision 1.1 date: 2000/07/10 01:02:29; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:29; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/dbchannel.h,v Working file: include/dbchannel.h head: 1.15 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 15; selected revisions: 15 description: ---------------------------- revision 1.15 date: 2002/02/18 09:54:55; author: bobdean; state: Exp; lines: +20 -1 Added recording functionality. Data is recorded to a wav file from the master output generated by dbmix. Starting/Stopping recording is controlled from the dbmixer->options menu. ---------------------------- revision 1.14 date: 2002/02/18 01:45:14; author: bobdean; state: Exp; lines: +0 -7 Moved sampler state definitions to dbaudiolib.h from dbchannel.h added DBAudio_Sampler_Get_State function. ---------------------------- revision 1.13 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +2 -49 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.12 date: 2002/01/04 06:51:51; author: bobdean; state: Exp; lines: +8 -1 Added support for loading and saving samples. Copying samples between clients does not yet work, and will cause dbmixer to segfault. ---------------------------- revision 1.11 date: 2002/01/01 21:08:51; author: bobdean; state: Exp; lines: +11 -9 Added dbaudiolib functions to support sampler control. ---------------------------- revision 1.10 date: 2001/12/17 00:29:52; author: bobdean; state: Exp; lines: +1 -1 Converted dbaduiolib and dbmixer to use an internal volume scale of 0-128 ---------------------------- revision 1.9 date: 2001/11/08 08:07:55; author: bobdean; state: Exp; lines: +2 -0 Added cue volume values to each channel. The channel level slider on dbmixer can now control the volume of the cue output for that channel. ---------------------------- revision 1.8 date: 2001/11/08 07:14:43; author: bobdean; state: Exp; lines: +2 -1 Added support for single output mode. If enabled in dbfsd, then the master output will be output as a mono signal on the right channel, and the cue output will be sent out as a mono singnal on the left channel. Thus, cueing is accomplished with only one soundcard. ---------------------------- revision 1.7 date: 2001/07/09 05:26:48; author: bobdean; state: Exp; lines: +1 -0 Added sampler_endoffset variable to channel structure to support editing of sample start and end points. ---------------------------- revision 1.6 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +20 -16 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.5 date: 2001/06/19 05:15:03; author: bobdean; state: Exp; lines: +5 -2 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.4 date: 2001/06/16 23:45:31; author: bobdean; state: Exp; lines: +20 -12 Whoops. Deleted some fields from a strucutre I thought were depreciated, and broke EVERYTHING. Commenting is good. ---------------------------- revision 1.3 date: 2001/06/10 09:18:54; author: bobdean; state: Exp; lines: +1 -2 code cleanup ---------------------------- revision 1.2 date: 2001/06/10 04:47:49; author: bobdean; state: Exp; lines: +46 -29 Added support to local_channel struct for sampler, and dbmsg to support setting the size of the sample buffer. ---------------------------- revision 1.1 date: 2001/03/21 06:24:24; author: bobdean; state: Exp; Changed all header files to have prefix of db to distinguish them from other system headers. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/dbdebug.h,v Working file: include/dbdebug.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/03/21 06:24:24; author: bobdean; state: Exp; Changed all header files to have prefix of db to distinguish them from other system headers. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/dbsoundcard.h,v Working file: include/dbsoundcard.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/03/21 06:24:24; author: bobdean; state: Exp; Changed all header files to have prefix of db to distinguish them from other system headers. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Attic/debug.h,v Working file: include/debug.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/21 06:24:24; author: bobdean; state: dead; lines: +0 -0 Changed all header files to have prefix of db to distinguish them from other system headers. ---------------------------- revision 1.1 date: 2000/07/10 01:02:29; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:29; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/include/Attic/soundcard.h,v Working file: include/soundcard.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/03/21 06:24:24; author: bobdean; state: dead; lines: +0 -0 Changed all header files to have prefix of db to distinguish them from other system headers. ---------------------------- revision 1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:32; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/.cvsignore,v Working file: macros/.cvsignore head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:14; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:14; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/ChangeLog,v Working file: macros/ChangeLog head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/Makefile.am,v Working file: macros/Makefile.am head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/aclocal-include.m4,v Working file: macros/aclocal-include.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:17; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/autogen.sh,v Working file: macros/autogen.sh head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:18; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:18; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/compiler-flags.m4,v Working file: macros/compiler-flags.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:18; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:18; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/curses.m4,v Working file: macros/curses.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-common.m4,v Working file: macros/gnome-common.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-cxx-check.m4,v Working file: macros/gnome-cxx-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:19; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-fileutils.m4,v Working file: macros/gnome-fileutils.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:20; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:20; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-gettext.m4,v Working file: macros/gnome-gettext.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-ghttp-check.m4,v Working file: macros/gnome-ghttp-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-gnorba-check.m4,v Working file: macros/gnome-gnorba-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-guile-checks.m4,v Working file: macros/gnome-guile-checks.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:21; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-libgtop-check.m4,v Working file: macros/gnome-libgtop-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:22; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:22; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-objc-checks.m4,v Working file: macros/gnome-objc-checks.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-orbit-check.m4,v Working file: macros/gnome-orbit-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-print-check.m4,v Working file: macros/gnome-print-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-pthread-check.m4,v Working file: macros/gnome-pthread-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-support.m4,v Working file: macros/gnome-support.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-undelfs.m4,v Working file: macros/gnome-undelfs.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:23; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-vfs.m4,v Working file: macros/gnome-vfs.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-x-checks.m4,v Working file: macros/gnome-x-checks.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome-xml-check.m4,v Working file: macros/gnome-xml-check.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/gnome.m4,v Working file: macros/gnome.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/linger.m4,v Working file: macros/linger.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/need-declaration.m4,v Working file: macros/need-declaration.m4 head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:02:24; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/macros/xmms.m4,v Working file: macros/xmms.m4 head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2001/03/18 20:56:37; author: bobdean; state: Exp; added xmms.m4 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/Makefile,v Working file: terminatorX/Makefile head: 1.13 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 14; selected revisions: 14 description: ---------------------------- revision 1.13 date: 2002/02/04 06:37:15; author: bobdean; state: Exp; lines: +1 -1 During development, definitions were added to dbchannel.c while they should have been placed in dbaudiolib.h. This necessitated the #include of dbchannel.h and dbaudiolib.h clients, where only dbaudiolib.h should have been needed. This has been fixed. ---------------------------- revision 1.12 date: 2001/09/25 03:56:39; author: bobdean; state: Exp; lines: +4 -4 general commit. ---------------------------- revision 1.11 date: 2001/08/11 22:42:11; author: bobdean; state: Exp; lines: +2 -2 Updating parity between cvs and my dev tree. ---------------------------- revision 1.10 date: 2001/07/03 05:24:56; author: bobdean; state: Exp; lines: +3 -3 Added digital sampler. Controlled by dbmixer. To record, press the Rec button for a channel. Unselect the Rec button to stop record. Button will automatically unclick when buffer is full. Press Shot to play the sample once, loop to loop it. To stop looping, unselect the loop button. The Shot button will always cause the smaple to play from the begining. THe loop button will pick up at the current position of the sample if it is playing. To stop a single playback of the sample, select Loop and then unselect it. ---------------------------- revision 1.9 date: 2001/06/19 05:15:04; author: bobdean; state: Exp; lines: +3 -3 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.8 date: 2001/03/19 04:47:59; author: bobdean; state: Exp; lines: +2 -2 Release of 0.9.7 patch 2 ---------------------------- revision 1.7 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +16 -4 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.6 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.5 date: 2001/03/12 05:30:24; author: bobdean; state: Exp; lines: +2 -2 Changed DB_NUM_FRAGMENTS to be 128, added DB_MIN_AUDIO_BUFFS which has a value of 10, which is the mimimum value for DB_NUM_FRAGMENTS. I am aware that the names do not match up, but it's late and I'm going to bed. ---------------------------- revision 1.4 date: 2001/03/06 06:22:46; author: bobdean; state: Exp; lines: +5 -5 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.3 date: 2000/12/02 22:53:44; author: bobdean; state: Exp; lines: +1 -1 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.2 date: 2000/11/19 01:21:10; author: bobdean; state: Exp; lines: +1 -1 general commit in case I missed anything... ---------------------------- revision 1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/Makefile.am,v Working file: terminatorX/Makefile.am head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/11/23 06:11:43; author: bobdean; state: Exp; lines: +1 -1 added the tX_audiodevice.cc-v3.70 file to the makefile. ---------------------------- revision 1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/Makefile.in,v Working file: terminatorX/Makefile.in head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +13 -1 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.2 date: 2000/12/02 22:53:44; author: bobdean; state: Exp; lines: +1 -1 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/README.terminatorX,v Working file: terminatorX/README.terminatorX head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/11/23 06:10:46; author: bobdean; state: Exp; lines: +12 -8 TerminatorX version 3.70 came out the other day and the prototypes in the audio device file have changed. These changed are reflected in the tX_audiodevice.cc-v3.70 file. Directions on how to use this file are in the README.terminatorX file. ---------------------------- revision 1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/tX_audiodevice.cc,v Working file: terminatorX/tX_audiodevice.cc head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:40; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/terminatorX/tX_audiodevice.cc-v3.70,v Working file: terminatorX/tX_audiodevice.cc-v3.70 head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2000/11/23 06:10:46; author: bobdean; state: Exp; TerminatorX version 3.70 came out the other day and the prototypes in the audio device file have changed. These changed are reflected in the tX_audiodevice.cc-v3.70 file. Directions on how to use this file are in the README.terminatorX file. ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/DBMixout.h,v Working file: xmms_plugin/DBMixout.h head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/12/02 22:53:44; author: bobdean; state: dead; lines: +0 -0 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/Makefile,v Working file: xmms_plugin/Makefile head: 1.4 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 5; selected revisions: 5 description: ---------------------------- revision 1.4 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.3 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +2 -2 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.2 date: 2000/11/19 01:18:16; author: bobdean; state: Exp; lines: +1 -1 All files: added support for dbaudiolib message handler callback function The function is in auido.c and named dbmix_message_handler ---------------------------- revision 1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Makefile.am,v Working file: xmms_plugin/Makefile.am head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/03/18 22:29:44; author: bobdean; state: Exp; lines: +1 -1 updated configure script to use xmms-config and cleaned it up a bit ---------------------------- revision 1.4 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +1 -1 blah. ---------------------------- revision 1.3 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +1 -1 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.2 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +2 -2 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:41; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/Makefile.in,v Working file: xmms_plugin/Makefile.in head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.2 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +2 -2 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.1 date: 2000/07/10 01:04:42; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:42; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/about.c,v Working file: xmms_plugin/about.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +1 -1 blah. ---------------------------- revision 1.1 date: 2000/07/10 01:04:42; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:42; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/audio.bak2.c,v Working file: xmms_plugin/audio.bak2.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:46; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:46; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/audio.bak3.c,v Working file: xmms_plugin/audio.bak3.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:46; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:46; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/audio.c,v Working file: xmms_plugin/audio.c head: 1.24 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 25; selected revisions: 25 description: ---------------------------- revision 1.24 date: 2002/02/24 23:01:41; author: bobdean; state: Exp; lines: +0 -2 Removed unneeded debug statements ---------------------------- revision 1.23 date: 2002/02/18 01:40:48; author: bobdean; state: Exp; lines: +27 -9 In the case that buffering is being used, dbmix_write is now concious of the sampler state, and will spin while a sample is being played. This prevents song decode from progressing while the sample is being played. non-buffer mode does this by default. ---------------------------- revision 1.22 date: 2002/02/17 23:17:15; author: bobdean; state: Exp; lines: +154 -97 The user now has the ablity to enable the use of the prebuffer, or to use a more "realtime" output method. The prebuffer ablitiy was kept becuase slower systems may skip without it. ---------------------------- revision 1.21 date: 2002/02/17 20:05:24; author: bobdean; state: Exp; lines: +16 -7 Fixed error in dbmix_write function. The written variable was not being updated, causing no vizualization output. ---------------------------- revision 1.20 date: 2002/02/17 09:41:23; author: bobdean; state: Exp; lines: +81 -25 Removed prebuffering from xmms output plugin. It allowed xmms to think data was being consumed while a sample was being looped. ---------------------------- revision 1.19 date: 2002/01/01 00:18:23; author: bobdean; state: Exp; lines: +1 -1 Fixed all compile warnings in xmms output plugin. ---------------------------- revision 1.18 date: 2001/06/19 05:15:04; author: bobdean; state: Exp; lines: +9 -3 General commit. Added basic digital sampler abilties to dbaudiolib, but have not tested them yet beyond verifying that it does not break standard audio playback or IPC control. ---------------------------- revision 1.17 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +3 -3 massive commit to catch anything I missed. ---------------------------- revision 1.16 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +4 -4 blah. ---------------------------- revision 1.15 date: 2001/03/06 06:22:47; author: bobdean; state: Exp; lines: +20 -25 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.14 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +176 -33 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.13 date: 2001/02/21 05:20:51; author: bobdean; state: Exp; lines: +4 -1 audio.c: dbmix_open() now clears the local and channel pause flag. If dbmix_open() is called, then the user either hit next, prev, or double clicked on a song. This is now interpreted as a "play now" command, thus pause is cleared. ---------------------------- revision 1.12 date: 2001/02/13 03:27:17; author: bobdean; state: Exp; lines: +54 -151 audio.c: removed code that forced xmms_session_id to be 0 the message handler now only unpauses xmms if it is paused. ---------------------------- revision 1.11 date: 2001/02/05 06:44:16; author: bobdean; state: Exp; lines: +50 -2 Added a message handler thread that checks for new messages 20 times a second while xmms is stopped. ---------------------------- revision 1.10 date: 2000/12/18 07:44:04; author: bobdean; state: Exp; lines: +11 -2 audio.c: added support for DBMSG_REWIND and DBMSG_FFORWARD to the message callback function used by the xmms output plugin ---------------------------- revision 1.9 date: 2000/12/03 23:50:02; author: bobdean; state: Exp; lines: +16 -6 audio.c: fixed audio corruption problem. It was caused by the value of the device_buffer_used variable being set to 1, thus shifting all audio samples by 1 byte. Also added call to Handle_Message_Queue() to the write loop so that messages are constantly checked for. ---------------------------- revision 1.8 date: 2000/12/02 22:53:44; author: bobdean; state: Exp; lines: +24 -2 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.7 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +0 -2 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.6 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +22 -2 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.5 date: 2000/11/19 01:18:16; author: bobdean; state: Exp; lines: +10 -3 All files: added support for dbaudiolib message handler callback function The function is in auido.c and named dbmix_message_handler ---------------------------- revision 1.4 date: 2000/11/12 07:18:05; author: bobdean; state: Exp; lines: +27 -0 audio.c: Removed remainder of if(realtime) and if(!realtime) statements. These were in the original OSS output code that this plugin was based on. They were causing audio corruption. ---------------------------- revision 1.3 date: 2000/09/12 05:55:01; author: bobdean; state: Exp; lines: +24 -29 audio.c: removed dependency on xmms !realtiem priority. Makefile.am: removed monitor.c The monitor thread functionality is/will be implemented with gtk timeout and idle functions. All files: cleaned up warnings. ---------------------------- revision 1.2 date: 2000/09/10 19:40:03; author: bobdean; state: Exp; lines: +9 -103 audio.c: fixed static output caused be pressing cue button. Source of the problem was the if(!realtime_priority) statement in the pause function. The if() has been removed since it was unnecessary. ---------------------------- revision 1.1 date: 2000/07/10 01:04:43; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:43; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/configure.c,v Working file: xmms_plugin/configure.c head: 1.12 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 13; selected revisions: 13 description: ---------------------------- revision 1.12 date: 2002/02/17 23:17:15; author: bobdean; state: Exp; lines: +30 -2 The user now has the ablity to enable the use of the prebuffer, or to use a more "realtime" output method. The prebuffer ablitiy was kept becuase slower systems may skip without it. ---------------------------- revision 1.11 date: 2002/01/01 00:18:23; author: bobdean; state: Exp; lines: +2 -4 Fixed all compile warnings in xmms output plugin. ---------------------------- revision 1.10 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.9 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +2 -2 blah. ---------------------------- revision 1.8 date: 2001/03/06 06:22:47; author: bobdean; state: Exp; lines: +8 -4 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.7 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +12 -0 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.6 date: 2001/02/13 03:27:17; author: bobdean; state: Exp; lines: +16 -23 audio.c: removed code that forced xmms_session_id to be 0 the message handler now only unpauses xmms if it is paused. ---------------------------- revision 1.5 date: 2000/11/23 06:21:44; author: bobdean; state: Exp; lines: +3 -20 gerneral commit. Fixed some issues with IPC communication and added the new terminatorX audiodevice.cc file. ---------------------------- revision 1.4 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +26 -6 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.3 date: 2000/09/12 05:55:01; author: bobdean; state: Exp; lines: +7 -8 audio.c: removed dependency on xmms !realtiem priority. Makefile.am: removed monitor.c The monitor thread functionality is/will be implemented with gtk timeout and idle functions. All files: cleaned up warnings. ---------------------------- revision 1.2 date: 2000/07/16 02:05:06; author: bobdean; state: Exp; lines: +11 -4 configure.c: added code to strip the " - %d" from the channel name before it is displayed in the preferences dialog. This is because the channel number is handled by dbmix. init.c: each call to read from the xmms config file is now handled by its on if statement. This way, no option is dependent upon the precence of another. ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/dbmix.c,v Working file: xmms_plugin/dbmix.c head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2002/02/17 20:05:24; author: bobdean; state: Exp; lines: +1 -1 Fixed error in dbmix_write function. The written variable was not being updated, causing no vizualization output. ---------------------------- revision 1.4 date: 2001/03/06 06:22:47; author: bobdean; state: Exp; lines: +1 -1 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.3 date: 2000/12/03 23:50:02; author: bobdean; state: Exp; lines: +1 -1 audio.c: fixed audio corruption problem. It was caused by the value of the device_buffer_used variable being set to 1, thus shifting all audio samples by 1 byte. Also added call to Handle_Message_Queue() to the write loop so that messages are constantly checked for. ---------------------------- revision 1.2 date: 2000/07/16 00:36:06; author: bobdean; state: Exp; lines: +1 -1 If "Close channel for each song" is enabled, xmms may hang. Option has been disabled. ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/dbmixout.h,v Working file: xmms_plugin/dbmixout.h head: 1.11 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 12; selected revisions: 12 description: ---------------------------- revision 1.11 date: 2002/02/17 23:17:15; author: bobdean; state: Exp; lines: +1 -0 The user now has the ablity to enable the use of the prebuffer, or to use a more "realtime" output method. The prebuffer ablitiy was kept becuase slower systems may skip without it. ---------------------------- revision 1.10 date: 2002/01/01 00:18:23; author: bobdean; state: Exp; lines: +1 -1 Fixed all compile warnings in xmms output plugin. ---------------------------- revision 1.9 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.8 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +1 -1 blah. ---------------------------- revision 1.7 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +2 -0 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.6 date: 2001/02/05 06:44:16; author: bobdean; state: Exp; lines: +1 -0 Added a message handler thread that checks for new messages 20 times a second while xmms is stopped. ---------------------------- revision 1.5 date: 2000/12/18 07:44:04; author: bobdean; state: Exp; lines: +1 -1 audio.c: added support for DBMSG_REWIND and DBMSG_FFORWARD to the message callback function used by the xmms output plugin ---------------------------- revision 1.4 date: 2000/12/03 23:50:02; author: bobdean; state: Exp; lines: +1 -1 audio.c: fixed audio corruption problem. It was caused by the value of the device_buffer_used variable being set to 1, thus shifting all audio samples by 1 byte. Also added call to Handle_Message_Queue() to the write loop so that messages are constantly checked for. ---------------------------- revision 1.3 date: 2000/12/02 22:53:44; author: bobdean; state: Exp; lines: +2 -0 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.2 date: 2000/11/19 01:18:16; author: bobdean; state: Exp; lines: +2 -0 All files: added support for dbaudiolib message handler callback function The function is in auido.c and named dbmix_message_handler ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/debug.c,v Working file: xmms_plugin/debug.c head: 1.3 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.3 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.2 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +1 -1 blah. ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/Attic/init.bak.c,v Working file: xmms_plugin/init.bak.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:39:58; author: bobdean; state: dead; lines: +0 -0 CVS tree cleanup, removing unnecessary files and files that are specific to my platform. ---------------------------- revision 1.1 date: 2000/07/10 01:04:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/init.c,v Working file: xmms_plugin/init.c head: 1.17 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 18; selected revisions: 18 description: ---------------------------- revision 1.17 date: 2002/02/17 23:17:15; author: bobdean; state: Exp; lines: +7 -0 The user now has the ablity to enable the use of the prebuffer, or to use a more "realtime" output method. The prebuffer ablitiy was kept becuase slower systems may skip without it. ---------------------------- revision 1.16 date: 2002/01/01 00:18:23; author: bobdean; state: Exp; lines: +14 -6 Fixed all compile warnings in xmms output plugin. ---------------------------- revision 1.15 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.14 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +4 -2 blah. ---------------------------- revision 1.13 date: 2001/03/06 06:22:47; author: bobdean; state: Exp; lines: +2 -9 xmms_plugin: replaced all debugging printf's with Debug calls dbmixer: autofade speed is now in seconds. ---------------------------- revision 1.12 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +23 -2 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.11 date: 2001/02/13 03:27:17; author: bobdean; state: Exp; lines: +3 -1 audio.c: removed code that forced xmms_session_id to be 0 the message handler now only unpauses xmms if it is paused. ---------------------------- revision 1.10 date: 2001/02/05 06:44:16; author: bobdean; state: Exp; lines: +6 -1 Added a message handler thread that checks for new messages 20 times a second while xmms is stopped. ---------------------------- revision 1.9 date: 2000/12/19 07:24:13; author: bobdean; state: Exp; lines: +83 -31 init.c: added detection of xmms session id value using the ctime for each xmms file in /tmp ---------------------------- revision 1.8 date: 2000/12/02 22:53:44; author: bobdean; state: Exp; lines: +2 -2 Added cue_enabled flag to sysdata struct, and updated dbfsd and dbmixer to use this flag as opposed to the hack using the channel flags on channel 0, which can be changed by the user. ---------------------------- revision 1.7 date: 2000/11/22 20:49:43; author: bobdean; state: Exp; lines: +3 -1 Changed method of setting the message handler function. To use the message handling callback feature, it must be specifically enabled with a call to DBAudio_Set_Message_Handler(). Message_Handler now also accepts an OR'd int of message flags representing the message types you wish to be sent to the callback. ---------------------------- revision 1.6 date: 2000/11/19 08:56:13; author: bobdean; state: Exp; lines: +11 -18 Added left/right channel balance. The balance is controlled using dbmixer. ---------------------------- revision 1.5 date: 2000/11/19 01:18:16; author: bobdean; state: Exp; lines: +1 -1 All files: added support for dbaudiolib message handler callback function The function is in auido.c and named dbmix_message_handler ---------------------------- revision 1.4 date: 2000/07/16 02:05:06; author: bobdean; state: Exp; lines: +26 -5 configure.c: added code to strip the " - %d" from the channel name before it is displayed in the preferences dialog. This is because the channel number is handled by dbmix. init.c: each call to read from the xmms config file is now handled by its on if statement. This way, no option is dependent upon the precence of another. ---------------------------- revision 1.3 date: 2000/07/16 00:50:44; author: bobdean; state: Exp; lines: +12 -6 init.c: now only reads in data from the xmms config file if the data actually exists. (whoops.) Now corruption cannot occur and xmms will not hang. ---------------------------- revision 1.2 date: 2000/07/16 00:36:06; author: bobdean; state: Exp; lines: +4 -0 If "Close channel for each song" is enabled, xmms may hang. Option has been disabled. ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/mixer.c,v Working file: xmms_plugin/mixer.c head: 1.5 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.5 date: 2001/03/18 01:19:18; author: bobdean; state: Exp; lines: +1 -1 massive commit to catch anything I missed. ---------------------------- revision 1.4 date: 2001/03/17 20:04:15; author: bobdean; state: Exp; lines: +2 -2 blah. ---------------------------- revision 1.3 date: 2001/03/04 20:49:32; author: bobdean; state: Exp; lines: +10 -0 - The message handler thread is now implemented as a gtk_timeout - The plugin is now statically linked against dbaudiolib. To enable linking against the dynamic library, define DBMIX_DYNAMIC_LIBRARY - The size of the internal buffer is now guaranteed to be a multiple of the amount of data written to dbaudiolib. Current size is hardcoded to be 1/4th of a second of data. ---------------------------- revision 1.2 date: 2000/09/12 05:55:01; author: bobdean; state: Exp; lines: +0 -2 audio.c: removed dependency on xmms !realtiem priority. Makefile.am: removed monitor.c The monitor thread functionality is/will be implemented with gtk timeout and idle functions. All files: cleaned up warnings. ---------------------------- revision 1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:44; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/plugin.old.h,v Working file: xmms_plugin/plugin.old.h head: 1.1 branch: 1.1.1 locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.1 date: 2000/07/10 01:04:45; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:45; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/about.P,v Working file: xmms_plugin/.deps/about.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:49; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:49; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/audio.P,v Working file: xmms_plugin/.deps/audio.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:50; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:50; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/configure.P,v Working file: xmms_plugin/.deps/configure.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:50; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:50; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/dbmix.P,v Working file: xmms_plugin/.deps/dbmix.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:47; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:47; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/debug.P,v Working file: xmms_plugin/.deps/debug.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/init.P,v Working file: xmms_plugin/.deps/init.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:51; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:51; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/.deps/Attic/mixer.P,v Working file: xmms_plugin/.deps/mixer.P head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2000/07/14 23:11:16; author: bobdean; state: dead; lines: +0 -0 channel.h: added clipping flag to dbfsd_data fsadders.c: if clipping occurs, fsadders now sets the clipping flag dbfsd and dbaudiolib: added "-" separator to channel names ---------------------------- revision 1.1 date: 2000/07/10 01:04:48; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:48; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/backup/Attic/audio.bak2.c,v Working file: xmms_plugin/backup/audio.bak2.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:45:48; author: bobdean; state: dead; lines: +0 -0 Removed directory that should not have been in cvs. ---------------------------- revision 1.1 date: 2000/07/10 01:04:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/backup/Attic/audio.bak3.c,v Working file: xmms_plugin/backup/audio.bak3.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:45:48; author: bobdean; state: dead; lines: +0 -0 Removed directory that should not have been in cvs. ---------------------------- revision 1.1 date: 2000/07/10 01:04:52; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:52; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/backup/Attic/audio.c,v Working file: xmms_plugin/backup/audio.c head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:45:48; author: bobdean; state: dead; lines: +0 -0 Removed directory that should not have been in cvs. ---------------------------- revision 1.1 date: 2000/07/10 01:04:53; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:53; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= RCS file: /cvsroot/dbmix/DBMix-cvs/xmms_plugin/backup/Attic/audio.lo,v Working file: xmms_plugin/backup/audio.lo head: 1.2 branch: locks: strict access list: symbolic names: start: 1.1.1.1 vendor: 1.1.1 keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.2 date: 2001/02/23 03:45:48; author: bobdean; state: dead; lines: +0 -0 Removed directory that should not have been in cvs. ---------------------------- revision 1.1 date: 2000/07/10 01:04:54; author: bobdean; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2000/07/10 01:04:54; author: bobdean; state: Exp; lines: +0 -0 Initial commit of DBMix version 0.9.6 ============================================================================= DBMix-0.9.8/INSTALL0000644000076400007640000002004207436300714007217 Required Packages ================= gtk/glib 1.2+ OSS based sound system (default on all *nix platforms) xmms-devel package from xmms.org <-- otherwise the xmms plugin will not build or install Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. If you have not installed dbmix before, cd to the dbaudiolib directory and type 'make install' then cd back to the top level dbmix directory. 3. Type `make' to compile the package. 4. Optionally, type `make check' to run any self-tests that come with the package. 5. Type `make install' to install the programs and any data files and documentation. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. DBMix-0.9.8/Makefile.am0000644000076400007640000000017707436306424010235 SUBDIRS = include dbaudiolib dbfsd_src xmms_plugin dbmixer dbplaylist EXTRA_DIST = Readme.cueing Readme.devel Readme.exmixer DBMix-0.9.8/NEWS0000644000076400007640000000000007346372413006662 DBMix-0.9.8/acconfig.h0000755000076400007640000000000007346372413010110 DBMix-0.9.8/aclocal.m40000755000076400007640000011747407436306434010056 dnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # serial 40 AC_PROG_LIBTOOL AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # Save cache, so that ltconfig can load it AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig AC_CACHE_LOAD # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log ]) AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl case "$target" in NONE) lt_target="$host" ;; *) lt_target="$target" ;; esac # Check for any special flags to pass to ltconfig. # # the following will cause an existing older ltconfig to fail, so # we ignore this at the expense of the cache file... Checking this # will just take longer ... bummer! #libtool_flags="--cache-file=$cache_file" # test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], [libtool_flags="$libtool_flags --enable-dlopen"]) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [libtool_flags="$libtool_flags --enable-win32-dll"]) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_SHARED, [dnl define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_STATIC, [dnl define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. changequote(,)dnl [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_PROG_LD_GNU ]) AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$lt_target" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the # configure arguments. Note that LIBLTDL and INCLTDL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" INCLTDL= fi ]) dnl old names AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl dnl This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL])dnl # Configure paths for GLIB # Owen Taylor 97-11-3 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or dnl gthread is specified in MODULES, pass to glib-config dnl AC_DEFUN(AM_PATH_GLIB, [dnl dnl Get the cflags and libraries from the glib-config script dnl AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], glib_config_prefix="$withval", glib_config_prefix="") AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], glib_config_exec_prefix="$withval", glib_config_exec_prefix="") AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], , enable_glibtest=yes) if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . $4 do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done AC_PATH_PROG(GLIB_CONFIG, glib-config, no) min_glib_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of glib-config to some extent dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) rm -f conf.glibtest ]) # Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN(AM_PATH_GTK, [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) # CFLAGS and library paths for XMMS # written 15 December 1999 by Ben Gertzfield dnl Usage: dnl AM_PATH_XMMS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl dnl Example: dnl AM_PATH_XMMS(0.9.5.1, , AC_MSG_ERROR([*** XMMS >= 0.9.5.1 not installed - please install first ***])) dnl dnl Defines XMMS_CFLAGS, XMMS_LIBS, XMMS_DATA_DIR, XMMS_PLUGIN_DIR, dnl XMMS_VISUALIZATION_PLUGIN_DIR, XMMS_INPUT_PLUGIN_DIR, dnl XMMS_OUTPUT_PLUGIN_DIR, XMMS_GENERAL_PLUGIN_DIR, XMMS_EFFECT_PLUGIN_DIR, dnl and XMMS_VERSION for your plugin pleasure. dnl dnl XMMS_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]]) AC_DEFUN(XMMS_TEST_VERSION, [ # Determine which version number is greater. Prints 2 to stdout if # the second number is greater, 1 if the first number is greater, # 0 if the numbers are equal. # Written 15 December 1999 by Ben Gertzfield # Revised 15 December 1999 by Jim Monty AC_PROG_AWK xmms_got_version=[` $AWK ' \ BEGIN { \ print vercmp(ARGV[1], ARGV[2]); \ } \ \ function vercmp(ver1, ver2, ver1arr, ver2arr, \ ver1len, ver2len, \ ver1int, ver2int, len, i, p) { \ \ ver1len = split(ver1, ver1arr, /\./); \ ver2len = split(ver2, ver2arr, /\./); \ \ len = ver1len > ver2len ? ver1len : ver2len; \ \ for (i = 1; i <= len; i++) { \ p = 1000 ^ (len - i); \ ver1int += ver1arr[i] * p; \ ver2int += ver2arr[i] * p; \ } \ \ if (ver1int < ver2int) \ return 2; \ else if (ver1int > ver2int) \ return 1; \ else \ return 0; \ }' $1 $2`] if test $xmms_got_version -eq 2; then # failure ifelse([$4], , :, $4) else # success! ifelse([$3], , :, $3) fi ]) AC_DEFUN(AM_PATH_XMMS, [ AC_ARG_WITH(xmms-prefix,[ --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)], xmms_config_prefix="$withval", xmms_config_prefix="") AC_ARG_WITH(xmms-exec-prefix,[ --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)], xmms_config_exec_prefix="$withval", xmms_config_exec_prefix="") if test x$xmms_config_exec_prefix != x; then xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix" if test x${XMMS_CONFIG+set} != xset; then XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config fi fi if test x$xmms_config_prefix != x; then xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix" if test x${XMMS_CONFIG+set} != xset; then XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config fi fi AC_PATH_PROG(XMMS_CONFIG, xmms-config, no) min_xmms_version=ifelse([$1], ,0.9.5.1, $1) if test "$XMMS_CONFIG" = "no"; then no_xmms=yes else XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags` XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs` XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version` XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir` XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir` XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \ --visualization-plugin-dir` XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir` XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir` XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir` XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir` XMMS_TEST_VERSION($XMMS_VERSION, $min_xmms_version, ,no_xmms=version) fi AC_MSG_CHECKING(for XMMS - version >= $min_xmms_version) if test "x$no_xmms" = x; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$XMMS_CONFIG" = "no" ; then echo "*** The xmms-config script installed by XMMS could not be found." echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XMMS_CONFIG environment variable to the" echo "*** full path to xmms-config." else if test "$no_xmms" = "version"; then echo "*** An old version of XMMS, $XMMS_VERSION, was found." echo "*** You need a version of XMMS newer than $min_xmms_version." echo "*** The latest version of XMMS is always available from" echo "*** http://www.xmms.org/" echo "***" echo "*** If you have already installed a sufficiently new version, this error" echo "*** probably means that the wrong copy of the xmms-config shell script is" echo "*** being found. The easiest way to fix this is to remove the old version" echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the" echo "*** correct copy of xmms-config. (In this case, you will have to" echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf" echo "*** so that the correct libraries are found at run-time)" fi fi XMMS_CFLAGS="" XMMS_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(XMMS_CFLAGS) AC_SUBST(XMMS_LIBS) AC_SUBST(XMMS_VERSION) AC_SUBST(XMMS_DATA_DIR) AC_SUBST(XMMS_PLUGIN_DIR) AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR) AC_SUBST(XMMS_INPUT_PLUGIN_DIR) AC_SUBST(XMMS_OUTPUT_PLUGIN_DIR) AC_SUBST(XMMS_GENERAL_PLUGIN_DIR) AC_SUBST(XMMS_EFFECT_PLUGIN_DIR) ]) DBMix-0.9.8/config.guess0000755000076400007640000010047507436306433010523 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. # # This file 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then CC_FOR_BUILD="$HOST_CC" else if test x"$CC" != x; then CC_FOR_BUILD="$CC" else CC_FOR_BUILD=cc fi fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-cbm ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in *ia64) echo "${UNAME_MACHINE}-unknown-linux" exit 0 ;; i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; elf_i?86) echo "${UNAME_MACHINE}-pc-linux" exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32arm*) echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" exit 0 ;; armelf_linux*) echo "${UNAME_MACHINE}-unknown-linux-gnu" exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32ppc | elf32ppclinux) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unkown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif #ifdef __MIPSEL__ printf ("%sel-unknown-linux-gnu\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy elif test "${UNAME_MACHINE}" = "s390"; then echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-W:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 DBMix-0.9.8/config.h.in0000644000076400007640000000066107346372417010227 /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you have the FunkyMusic.so library (-lFunkyMusic.so). */ #undef HAVE_LIBFUNKYMUSIC_SO /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION DBMix-0.9.8/config.sub0000755000076400007640000006123307436306433010164 #! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. # # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[34567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ | bs2000-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; i386-go32 | go32) basic_machine=i386-unknown os=-go32 ;; i386-mingw32 | mingw32) basic_machine=i386-unknown os=-mingw32 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-unknown os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc | sparcv9) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i[34567]86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -*MiNT) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -*MiNT) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os DBMix-0.9.8/configure0000755000076400007640000030210107436306434010101 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-shared[=PKGS] build shared libraries [default=yes]" ac_help="$ac_help --enable-static[=PKGS] build static libraries [default=yes]" ac_help="$ac_help --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help --with-glib-prefix=PFX Prefix where GLIB is installed (optional)" ac_help="$ac_help --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)" ac_help="$ac_help --disable-glibtest Do not try to compile and run a test GLIB program" ac_help="$ac_help --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" ac_help="$ac_help --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" ac_help="$ac_help --disable-gtktest Do not try to compile and run a test GTK program" ac_help="$ac_help --with-xmms-prefix=PFX Prefix where XMMS is installed (optional)" ac_help="$ac_help --with-xmms-exec-prefix=PFX Exec prefix where XMMS is installed (optional)" ac_help="$ac_help --enable-debug enable dbmix debug options (optional)" ac_help="$ac_help --enable-exmixer enable exmixer support (optional)" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=dbfsd_src/dbfsd.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:591: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:644: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { echo "configure: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" 1>&2; exit 1; } fi test "$2" = conftestfile ) then # Ok. : else { echo "configure: error: newly created file is older than distributed files! Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:701: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=DBMix VERSION=0.9.8 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:747: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo "configure:760: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf echo "$ac_t""found" 1>&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo "configure:773: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake echo "$ac_t""found" 1>&6 else AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo "configure:786: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader echo "$ac_t""found" 1>&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo "configure:799: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo echo "$ac_t""found" 1>&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$ac_t""missing" 1>&6 fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:817: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:847: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:898: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 941 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:977: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 echo "configure:1037: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then echo "$ac_t""yes" 1>&6 ISC=yes # If later tests want to check for ISC. cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF if test "$GCC" = yes; then CC="$CC -posix" else CC="$CC -Xp" fi else echo "$ac_t""no" 1>&6 ISC= fi # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac else enable_fast_install=yes fi # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:1133: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 echo "configure:1154: checking build system type" >&5 build_alias=$build case "$build_alias" in NONE) case $nonopt in NONE) build_alias=$host_alias ;; *) build_alias=$nonopt ;; esac ;; esac build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1174: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 echo "configure:1213: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 echo "configure:1237: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "configure:1240: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$ac_cv_path_LD" if test -n "$LD"; then echo "$ac_t""$LD" 1>&6 else echo "$ac_t""no" 1>&6 fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 echo "configure:1275: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 echo "configure:1291: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi fi NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:1327: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi case "$target" in NONE) lt_target="$host" ;; *) lt_target="$target" ;; esac # Check for any special flags to pass to ltconfig. # # the following will cause an existing older ltconfig to fail, so # we ignore this at the expense of the cache file... Checking this # will just take longer ... bummer! #libtool_flags="--cache-file=$cache_file" # test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" : fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '#line 1381 "configure"' > conftest.$ac_ext if { (eval echo configure:1382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 echo "configure:1403: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* lt_cv_cc_needs_belf=no fi rm -f conftest* fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac # Save cache, so that ltconfig can load it cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1538: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1618: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 echo "configure:1724: checking for pthread.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: *** POSIX thread support not installed - please install first ***" 1>&2; exit 1; } fi # Check whether --with-glib-prefix or --without-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then withval="$with_glib_prefix" glib_config_prefix="$withval" else glib_config_prefix="" fi # Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given. if test "${with_glib_exec_prefix+set}" = set; then withval="$with_glib_exec_prefix" glib_config_exec_prefix="$withval" else glib_config_exec_prefix="" fi # Check whether --enable-glibtest or --disable-glibtest was given. if test "${enable_glibtest+set}" = set; then enableval="$enable_glibtest" : else enable_glibtest=yes fi if test x$glib_config_exec_prefix != x ; then glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config fi fi if test x$glib_config_prefix != x ; then glib_config_args="$glib_config_args --prefix=$glib_config_prefix" if test x${GLIB_CONFIG+set} != xset ; then GLIB_CONFIG=$glib_config_prefix/bin/glib-config fi fi for module in . do case "$module" in gmodule) glib_config_args="$glib_config_args gmodule" ;; gthread) glib_config_args="$glib_config_args gthread" ;; esac done # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1810: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GLIB_CONFIG" in /*) ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no" ;; esac fi GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG" if test -n "$GLIB_CONFIG"; then echo "$ac_t""$GLIB_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 echo "configure:1845: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes else GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If glib-config was correct, then it is best\n"); printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the glib-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); printf("*** correct copy of glib-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } EOF if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* no_glib=yes fi rm -fr conftest* fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 if test "$GLIB_CONFIG" = "no" ; then echo "*** The glib-config script installed by GLIB could not be found" echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GLIB_CONFIG environment variable to the" echo "*** full path to glib-config." else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < #include int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB was incorrectly installed" echo "*** or that you have moved GLIB since it was installed. In the latter case, you" echo "*** may want to edit the glib-config script: $GLIB_CONFIG" fi rm -f conftest* CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" { echo "configure: error: *** GLIB >= 1.2.2 not installed - please install first ***" 1>&2; exit 1; } fi rm -f conf.glibtest # Check whether --with-gtk-prefix or --without-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval="$with_gtk_prefix" gtk_config_prefix="$withval" else gtk_config_prefix="" fi # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then withval="$with_gtk_exec_prefix" gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval="$enable_gtktest" : else enable_gtktest=yes fi for module in . gthread do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:2076: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GTK_CONFIG" in /*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG="$ac_cv_path_GTK_CONFIG" if test -n "$GTK_CONFIG"; then echo "$ac_t""$GTK_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi min_gtk_version=1.2.0 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 echo "configure:2111: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } EOF if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* no_gtk=yes fi rm -fr conftest* fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < #include int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f conftest* CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" { echo "configure: error: *** GTK+ >= 1.2.2 not installed - please install first ***" 1>&2; exit 1; } fi rm -f conf.gtktest # Check whether --with-xmms-prefix or --without-xmms-prefix was given. if test "${with_xmms_prefix+set}" = set; then withval="$with_xmms_prefix" xmms_config_prefix="$withval" else xmms_config_prefix="" fi # Check whether --with-xmms-exec-prefix or --without-xmms-exec-prefix was given. if test "${with_xmms_exec_prefix+set}" = set; then withval="$with_xmms_exec_prefix" xmms_config_exec_prefix="$withval" else xmms_config_exec_prefix="" fi if test x$xmms_config_exec_prefix != x; then xmms_config_args="$xmms_config_args --exec-prefix=$xmms_config_exec_prefix" if test x${XMMS_CONFIG+set} != xset; then XMMS_CONFIG=$xmms_config_exec_prefix/bin/xmms-config fi fi if test x$xmms_config_prefix != x; then xmms_config_args="$xmms_config_args --prefix=$xmms_config_prefix" if test x${XMMS_CONFIG+set} != xset; then XMMS_CONFIG=$xmms_config_prefix/bin/xmms-config fi fi # Extract the first word of "xmms-config", so it can be a program name with args. set dummy xmms-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:2329: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XMMS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XMMS_CONFIG" in /*) ac_cv_path_XMMS_CONFIG="$XMMS_CONFIG" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_XMMS_CONFIG="$XMMS_CONFIG" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_XMMS_CONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XMMS_CONFIG" && ac_cv_path_XMMS_CONFIG="no" ;; esac fi XMMS_CONFIG="$ac_cv_path_XMMS_CONFIG" if test -n "$XMMS_CONFIG"; then echo "$ac_t""$XMMS_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi min_xmms_version=1.2.0 if test "$XMMS_CONFIG" = "no"; then no_xmms=yes else XMMS_CFLAGS=`$XMMS_CONFIG $xmms_config_args --cflags` XMMS_LIBS=`$XMMS_CONFIG $xmms_config_args --libs` XMMS_VERSION=`$XMMS_CONFIG $xmms_config_args --version` XMMS_DATA_DIR=`$XMMS_CONFIG $xmms_config_args --data-dir` XMMS_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --plugin-dir` XMMS_VISUALIZATION_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args \ --visualization-plugin-dir` XMMS_INPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --input-plugin-dir` XMMS_OUTPUT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --output-plugin-dir` XMMS_EFFECT_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --effect-plugin-dir` XMMS_GENERAL_PLUGIN_DIR=`$XMMS_CONFIG $xmms_config_args --general-plugin-dir` # Determine which version number is greater. Prints 2 to stdout if # the second number is greater, 1 if the first number is greater, # 0 if the numbers are equal. # Written 15 December 1999 by Ben Gertzfield # Revised 15 December 1999 by Jim Monty for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:2393: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AWK="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi AWK="$ac_cv_prog_AWK" if test -n "$AWK"; then echo "$ac_t""$AWK" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$AWK" && break done xmms_got_version=` $AWK ' \ BEGIN { \ print vercmp(ARGV[1], ARGV[2]); \ } \ \ function vercmp(ver1, ver2, ver1arr, ver2arr, \ ver1len, ver2len, \ ver1int, ver2int, len, i, p) { \ \ ver1len = split(ver1, ver1arr, /\./); \ ver2len = split(ver2, ver2arr, /\./); \ \ len = ver1len > ver2len ? ver1len : ver2len; \ \ for (i = 1; i <= len; i++) { \ p = 1000 ^ (len - i); \ ver1int += ver1arr[i] * p; \ ver2int += ver2arr[i] * p; \ } \ \ if (ver1int < ver2int) \ return 2; \ else if (ver1int > ver2int) \ return 1; \ else \ return 0; \ }' $XMMS_VERSION $min_xmms_version` if test $xmms_got_version -eq 2; then # failure no_xmms=version else # success! : fi fi echo $ac_n "checking for XMMS - version >= $min_xmms_version""... $ac_c" 1>&6 echo "configure:2459: checking for XMMS - version >= $min_xmms_version" >&5 if test "x$no_xmms" = x; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 if test "$XMMS_CONFIG" = "no" ; then echo "*** The xmms-config script installed by XMMS could not be found." echo "*** If XMMS was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XMMS_CONFIG environment variable to the" echo "*** full path to xmms-config." else if test "$no_xmms" = "version"; then echo "*** An old version of XMMS, $XMMS_VERSION, was found." echo "*** You need a version of XMMS newer than $min_xmms_version." echo "*** The latest version of XMMS is always available from" echo "*** http://www.xmms.org/" echo "***" echo "*** If you have already installed a sufficiently new version, this error" echo "*** probably means that the wrong copy of the xmms-config shell script is" echo "*** being found. The easiest way to fix this is to remove the old version" echo "*** of XMMS, but you can also set the XMMS_CONFIG environment to point to the" echo "*** correct copy of xmms-config. (In this case, you will have to" echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf" echo "*** so that the correct libraries are found at run-time)" fi fi XMMS_CFLAGS="" XMMS_LIBS="" { echo "configure: error: *** XMMS >= 1.2.0 not installed - please install first ***" 1>&2; exit 1; } fi echo "" echo $ac_n "checking for white_boys in -lFunkyMusic.so""... $ac_c" 1>&6 echo "configure:2510: checking for white_boys in -lFunkyMusic.so" >&5 ac_lib_var=`echo FunkyMusic.so'_'white_boys | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lFunkyMusic.so $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo FunkyMusic.so | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "Warning: You may not have enough white boys to play your funky music. Please obtain additional funky white boys." fi echo "" # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" : else debug_enable=yes fi if test "x$debug_enable" = "x$yes" then DBMIX_DEBUG="-DDBMIX_DEBUG -g -Wall" else DBMIX_DEBUG= fi # Check whether --enable-exmixer or --disable-exmixer was given. if test "${enable_exmixer+set}" = set; then enableval="$enable_exmixer" : else exmixer_enable=yes fi if test "x$exmixer_enable" = "x$yes" then EXMIXER_FLAGS="-DEXT_MIXER" else EXMIXER_FLAGS= fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " Makefile include/Makefile dbaudiolib/Makefile dbfsd_src/Makefile xmms_plugin/Makefile dbmixer/Makefile terminatorX/Makefile dbplaylist/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@build@%$build%g s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@RANLIB@%$RANLIB%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@CPP@%$CPP%g s%@GLIB_CONFIG@%$GLIB_CONFIG%g s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g s%@GLIB_LIBS@%$GLIB_LIBS%g s%@GTK_CONFIG@%$GTK_CONFIG%g s%@GTK_CFLAGS@%$GTK_CFLAGS%g s%@GTK_LIBS@%$GTK_LIBS%g s%@XMMS_CONFIG@%$XMMS_CONFIG%g s%@AWK@%$AWK%g s%@XMMS_CFLAGS@%$XMMS_CFLAGS%g s%@XMMS_LIBS@%$XMMS_LIBS%g s%@XMMS_VERSION@%$XMMS_VERSION%g s%@XMMS_DATA_DIR@%$XMMS_DATA_DIR%g s%@XMMS_PLUGIN_DIR@%$XMMS_PLUGIN_DIR%g s%@XMMS_VISUALIZATION_PLUGIN_DIR@%$XMMS_VISUALIZATION_PLUGIN_DIR%g s%@XMMS_INPUT_PLUGIN_DIR@%$XMMS_INPUT_PLUGIN_DIR%g s%@XMMS_OUTPUT_PLUGIN_DIR@%$XMMS_OUTPUT_PLUGIN_DIR%g s%@XMMS_GENERAL_PLUGIN_DIR@%$XMMS_GENERAL_PLUGIN_DIR%g s%@XMMS_EFFECT_PLUGIN_DIR@%$XMMS_EFFECT_PLUGIN_DIR%g s%@DBMIX_DEBUG@%$DBMIX_DEBUG%g s%@EXMIXER_FLAGS@%$EXMIXER_FLAGS%g s%@VISUALIZATION_PLUGIN_DIR@%$VISUALIZATION_PLUGIN_DIR%g s%@GENERAL_PLUGIN_DIR@%$GENERAL_PLUGIN_DIR%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 echo "" echo "=============================" echo "DBMix Configure Options:" echo "" echo "xmms output plugin directory: $XMMS_OUTPUT_PLUGIN_DIR" if test "x$exmixer_enable" = "x$yes" then echo "exmixer support ... ON" else echo "exmixer support ... OFF" fi if test "x$debug_enable" = "x$yes" then echo "debug options ... ON" else echo "debug options ... OFF" fi echo "" echo "=============================" echo "" echo "********************************************************************" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " Please read the README file to learn how to use dbmix. Please make sure your LD_LIBRARY_PATH contains the installation path for dbaudiolib, otherwise you will receive the following error at runtime: libdbaudiolib.so.0: cannot open shared object file: No such file or directory This path will most probably be /usr/local/lib, or /usr/lib. If you have not installed dbmix before, you may get the following error during the make process: gcc -O2 -o dbcat -L/usr/lib -L/usr/X11R6/lib -lgtk ... etc ... /usr/bin/ld: cannot find -ldbaudiolib collect2: ld returned 1 exit status make2: *** dbcat Error 1 make2: Leaving directory `/home/futant/DBMix-0.9.7-2/dbfsd_src' make1: *** all-recursive Error 1 make1: Leaving directory `/home/futant/DBMix-0.9.7-2' make: *** all-recursive-am Error 2 If this error occurs, cd to the dbaudiolib, make install, then cd back to the main dbmix directory and do a global make install for the package. " echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo "********************************************************************" DBMix-0.9.8/configure.in0000644000076400007640000000633007436300531010500 AC_INIT(dbfsd_src/dbfsd.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(DBMix, 0.9.8) AC_PROG_CC AC_ISC_POSIX AM_PROG_LIBTOOL AC_ARG_PROGRAM AC_HEADER_STDC AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***])) AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR([*** GLIB >= 1.2.2 not installed - please install first ***])) AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([*** GTK+ >= 1.2.2 not installed - please install first ***]),gthread) AM_PATH_XMMS(1.2.0,,AC_MSG_ERROR([*** XMMS >= 1.2.0 not installed - please install first ***])) echo "" AC_CHECK_LIB(FunkyMusic.so,white_boys, , [ echo "Warning: You may not have enough white boys to play your funky music. Please obtain additional funky white boys." ]) echo "" AC_ARG_ENABLE(debug,[ --enable-debug enable dbmix debug options (optional)],,debug_enable=yes) if test "x$debug_enable" = "x$yes" then DBMIX_DEBUG="-DDBMIX_DEBUG -g -Wall" else DBMIX_DEBUG= fi AC_SUBST(DBMIX_DEBUG) AC_ARG_ENABLE(exmixer,[ --enable-exmixer enable exmixer support (optional)],,exmixer_enable=yes) if test "x$exmixer_enable" = "x$yes" then EXMIXER_FLAGS="-DEXT_MIXER" else EXMIXER_FLAGS= fi AC_SUBST(EXMIXER_FLAGS) AC_SUBST(VISUALIZATION_PLUGIN_DIR) AC_SUBST(GENERAL_PLUGIN_DIR) AC_OUTPUT([ Makefile include/Makefile dbaudiolib/Makefile dbfsd_src/Makefile xmms_plugin/Makefile dbmixer/Makefile terminatorX/Makefile dbplaylist/Makefile ]) echo "" echo "=============================" echo "DBMix Configure Options:" echo "" echo "xmms output plugin directory: $XMMS_OUTPUT_PLUGIN_DIR" if test "x$exmixer_enable" = "x$yes" then echo "exmixer support ... ON" else echo "exmixer support ... OFF" fi if test "x$debug_enable" = "x$yes" then echo "debug options ... ON" else echo "debug options ... OFF" fi echo "" echo "=============================" echo "" echo "********************************************************************" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " Please read the README file to learn how to use dbmix. Please make sure your LD_LIBRARY_PATH contains the installation path for dbaudiolib, otherwise you will receive the following error at runtime: libdbaudiolib.so.0: cannot open shared object file: No such file or directory This path will most probably be /usr/local/lib, or /usr/lib. If you have not installed dbmix before, you may get the following error during the make process: gcc -O2 -o dbcat -L/usr/lib -L/usr/X11R6/lib -lgtk ... etc ... /usr/bin/ld: cannot find -ldbaudiolib collect2: ld returned 1 exit status make[2]: *** [dbcat] Error 1 make[2]: Leaving directory `/home/futant/DBMix-0.9.7-2/dbfsd_src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/futant/DBMix-0.9.7-2' make: *** [all-recursive-am] Error 2 If this error occurs, cd to the dbaudiolib, make install, then cd back to the main dbmix directory and do a global make install for the package. " echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo " READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS READ" echo "********************************************************************" DBMix-0.9.8/install-sh0000755000076400007640000001273607346372413010212 #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 DBMix-0.9.8/ltconfig0000755000076400007640000027666007436306433007750 #! /bin/sh # ltconfig - Create a system-specific libtool. # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This file 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A lot of this script is taken from autoconf-2.10. # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} echo=echo if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec "$SHELL" "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; *) PATH_SEPARATOR=':' ;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then break fi done fi if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running ltconfig again with it. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf "%s\n"' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # Cool, printf works : elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # The name of this program. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3.5 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." # Global variables: default_ofile=libtool can_build_shared=yes enable_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). enable_static=yes enable_fast_install=yes enable_dlopen=unknown enable_win32_dll=no ltmain= silent= srcdir= ac_config_guess= ac_config_sub= host= nonopt= ofile="$default_ofile" verify_host=yes with_gcc=no with_gnu_ld=no need_locks=yes ac_ext=c objext=o libext=a exeext= cache_file= old_AR="$AR" old_CC="$CC" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" old_LD="$LD" old_LN_S="$LN_S" old_LIBS="$LIBS" old_NM="$NM" old_RANLIB="$RANLIB" old_DLLTOOL="$DLLTOOL" old_OBJDUMP="$OBJDUMP" old_AS="$AS" # Parse the command line options. args= prev= for option do case "$option" in -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then eval "$prev=\$option" prev= continue fi case "$option" in --help) cat <&2 echo "$help" 1>&2 exit 1 ;; *) if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi host="$option" else echo "$progname: too many arguments" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac done if test -z "$ltmain"; then echo "$progname: you must specify a LTMAIN file" 1>&2 echo "$help" 1>&2 exit 1 fi if test ! -f "$ltmain"; then echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi # Quote any args containing shell metacharacters. ltconfig_args= for arg do case "$arg" in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ltconfig_args="$ltconfig_args '$arg'" ;; *) ltconfig_args="$ltconfig_args $arg" ;; esac done # A relevant subset of AC_INIT. # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 5 compiler messages saved in config.log # 6 checking for... messages and results if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>>./config.log # NLS nuisances. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi if test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" . $cache_file fi if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi if test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi trap "$rm conftest*; exit 1" 1 2 15 if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/config.guess; then ac_aux_dir=$ac_dir break fi done if test -z "$ac_aux_dir"; then echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 echo "$help" 1>&2 exit 1 fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 exit 1 fi echo $ac_n "checking host system type""... $ac_c" 1>&6 host_alias=$host case "$host_alias" in "") if host_alias=`$SHELL $ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac host=`$SHELL $ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. test -z "$host" && exit 1 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 echo "$help" 1>&2 exit 1 else host_alias=$host fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case "$host_os" in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` case "$host_os" in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= # Set a sane default for `AR'. test -z "$AR" && AR=ar # Set a sane default for `OBJDUMP'. test -z "$OBJDUMP" && OBJDUMP=objdump # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then RANLIB="ranlib" result="ranlib" break fi done IFS="$save_ifs" echo "$ac_t$result" 1>&6 fi if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$AS" && AS=as # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then CC="gcc" break fi done IFS="$save_ifs" if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi fi # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/cc || test -f $dir/cc$ac_exeext; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue fi CC="cc" break fi done IFS="$save_ifs" if test $cc_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same name, so the bogon will be chosen # first if we set CC to just the name; use the full file name. shift set dummy "$dir/cc" "$@" shift CC="$@" fi fi if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$CC"; then echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 exit 1 fi fi # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 echo "$progname:581: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c echo "$ac_t$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo $ac_n "checking for object suffix... $ac_c" 1>&6 $rm conftest* echo 'int i = 1;' > conftest.c echo "$progname:603: checking for object suffix" >& 5 if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 for ac_file in conftest.*; do case $ac_file in *.c) ;; *) objext=`echo $ac_file | sed -e s/conftest.//` ;; esac done else cat conftest.err 1>&5 echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* echo "$ac_t$objext" 1>&6 echo $ac_n "checking for executable suffix... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_exeext="no" $rm conftest* echo 'main () { return 0; }' > conftest.c echo "$progname:629: checking for executable suffix" >& 5 if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 for ac_file in conftest.*; do case $ac_file in *.c | *.err | *.$objext ) ;; *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;; esac done else cat conftest.err 1>&5 echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* fi if test "X$ac_cv_exeext" = Xno; then exeext="" else exeext="$ac_cv_exeext" fi echo "$ac_t$ac_cv_exeext" 1>&6 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= wl= link_static_flag= no_builtin_flag= if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. link_static_flag="$link_static_flag ${wl}-lC" ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. pic_flag='-m68020 -resident32 -malways-restore-a4' ;; sysv4*MP*) if test -d /usr/nec; then pic_flag=-Kconform_pic fi ;; *) pic_flag='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # All AIX code is PIC. link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10* | hpux11*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' link_static_flag="${wl}-a ${wl}archive" pic_flag='+Z' ;; irix5* | irix6*) wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' ;; sco3.2v5*) pic_flag='-Kpic' link_static_flag='-dn' special_shlib_compile_flags='-belf' ;; solaris*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; sunos4*) pic_flag='-PIC' link_static_flag='-Bstatic' wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; uts4*) pic_flag='-pic' link_static_flag='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then pic_flag='-Kconform_pic' link_static_flag='-Bstatic' fi ;; *) can_build_shared=no ;; esac fi if test -n "$pic_flag"; then echo "$ac_t$pic_flag" 1>&6 # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5 if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 case "$host_os" in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then they # create non-PIC objects. So, if there were any warnings, we assume that # PIC is not supported. if test -s conftest.err; then echo "$ac_t"no 1>&6 can_build_shared=no pic_flag= else echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" fi ;; *) echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" ;; esac else # Append any errors to the config.log. cat conftest.err 1>&5 can_build_shared=no pic_flag= echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else echo "$ac_t"none 1>&6 fi # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 $rm -r conftest 2>/dev/null mkdir conftest cd conftest $rm conftest* echo "int some_variable = 0;" > conftest.c mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" echo "$progname:829: checking if $compiler supports -c -o file.o" >&5 if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then echo "$ac_t"no 1>&6 compiler_c_o=no else echo "$ac_t"yes 1>&6 compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 compiler_c_o=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5 if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_o_lo=no else echo "$ac_t"yes 1>&6 compiler_o_lo=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_o_lo=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$ac_t$hard_links" 1>&6 $rm conftest* if test "$hard_links" = no; then echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 need_locks=warn fi else need_locks=no fi if test "$with_gcc" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_rtti_exceptions=no else echo "$ac_t"yes 1>&6 compiler_rtti_exceptions=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_rtti_exceptions=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : else echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 can_build_shared=no fi fi echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5 if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then echo "$ac_t$link_static_flag" 1>&6 else echo "$ac_t"none 1>&6 link_static_flag= fi LDFLAGS="$save_LDFLAGS" $rm conftest* if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 $rm conftest.dat if ln -s X conftest.dat 2>/dev/null; then $rm conftest.dat LN_S="ln -s" else LN_S=ln fi if test "$LN_S" = "ln -s"; then echo "$ac_t"yes 1>&6 else echo "$ac_t"no 1>&6 fi fi # Make sure LD is an absolute path. if test -z "$LD"; then ac_prog=ld if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 echo "$progname:991: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we are not using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld... $ac_c" 1>&6 echo "$progname:1015: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "$progname:1018: checking for non-GNU ld" >&5 fi if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" fi if test -n "$LD"; then echo "$ac_t$LD" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$LD"; then echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 exit 1 fi fi # Check to see if it really is or is not GNU ld. echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then with_gnu_ld=yes else with_gnu_ld=no fi echo "$ac_t$with_gnu_ld" 1>&6 # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. case "$host_os" in cygwin* | mingw*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$with_gcc" != yes; then with_gnu_ld=no fi ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case "$host_os" in aix3* | aix4*) # On AIX, the GNU linker is very broken ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left by newer dlltools. export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done~ test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' # can we support soname and/or expsyms with a.out? -oliva fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$with_gcc" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4*) hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' hardcode_libdir_separator=':' if test "$with_gcc" = yes; then collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi shared_flag='-shared' else shared_flag='${wl}-bM:SRE' hardcode_direct=yes fi allow_undefined_flag=' ${wl}-berok' archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' case "$host_os" in aix4.[01]|aix4.[01].*) # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on always_export_symbols=yes ;; esac ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs' fix_srcfile_path='`cygpath -w $srcfile`' ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case "$host_os" in hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$with_gcc" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF fi hardcode_libdir_flag_spec='${wl}-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; osf3*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # As osf3* with the addition of the -msym flag if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; rhapsody*) archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flags_spec='-L$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case "$host_os" in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' else archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; unixware7*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 test "$ld_shlibs" = no && can_build_shared=no if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -p" break else NM=${NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$NM" && NM=nm ;; esac echo "$ac_t$NM" 1>&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. case "$host_os" in aix*) symcode='[BCDT]' ;; cygwin* | mingw*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; irix*) symcode='[BCDEGRST]' ;; solaris*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no $rm conftest* cat > conftest.c <&5 if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' cat <> conftest.c #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c cat <<\EOF >> conftest.c {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$objext conftstm.$objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi LIBS="$save_LIBS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else global_symbol_pipe= fi done if test "$pipe_works" = yes; then echo "${ac_t}ok" 1>&6 else echo "${ac_t}failed" 1>&6 fi if test -z "$global_symbol_pipe"; then global_symbol_to_cdecl= fi # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$hardcode_shlibpath_var" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$ac_t$hardcode_action" 1>&6 reload_flag= reload_cmds='$LD$reload_flag -o $output$reload_objs' echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 # PORTME Some linkers may need a different reload flag. reload_flag='-r' echo "$ac_t$reload_flag" 1>&6 test -n "$reload_flag" && reload_flag=" $reload_flag" # PORTME Fill in your ld.so characteristics library_names_spec= libname_spec='lib$name' soname_spec= postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" file_magic_cmd= file_magic_test_file= deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [regex]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4*) version_type=linux # AIX has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. # We preserve .a as extension for shared libraries though AIX4.2 # and later linker supports .so library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' shlibpath_var=LIBPATH deplibs_check_method=pass_all ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH deplibs_check_method=pass_all lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw*) version_type=windows need_version=no need_lib_prefix=no if test "$with_gcc" = yes; then library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' else library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' fi dynamic_linker='Win32 ld.exe' deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' file_magic_cmd='${OBJDUMP} -f' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case "$version_type" in freebsd-elf*) deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) deplibs_check_method=unknown library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case "$host_os" in freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' case "$host_os" in hpux10.20*) # TODO: Does this work for hpux-11 too? deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' file_magic_cmd=/usr/bin/file file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so.$major' library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' case "$host_os" in irix5*) libsuff= shlibsuff= # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case "$LD" in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib${libsuff}/libc.so*` deplibs_check_method='pass_all' ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no deplibs_check_method=pass_all if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' else # Only the GNU ld.so supports shared libraries on MkLinux. case "$host_cpu" in powerpc*) dynamic_linker=no ;; *) dynamic_linker='Linux ld.so' ;; esac fi ;; netbsd*) version_type=sunos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH ;; openbsd*) version_type=sunos if test "$with_gnu_ld" = yes; then need_lib_prefix=no need_version=no fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so deplibs_check_method='pass_all' sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rhapsody*) version_type=sunos library_names_spec='${libname}.so' soname_spec='${libname}.so' shlibpath_var=DYLD_LIBRARY_PATH deplibs_check_method=pass_all ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" file_magic_cmd=/usr/bin/file file_magic_test_file=/lib/libc.so ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case "$host_vendor" in sequent) file_magic_cmd='/bin/file' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; ncr) deplibs_check_method='pass_all' ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac echo "$ac_t$dynamic_linker" 1>&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in # configure.in, otherwise build static only libraries. case "$host_os" in cygwin* | mingw* | os2*) if test x$can_build_shared = xyes; then test x$enable_win32_dll = xno && can_build_shared=no echo "checking if package supports dlls... $can_build_shared" 1>&6 fi ;; esac if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$ac_t$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "$progname:2248: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 echo "$progname:2288: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else dlopen(); #endif ; return 0; } EOF if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_dlopen=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 echo "$progname:2335: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 echo "$progname:2375: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else shl_load(); #endif ; return 0; } EOF if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shl_load=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 echo "$progname:2423: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 fi fi fi fi fi fi if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes fi case "$lt_cv_dlopen" in dlopen) for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "$progname:2488: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF ac_try="$ac_compile >/dev/null 2>conftest.out" { (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi done if test "x$ac_cv_header_dlfcn_h" = xyes; then CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" fi eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2526: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self_static=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self_static=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 fi ;; esac case "$lt_cv_dlopen_self" in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case "$lt_cv_dlopen_self_static" in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then ltecho="$CONFIG_SHELL \$0 --fallback-echo" fi LTSHELL="$SHELL" LTCONFIG_VERSION="$VERSION" # Only quote variables if we're using ltmain.sh. case "$ltmain" in *.sh) # Now quote all the things that may contain metacharacters. for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case "$var" in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case "$ltecho" in *'\$0 --fallback-echo"') ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac trap "$rm \"$ofile\"; exit 1" 1 2 15 echo "creating $ofile" $rm "$ofile" cat < "$ofile" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi ### BEGIN LIBTOOL CONFIG EOF cfgfile="$ofile" ;; *) # Double-quote the variables that need it (for aesthetics). for var in old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do eval "$var=\\\"\$var\\\"" done # Just create a config file. cfgfile="$ofile.cfg" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 echo "creating $cfgfile" $rm "$cfgfile" cat < "$cfgfile" # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) EOF ;; esac cat <> "$cfgfile" # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ # $0$ltconfig_args # # Compiler and other test output produced by $progname, useful for # debugging $progname, is in ./config.log if it exists. # The version of $progname that generated this script. LTCONFIG_VERSION=$LTCONFIG_VERSION # Shell to use when invoking shell scripts. SHELL=$LTSHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$ltecho # The archiver. AR=$AR # The default C compiler. CC=$CC # The linker used to build libraries. LD=$LD # Whether we need hard or soft links. LN_S=$LN_S # A BSD-compatible nm program. NM=$NM # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$reload_flag reload_cmds=$reload_cmds # How to pass a linker flag through the compiler. wl=$wl # Object file suffix (normally "o"). objext="$objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$pic_flag # Does compiler simultaneously support -c and -o options? compiler_c_o=$compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$compiler_o_lo # Must we lock files when doing compilation ? need_locks=$need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$library_names_spec # The coded name of the library, if different from the real name. soname_spec=$soname_spec # Commands used to build and install an old-style archive. RANLIB=$RANLIB old_archive_cmds=$old_archive_cmds old_postinstall_cmds=$old_postinstall_cmds old_postuninstall_cmds=$old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$old_archive_from_new_cmds # Commands used to build and install a shared archive. archive_cmds=$archive_cmds archive_expsym_cmds=$archive_expsym_cmds postinstall_cmds=$postinstall_cmds postuninstall_cmds=$postuninstall_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$global_symbol_to_cdecl # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Compile-time system search path for libraries sys_lib_search_path_spec=$sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$exclude_expsyms # Symbols that must always be exported. include_expsyms=$include_expsyms EOF case "$ltmain" in *.sh) echo '### END LIBTOOL CONFIG' >> "$ofile" echo >> "$ofile" case "$host_os" in aix3*) cat <<\EOF >> "$ofile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # Append the ltmain.sh script. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? chmod +x "$ofile" ;; *) # Compile the libtool program. echo "FIXME: would compile $ltmain" ;; esac test -n "$cache_file" || exit 0 # AC_CACHE_SAVE trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: DBMix-0.9.8/ltmain.sh0000644000076400007640000033042407436306433010022 # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun ltconfig. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then echo "$modename: not configured to build any kind of library" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 do arg="$1" shift case "$arg" in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case "$prev" in execute_dlfiles) eval "$prev=\"\$$prev \$arg\"" ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case "$arg" in --help) show_help=yes ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" exit 0 ;; --config) sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --features) echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --quiet | --silent) show=: ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case "$nonopt" in *cc | *++ | gcc* | *-gcc*) mode=link for arg do case "$arg" in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case "$mode" in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= lastarg= srcfile="$nonopt" suppress_output= user_target=no for arg do # Accept any command-line options. case "$arg" in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi user_target=next ;; -static) build_old_libs=yes continue ;; esac case "$user_target" in next) # The next one is the -o target name user_target=yes continue ;; yes) # We got the output file user_target=set libobj="$arg" continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" # Aesthetically quote the previous argument. # Backslashify any backslashes, double quotes, and dollar signs. # These are the only characters that are still specially # interpreted inside of double-quoted scrings. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly in scan # sets, so we specify it separately. case "$lastarg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) lastarg="\"$lastarg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi done case "$user_target" in set) ;; no) # Get the name of the library object. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; *) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' case "$libobj" in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case "$libobj" in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $libobj" else removelist="$libobj" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$libobj"; then dir="$objdir" else dir="$dir/$objdir" fi libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` if test -d "$dir"; then $show "$rm $libobj" $run $rm $libobj else $show "$mkdir $dir" $run $mkdir $dir status=$? if test $status -ne 0 && test ! -d $dir; then exit $status fi fi fi if test "$compiler_o_lo" = yes; then output_obj="$libobj" command="$command -o $output_obj" elif test "$compiler_c_o" = yes; then output_obj="$obj" command="$command -o $output_obj" fi $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test x"$output_obj" != x"$libobj"; then $show "$mv $output_obj $libobj" if $run $mv $output_obj $libobj; then : else error=$? $run $rm $removelist exit $error fi fi # If we have no pic_flag, then copy the object into place and finish. if test -z "$pic_flag" && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj $run $rm $obj fi $show "$mv $libobj $obj" if $run $mv $libobj $obj; then : else error=$? $run $rm $removelist exit $error fi xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then exit 0 else error=$? $run $rm $removelist exit $error fi fi # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then command="$base_compile $srcfile" if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed if test x"$output_obj" != x"$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Create an invalid libtool object if no PIC, so that we do not # accidentally link it into a program. if test "$build_libtool_libs" != yes; then $show "echo timestamp > $libobj" $run eval "echo timestamp > \$libobj" || exit $? else # Move the .lo from within objdir $show "$mv $libobj $lo_libobj" if $run $mv $libobj $lo_libobj; then : else error=$? $run $rm $removelist exit $error fi fi fi # Unlock the critical section if it was locked if test "$need_locks" != no; then $rm "$lockfile" fi exit 0 ;; # libtool link mode link) modename="$modename: link" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invokation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (!dll) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test $# -gt 0; do arg="$1" shift # If the previous option needs an argument, assign it. if test -n "$prev"; then case "$prev" in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case "$prev" in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case "$arg" in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case "$arg" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi prevarg="$arg" case "$arg" in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: not more than one -exported-symbols argument allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 absdir="$dir" fi dir="$absdir" ;; esac case " $deplibs " in *" $arg "*) ;; *) deplibs="$deplibs $arg";; esac case " $lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir";; esac case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) dllsearchdir=`cd "$dir" && pwd || echo "$dir"` case ":$dllsearchpath:" in ::) dllsearchpath="$dllsearchdir";; *":$dllsearchdir:"*) ;; *) dllsearchpath="$dllsearchpath:$dllsearchdir";; esac ;; esac ;; -l*) if test "$arg" = "-lc"; then case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) # These systems don't actually have c library (as such) continue ;; esac elif test "$arg" = "-lm"; then case "$host" in *-*-cygwin* | *-*-beos*) # These systems don't actually have math library (as such) continue ;; esac fi deplibs="$deplibs $arg" ;; -module) module=yes continue ;; -no-undefined) allow_undefined=no continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # If we have no pic_flag, then this is the same as -all-static. if test -z "$pic_flag" && test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac ;; *.o | *.obj | *.a | *.lib) # A standard object. objs="$objs $arg" ;; *.lo) # A library object. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= fi libobjs="$libobjs $arg" ;; *.la) # A libtool-controlled library. dlname= libdir= library_names= old_library= # Check to see that this really is a libtool archive. if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 exit 1 fi # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file # If there is no directory component, then add one. case "$arg" in */* | *\\*) . $arg ;; *) . ./$arg ;; esac # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 exit 1 fi # Find the relevant object directory and library name. name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` if test "X$installed" = Xyes; then dir="$libdir" else dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$arg"; then dir="$objdir" else dir="$dir/$objdir" fi fi if test -n "$dependency_libs"; then # Extract -R and -L from dependency_libs temp_deplibs= for deplib in $dependency_libs; do case "$deplib" in -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` case " $rpath $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; -L*) case "$compile_command $temp_deplibs " in *" $deplib "*) ;; *) temp_deplibs="$temp_deplibs $deplib";; esac temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` case " $lib_search_path " in *" $temp_dir "*) ;; *) lib_search_path="$lib_search_path $temp_dir";; esac ;; *) temp_deplibs="$temp_deplibs $deplib";; esac done dependency_libs="$temp_deplibs" fi if test -z "$libdir"; then # It is a libtool convenience library, so add in its objects. convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$deplibs$dependency_libs" compile_command="$compile_command $dir/$old_library$dependency_libs" finalize_command="$finalize_command $dir/$old_library$dependency_libs" continue fi # This library was specified with -dlopen. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking statically, # we need to preload. prev=dlprefiles else # We should not create a dependency on this library, but we # may need any libraries it requires. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" prev= continue fi fi # The library was specified with -dlpreopen. if test "$prev" = dlprefiles; then # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then dlprefiles="$dlprefiles $dir/$old_library" else dlprefiles="$dlprefiles $dir/$linklib" fi prev= fi if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then link_against_libtool_libs="$link_against_libtool_libs $arg" if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # We need an absolute path. case "$dir" in [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 absdir="$dir" fi ;; esac # This is the magic to use -rpath. # Skip directories that are in the system default run-time # search path, unless they have been requested with -R. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac lib_linked=yes case "$hardcode_action" in immediate | unsupported) if test "$hardcode_direct" = no; then compile_command="$compile_command $dir/$linklib" deplibs="$deplibs $dir/$linklib" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) dllsearchdir=`cd "$dir" && pwd || echo "$dir"` if test -n "$dllsearchpath"; then dllsearchpath="$dllsearchpath:$dllsearchdir" else dllsearchpath="$dllsearchdir" fi ;; esac elif test "$hardcode_minus_L" = no; then case "$host" in *-*-sunos*) compile_shlibpath="$compile_shlibpath$dir:" ;; esac case "$compile_command " in *" -L$dir "*) ;; *) compile_command="$compile_command -L$dir";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -L$dir -l$name" elif test "$hardcode_shlibpath_var" = no; then case ":$compile_shlibpath:" in *":$dir:"*) ;; *) compile_shlibpath="$compile_shlibpath$dir:";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then compile_command="$compile_command $absdir/$linklib" deplibs="$deplibs $absdir/$linklib" elif test "$hardcode_minus_L" = yes; then case "$compile_command " in *" -L$absdir "*) ;; *) compile_command="$compile_command -L$absdir";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -L$absdir -l$name" elif test "$hardcode_shlibpath_var" = yes; then case ":$compile_shlibpath:" in *":$absdir:"*) ;; *) compile_shlibpath="$compile_shlibpath$absdir:";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then finalize_command="$finalize_command $libdir/$linklib" elif test "$hardcode_minus_L" = yes; then case "$finalize_command " in *" -L$libdir "*) ;; *) finalize_command="$finalize_command -L$libdir";; esac finalize_command="$finalize_command -l$name" elif test "$hardcode_shlibpath_var" = yes; then case ":$finalize_shlibpath:" in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:";; esac finalize_command="$finalize_command -l$name" else # We cannot seem to hardcode it, guess we'll fake it. case "$finalize_command " in *" -L$dir "*) ;; *) finalize_command="$finalize_command -L$libdir";; esac finalize_command="$finalize_command -l$name" fi else # Transform directly to old archives if we don't build new libraries. if test -n "$pic_flag" && test -z "$old_library"; then $echo "$modename: cannot find static library for \`$arg'" 1>&2 exit 1 fi # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_command="$compile_command $dir/$linklib" finalize_command="$finalize_command $dir/$linklib" else case "$compile_command " in *" -L$dir "*) ;; *) compile_command="$compile_command -L$dir";; esac compile_command="$compile_command -l$name" case "$finalize_command " in *" -L$dir "*) ;; *) finalize_command="$finalize_command -L$dir";; esac finalize_command="$finalize_command -l$name" fi fi # Add in any libraries that this one depends upon. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac ;; esac # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" case "$output" in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.a | *.lib) if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 exit 1 fi if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" ;; *.la) # Make sure we only generate libraries of the form `libNAME.la'. case "$outputname" in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi if test -n "$objs"; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 exit 1 fi # How the heck are we supposed to write a wrapper for a shared library? if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 exit 1 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. libext=al oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi dependency_libs="$deplibs" if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi current="$2" revision="$3" age="$4" # Check that each of the things are valid numbers. case "$current" in [0-9]*) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case "$revision" in [0-9]*) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case "$age" in [0-9]*) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test $age -gt $current; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 fi # Calculate the version variables. major= versuffix= verstring= case "$version_type" in none) ;; irix) major=`expr $current - $age + 1` versuffix="$major.$revision" verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test $loop != 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; windows) # Like Linux, but with '-' rather than '.', since we only # want one extension on Windows 95. major=`expr $current - $age` versuffix="-$major-$age-$revision" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi dependency_libs="$deplibs" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody*) # rhapsody is a little odd... deplibs="$deplibs -framework System" ;; *) # Add libc to deplibs on all other systems. deplibs="$deplibs -lc" ;; esac fi # Create the output directory, or remove our outputs if we need to. if test -d $output_objdir; then $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* else $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi if test "$build_libtool_libs" = yes; then # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case "$deplibs_check_method" in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behaviour. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` case "$potliblink" in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | grep . >/dev/null; then echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" echo "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` if test ! -f $xdir/$oldobj; then $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linkopts="$linkopts $flag" fi # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; *.lo | *.o | *.obj) if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 exit 1 fi if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case "$output" in *.lo) if test -n "$objs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" output="$obj" eval cmds=\"$reload_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. $show "echo timestamp > $libobj" $run eval "echo timestamp > $libobj" || exit $? exit 0 fi if test -n "$pic_flag"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" eval cmds=\"$reload_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" else # Just create a symlink. $show $rm $libobj $run $rm $libobj xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$libobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` $show "(cd $xdir && $LN_S $oldobj $baseobj)" $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; # Anything else should be a program. *) if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$compile_rpath " in *" $libdir "*) ;; *) compile_rpath="$compile_rpath $libdir" ;; esac case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the binary in the object directory, then wrap it. if test ! -d $output_objdir; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case "$dlsyms" in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = {\ " sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr_t) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case "$host" in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case "$0" in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: link_against_libtool_libs='$link_against_libtool_libs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then echo >> $output "\ program=lt-'$outputname' progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if (cd \"\$thisdir\" && eval \$relink_command); then : else $rm \"\$progdir/\$file\" exit 1 fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # win32 systems need to use the prog path for dll # lookup to work *-*-cygwin*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$oldobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` $show "(cd $xdir && ${LN_S} $obj $baseobj)" $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done eval cmds=\"$old_archive_cmds\" fi IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case "$output" in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" if test -n "$xrpath"; then temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" done dependency_libs="$temp_xrpath $dependency_libs" fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i fi $rm $output $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$dlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Directory that this library needs to be installed in: libdir='$install_libdir'\ " done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case "$arg" in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case "$destdir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case "$file" in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case "$file" in *.a | *.lib) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" test "X$dir" = "X$file/" && dir= dir="$dir$objdir" # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift # Install the shared library and build the symlinks. $show "$install_prog $dir/$realname $destdir/$realname" $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case "$destfile" in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.o | *.obj) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then link_against_libtool_libs= relink_command= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. if test -z "$link_against_libtool_libs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes for lib in $link_against_libtool_libs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case "$lib" in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` if test $? = 0 ; then : else tmpdir="$tmpdir/libtool-$$" fi if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec $SHELL $0 --finish$current_libdirs exit 1 fi exit 0 ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do echo " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" echo "more information, such as the ld(1) and ld.so(8) manual pages." echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case "$file" in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case "$file" in -*) ;; *) # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now actually exec the command. eval "exec \$cmd$args" $echo "$modename: cannot exec \$cmd$args" exit 1 else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; # libtool uninstall mode uninstall) modename="$modename: uninstall" rm="$nonopt" files= for arg do case "$arg" in -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` rmfiles="$file" case "$name" in *.la) # Possibly a libtool archive, so verify it. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $dir/$n" done test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" $show "$rm $rmfiles" $run $rm $rmfiles if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi ;; *.lo) if test "$build_old_libs" = yes; then oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi $show "$rm $rmfiles" $run $rm $rmfiles ;; *) $show "$rm $rmfiles" $run $rm $rmfiles ;; esac done exit 0 ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi # test -z "$show_help" # We need to display help for each of the modes. case "$mode" in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --version print version information MODE must be one of the following: compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE." exit 0 ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: DBMix-0.9.8/missing0000755000076400007640000001421307346372413007575 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # 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, 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 DBMix-0.9.8/mkinstalldirs0000755000076400007640000000133107346372413011001 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2000/07/10 01:01:38 bobdean Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here DBMix-0.9.8/Readme.cueing0000644000076400007640000000165207346372413010572 Cueing is enabled by specifying the -c command line option for dbfsd. With previous versions of DBMix, the was an issue with synching the cue and master output. This issue has been fixed. 1) you need two sound cards supported by OSS. The default values are: #define DEFAULT_AUDIO_DEVICE "/dev/dsp0" #define DEFAULT_CUE_AUDIO_DEVICE "/dev/dsp2" if the cue device path is different on your system, you can either 1) change the #define in DBMix/dbfsd_src/dbaudio.h or 2) use the -a and -b command line options for dbfsd or 3) use the dbmixer options dialog and the "Reset Soundcard" options on the dbmixer options menu. 2) To implement cueing, use the dbmixer gui. Click the "cue" button to turn it off/on. 3) Cue volume is unaffected by the channel gain level. This is modeled after mixers I have had experience with. This means that the channel volume could be zero, and the cue volume will still be at 100%. DBMix-0.9.8/Readme.devel0000644000076400007640000004256107346372413010423 This readme file explains the basic steps necessary to use the dbaudiolib audio library in a DBMix client application. It is staright forward, and working examples can be found in dbcat and the xmms output plugin. This file is still incomplete, but now contains explanations of each of the DBAudiolib API functions. There are three ways to use dbaudiolib. The first is to statically link to the library. I strongly recommmend against static linking. The second is to use dynamic linking by including -ldbaudiolib in the link line of your application. I prefer this method as the client application will link at runtime, and any changes to dbaudiolib will be automatically reflected. The third is to use dynamic loading. If you will not be using dynamic loading, you can skip to the "Using DBAudiolib Functions" section. This method uses a technique that is mostly commonly found in plugin architectures. The first few versions of dbaudiolib used this method until I was enlightened about the runtime linker (method 2). Quick Explanation of dynamic loading at runtime =============================================== In order to dynamically load libraries, you need two functions: dlopen() which will return a "handle" for a requested library dlsym() - which will return a void * to a requested symbol. In the worst case scenario, you would need to call dlsym for each function or variable that you would like to extract from the libary. To save time and programming headaches, it is common for a library to provide a structure of function pointers for all of its functions, and a single function call to retrieve a pointer to that structure. Thus, you only need to make one call to dlsym(). In DBAudioLib, this structure is as follows: typedef struct { int (*DBAudio_Init)(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex); int (*DBAudio_Ready)(); int (*DBAudio_Write)(char* buf, int len); int (*DBAudio_Read)(char * buf, int count); int (*DBAudio_Close)(); int (*DBAudio_Set_Volume)(int left, int right); int (*DBAudio_Get_Volume)(int *left, int *right); int (*DBAudio_Pause)(int value); char * (*DBAudio_Get_Version)(); char * (*DBAudio_Get_Channel_Name)(char * name); int (*DBAudio_Set_Channel_Name)(char * name); enum channel_type_e (*DBAudio_Get_Channel_Type)(); int (*DBAudio_Set_Channel_Type)(enum channel_type_e type); int (*DBAudio_Cue_Enabled)(); int (*DBAudio_Set_Rate)(int rte); int (*DBAudio_Get_Rate)(); int (*DBAudio_Set_Channels)(int numch); int (*DBAudio_Get_Channels)(); int (*DBAudio_Set_Format)(int fmt); int (*DBAudio_Get_Format)(); int (*DBAudio_Set_Cue)(int flag); int (*DBAudio_Get_Cue)(); int (*DBAudio_Get_Bufsize)(int input_bufsize); void (*DBAudio_perror)(char *str); int (*DBAudio_Set_Message_Handler)(void(*message_handler)(dbfsd_msg msg),int msg_flags); int (*DBAudio_Handle_Message_Queue)(); int (* DBAudio_Set_Channel_Flag)(unsigned int flag); int (* DBAudio_Clear_Channel_Flag)(unsigned int flag); unsigned int (* DBAudio_Get_Channel_Flags)(); } DBAudioLibFunctions; And the function used to retrieve is is: DBAudioLibFunctions * DBAudio_Get_Functions(); Although this guide should be enough for you to link dbaudiolib into your application, please read the dlopen, dlsym, dlerror, and dlclose man pages. Step 1: header files -------------------- There are three headers files necessary to link against and use libdbaudiolib.so.1: #include /* declaration of the dynamic library functions */ #include /* definitions for DBAudioLib fxns, datatypes and error codes */ #include /* a couple of dbmix related debug functions they are not necessary, but are handy =) */ This assume the dbaudiolib.h and dbdebug.h files are in /usr/include/dbmix, otherwise copy the files from the include directory in the dbmix distribution and reference them locally, i.e.: #include "dbaudiolib.h" #include "dbdebug.h" Step 2: global variables ------------------------ There are three global variables needed, a handle pointer for the opened library, a pointer for the DBAudioLibFunctions, and a function pointer to hold the reference to DBAudio_Get_Functions: DBAudioLibFunctions * dbaudio; void * h; void * (*get_fxns)(); Step 4: Open the library, ------------------------- retrieve function pointer to DBAudio_Get_Functions, and retrieve pointer to function structure. /* open dbaudiolib with dlopen */ if((h = dlopen("libdbaudiolib.so",RTLD_NOW)) == NULL) { printf("Failed to open DBAudioLib:: %s\n",dlerror()); return 1; } /* retrieve function pointer to DBAudio_Get_Functions */ if((get_fxns = dlsym(h,"DBAudio_Get_Functions")) == NULL) { printf("Failed to retrieve pntr to DBAudio_Get_Functions: %s\n",dlerror()); return 1; } /* call DBAudio_Get_Functions */ dbaudio = (DBAudioLibFunctions*)get_fxns(); Step 5: Use the DBAudioLibFunctions structure --------------------------------------------- Use of the function structure is exactly like calling the functions themselves, except that you precede the function name with dbaudio-> So the call error = DBAudio_Init("Dbcat",sample_size,sample_rate,numch,type); becomes: error = dbaudio->DBAudio_Init("Dbcat",sample_size,sample_rate,numch,type); And the call count = DBAudio_Write(buf,len) becomes: count = dbaudio->DBAudio_Write(buf,len) Tada! Simple. For a working example, please check out dbcat.c in the DBMix/dbfsd_src directory DBMix Debugging =============== DBMix includes two error functions: void Error(const char* fmt, ...); void Debug(const char *fmt, ...); Both accept variable length parameter lists similar to printf(). i.e.: printf("hello %d %s %x",value,"string",hexvalue); The implementation of this functions can be found in DBMix/dbfsd_src/debug.c Debug is controlled by the variable int debug_level. If debug_level > 0, Debug will output debug messages, otherwise no message will be printed. Specifying the dbfsd -d option sets debug_level to be 1. If you are hacking the standard DBMix components, there are a number of developer helpful things controlled by #ifdef DBMIX_DEBUG sections. DBMIX_DEBUG is not defined by default, therefore these sections are not within the stanard binaries. To have them included, run ./configure with the --enable-debug option. Using DBAudiolib Functions ========================== All dbaudiolib functions behave similarlly in regards to errors. Unless otherwise noted, they return 0 on success and -1 when an error occurs. When an error occurs within dbaudiolib, errno is set to one of the error codes found within dbaudiolib.h. The problem with this is that perror does not support these error codes. To solve this, dbaudiolib includes the DBAudio_perror() function. This function behaves like perror, writing a test explanation of the error to stderr. If the code is unknown (i.e. not a dbaudiolib error code), the actual perror function is called to handle it. Before continuing, please familiarize yourself with the macros and structures defined in channel.h and dbaudiolib.h API Listing DBAudio_Init int DBAudio_Init(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex); Initializes an instance of dbaudiolib by opening communication to dbfsd, and setting channel parameters.. If an error occurs errno is set with the proper value and FAILURE is returned otherwise, returns SUCCESS. Parameters: fmt - format of input data (see OSS Programmer's Manual http://www.opensound.com/pguide/index.html) rte - input data rate expressed as a whole integer. i.e. 44.1 kHz = 44100 numch - number of channels in the input data type - DBMix channel type, see enum channel_type_e in channel.h chindex - if 0 returns the first available channel, otherwise tries to use the channel associated with (chindex -1). If this channel is not free, FAILURE is returned. Pre Condition: - dbaudilib has been linked to the application statically or dynamically. Post Condition - Shared memory channel data created by dbfsd is attached to this process.. - From this data, determine the next free/unused channel. The pointer to this channel is stored in the static global ch variable. - Open communication and signal pipes for communicating with dbfsd DBAudio Errors set in errno: ERROR_BAD_SAMPLERATE input samplerate is invalid ERROR_BAD_NUMCH input numch is neither mono nor stereo ERROR_BAD_CHANNEL_ID requested channel id is out of range ERROR_INIT_FAILURE could not attach shared memory DBAudio_Ready int DBAudio_Ready(); If this instance has been initialized and is ready to be written to, returns SUCCESS, otherwise returns FAILURE DBAudio_Write int (*DBAudio_Write)(char* buf, int len); DBAudio_Write behaves similarly to the standard write() function. It is passed a data buffer and the amount of data within that buffer. On success it returns the number of bytes written. It is within DBAudio_Write that the format conversion and pitch control occurs. The algorithm has no "memory", and uses an internal buffer of set size for the conversions. If a failure occurs, no data is written to dbfsd. The drawback of this is that the size of the data buffer given to DBAudio_Write must be within a certain range for proper operation. The suggested buffer size to give to DBAudio_Write is 5120 bytes. Why? The size of a pipe buffer is 4096 bytes on most systems. Writing 5120 insures that the pipe is always full when pitches other than 100 are used. If the data buffer is too big, DBAudio_Write will return FAILURE and set errno to be ERROR_TOO_MUCH_DATA. Decrease your buffer size and try again. No error is returned when the data buffer is too small, and the data is written to dbfsd. Why? For a client that uses an internal looping buffer (xmms), this error causes data to be dropped at the top of the loop in some situations. This in turn causes the audio to skip every few seconds. Becuase the next buffer in the xmms client should be plenty big enough (another reason for the 5120 byte size), the skip is avoided. If the input data buffer is too small, the audio will start skipping when the pitch is raised above 100%. It is completely the responsibility of the client to insure that DBAudio_Write is given enough data to keep the pipe full. Note that 5120 bytes is the suggested size, it is not mandatory. The terminatorX client for example sends DBAudio_Write 512 bytes at a time. The reasons for this have to do with tX's scratching algorithm. Although 512 << 5120, due to the architecture of terminatorX, the write loop is fast enough so that the pipe is always full. DBAudio Errors: --------------- ERROR_BAD_PARAM input buffer is null, or input lenght < 0 ERROR_BAD_NUMCH Audio data is neither mono or stereo ERROR_NOT_INITIALIZED dbaudiolib is not initialized ERROR_TOO_MUCH_DATA Input data is too large for conversion buffers ERROR_BAD_FORMAT OSS audio format is not 16 bit or 8 bit signed data, or 8 bit unsigned data DBAudio_Read int DBAudio_Read(char * buf, int count); Not implemented. DBAudio_Close int DBAudio_Close() Closes this instance and frees all resources. Returns FAILURE if it fails to detach shared memory. DBAudio_Set_Volume int DBAudio_Set_Volume(int left, int right); left volume of left audio channel right volume of right audio channel sets the volume for the left and right channels for the channel associated with this instance. left and right should be within the range 0 <= x <= 100 DBAudio_Get_Volume int DBAudio_Get_Volume(int *left, int *right); returns the volumes associated with the channel for this instance. DBAudio_Pause int DBAudio_Pause(int value); If value is > 0, sets the channels pause flag, otherwise clears the pause flag DBAudio Errors: --------------- ERROR_NOT_INITIALIZED DBAudio_Get_Version char* DBAudio_Get_Version(); Returns a character pointer to a globally defined, null terminated string. This string IS NOT to be freed by the API user. DBAudio_Get_Channel_Name char* DBAudio_Get_Channel_Name(char* name) returns a pointer to the name associated with this channel, and also copies the name in to the character buffer pointed to by name. DBAudio Errors: ERROR_BAD_PARAM if name is null ERROR_NOT_INITIALIZED if instance is not initialized DBAudio_Set_Channel_name int DBAudio_Set_Channel_Name(char * name) Sets the name for this channel to be name. DBAudio Errors: ERROR_BAD_PARAM if name is null ERROR_NOT_INITIALIZED if instance is not initialized DBAudio_Get_Channel_Type enum channel_type_e DBAudio_Get_Channel_Type() Gets the channel type for this channel. channel_type_e is defined in channel.h DBAudio Errors: ERROR_NOT_INITIALIZED DBAudio_Set_Channel_Type int DBAudio_Set_Channel_Type(enum channel_type_e type) Sets the channel type for this channel. DBAudio Errors: ERROR_NOT_INITIALIZED ERROR_BAD_CHANNELTYPE requested channel type is not supported DBAudio_Cue_Enabled int DBAudio_Cue_Enabled() if the **system** cue flag is enabled, return true. this fucniton *does*not* check to see if cueing for this channel is enabled. DBAudio_Set_Cue int DBAudio_Set_Cue(int flag) if flag is true, set the channels cue flag to be true, if flag is false, set the channels cue flag to be false else, return failure. DBAudio_Get_Cue int DBAudio_Get_Cue() Returnes the value of the cue flag DBAudio_Get_Rate int DBAudio_Get_Rate() returns the samplerate for this channel DBAudio_Set_Rate int DBAudio_Set_Rate(int rte) Sets the sample rate for this channel to be rte, and modifies the base pitch accordingly. DBAudio Errors: ERROR_BAD_SAMPLERATE if 8000 < rte < 49000 DBAudio_Set_Channels int DBAudio_Set_Channels(int numch) Sets the number of audio channels in the input data. This value should be either MONO or STEREO as defined in channel.h DBAudio Error: ERROR_BAD_NUMCH numch is neither MONO nor STEREO DBAudio_Get_Channels int DBAudio_Get_Channels() Returns the value MONO or STEREO to describe the number of audio channels in this DBMix channel. DBAudio_Set_Format int DBAudio_Set_Format(int fmt) Set the input format for this channel. Allowed OSS values: AFMT_U8 unsigned 8 bit data AFMT_S8 signed 8 bit data AFMT_S16_LE signed 16 bit little endian data AMFT_S16_BE signed 16 bit big endian data DBAudio_Get_Format int DBAudio_Get_Format() Retrieves the input audio format value for this DBMix channel. DBAudio_perror void DBAudio_perror(char *str) Wrapper for the system perror function, and is used in a similar fashion. DBAudio_perror will first check errno against the dbaudiolib error codes. If the error is a dbaudiolib error, the proper descriptive string is output, otherwise perror is called. str is a string supplid by the programmer, and is output before the error string, or passed onto perror as appropriate. DBAudio_Set_Message_Handler int DBAudio_Set_Message_Handler(void(*message_handler)(dbfsd_msg msg), int msg_flags) Sets a application specific signal handler to be called in the event of a DBMix IPC message being recieved by the client. The message_handler parameter is a pointer to a function with protoype: void message_handler(dbfsd_msg msg); The msg_flags paramater is an OR'd set of the DBMix message that should be passed to the applications message handler function. Thus, if the application wishes to recieve play and stop messages, and defines a app_message_handler function, the set call would look like this: DBAudio_Set_Message_Handler(app_message_handler, (DBMSG_PLAY | DBMSG_STOP)); The possible messages are defined in dbaudiolib.h Note the definition of DBMSG_ALL in case the application wishes to recieve allmessages. IMPORTANT: Message Handlingis is turned off by default in DBAudio_Init. You MUST use this function in order for your application to recieve messages. DBAudio_Handle_Message_Queue int DBAudio_Handle_Message_Queue() This function checks for any waiting IPC messages and either handles them or calls the application specified message handler. DBAudio_Write calls this function implicitly. It may be necessary for the application to call the function periodically if no data is being output. The xmms output plugin implements a thread (or gtk_timeout depending on the version) to do this. DBAudio_Set_Channel_Flag int DBAudio_Set_Channel_Flag(unsigned int flag); Sets a flag for this channel. Flags are defined in channel.h This flags are used to enable/disable specific capabilities for the channel such as: is the channel pauseable? is it subject to pitch control? is it a microphone? See dbin.c for examples of how to use these flags. By default, pause and pitch are enabled while mic is disabled. DBAudio_Clear_Channel_Flag int DBAudio_Clear_Channel_Flag(unsigned int flag); Clears a channel flag for this channel. DBAudio_Get_Channel_Flags unsigned int DBAudio_Get_Channel_Flags(); Returns an OR'd set of the flags for this channel. DBMix-0.9.8/Readme.exmixer0000644000076400007640000005652007346372413011005 Construction guide of external mixer to work with DBMix ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Simon M. Werner (c) 2000 Contents ~~~~~~~~ 0. Disclaimer ~~~~~~~~~~~~~ 1. Introduction and reasons ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. System Requirements ~~~~~~~~~~~~~~~~~~~~~~ 2.1 Before you start 3. Construction of the exmixer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.1 How does it work? 3.2 Another word of warning 3.3 What you need for construction 3.3.1 Tools and equipment required 3.3.2 Parts list 3.4 Construction 4. Configuring DBMix with the exmixer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4.1 Calibrating the joystick 4.2 The exmixer Preferences Dialog 5. Additional stuff ~~~~~~~~~~~~~~~~~~~ 0. Disclaimer ~~~~~~~~~~~~~ **************************************************************************** I TAKE *NO* RESPONSIBILITY ON THE CORRECTNESS OF THIS DOCUMENTATION, IF YOU FRY ANY OF YOUR COMPONENTS, DON'T BLAME ME. SOME OF THE CONSTRUCTION DESCRIBED IN THIS DOCUMENT SHOULD ONLY BE DONE BY PEOPLE WHO KNOW WHAT THEY ARE DOING. **************************************************************************** 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 Should you need to contact me, the author, you can do so either by e-mail - mail your message to For your convenience, the GNU General Public License version 2 is included in the package: See the file COPYING. 1. Introduction and reasons ~~~~~~~~~~~~~~~~~~~~~~~~~~~ So you want to be a DJ? This readme explains how to construct an external mixer (exmixer) that can be integrated with DBMix. This allows your PC to become a DJ mixing station, no mouse reqiured. DBMix can read more than one games (joystick) port, this enables you to easily create a device with variable resistors that can control any of the DBMix adjustments for any channel, such as pitch, volume, main volume etc. DBMix is also capable of using buttons to play, pause, mute etc. If you find any errors in this document please tell me and I will fix them. Should you have any problems or additional requests related to the exmixer device you can contact me at: rgbe@yahoo.com I only created the exmixer and it's interface with DBMix, I did not write DBMix, that was done by Robert Dean, see README for details. Any DBMix related questions should go to him. The reason I have created the exmixer was that I have a friend who wanted an external mixing device where he can mix music together, like a normal DJ with two turntables. But he wanted to mix mp3 on his PC. So I found DBMix which does most of job. I designed and constructed a device that connects to the games port, I also added code to DBMix to interface with the exmixer and volia. We have an exmixer that works very well. You can use DBMixer with an ordinary joystick, but I don't see the point of this as the joystick will always spring back to the middle. You could remove the springs in the joystick but then it will just limp to one side. If you wish, I can construct an exmixer for you but for a price. My guess is that it would cost you around $US200 for me to build it for you. Build it yourself and it will cost you around $US20. 2. System Requirements ~~~~~~~~~~~~~~~~~~~~~~ - Joystick/games port (preferably more than 1), most standard sound cards come with one. - Linux kernel 2.4 or greater with joystick support. I have only tried kernel 2.2 without any success, but this does not mean it won't work. Kernel 2.4 users a later joystick driver than kernel 2.2 . - A joystick or exmixer device (more details below). - A reasonable computer, must be able to at least two samples at once without any problems. - A bit of free time. 2.1 Before you start ~~~~~~~~~~~~~~~~~~~~ Before you start the construction of the exmixer read the disclaimer at the top of this page, as I said I take *no* responsibility what so ever for your actions. There is a chance that if you do wire up the exmixer incorrectly that you will fry at least your joystick port, maybe even your main board. Read this documentation *before* continuing any further: http://www.hut.fi/Misc/Electronics/docs/joystick/pc_circuits.html It has some extra safety tips and it is where I sourced all the information I needed about the PC joystick port. Before you start construction of the exmixer make sure DBMix works with just a joystick alone. I don't want you building an exmixer and then find out that it doesn't work on your system. Read the instructions at the end of this document "Configuring DBMix with the exmixer". 3. Construction of the exmixer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These intructions are more of a breif guide than a step-by-step process on how to build an exmixer. I assume you have the intellegence to be able to safely use all the tools nessecary. Basically, if you have read through the documentation below and don't understand it, this construction project is not for you. 3.1 How does it work? ~~~~~~~~~~~~~~~~~~~~~ The exmixer will be connected to one or more games port of a PC (I don't know if this applies to other systems, please tell me if it does). The games port works by sending a current through the resistor and then measuring the resistance. The variable resistor allows the position of the slider to be detected. The games port is a wonderfully simple port, but not the most accurate, especially with an analog system. The buttons used are just simple on/off switches. 3.2 Another word of warning ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The device I created works fine on my hardware, I cannot garuantee it will be the same for yours. I am using a SBLive and a Vibra 16 for my games port. It is a good idea to know what you are doing when building this device, if you have not done any electrical work or have not done anything of this sort before. I suggest you search the net or visit your local library to find information on assembly with electricity and electronics, and *BE CAREFUL*. Guides to soldering can be found here: http://www.epemag.wimborne.co.uk/solderfaq.htm http://media.butler.edu/chad/ha/solder.html http://www.mtechnologies.com/building/atoz.htm Before you start you need to *plan* what you want to do. Below are the general instructions on how to create an exmixer with 6 buttons and 6 sliders, you may want more or less sliders. Every slider can be assigned to any adjustment bar you see on DBMix. Because a standard games port only allows for only four sliders/axis per port we will need to use two games ports, hence two cables comming from the exmixer. If you only have one games port you will have to go out and find yourself a second games port if you want more than 4 slider controls. The same applies for buttons, there are a maximum of 4 buttons available per port. This construction guide will assume you have two games ports. The finished exmixer will look like this: Figure-1: A typical DJ mixer. ############################################################################ # # # CHANNEL 0 CHANNEL 1 # # # # Buttons: # # |----| |----| |----| |----| |----| |----| # # |Prev| |Play| |Next| |Prev| |Play| |Next| # # |----| |----| |----| |----| |----| |----| # # Main Volume # # Volume Volume # # 0 - | # # 0 - | 0 - | 10 - | # # | | 20 - | # # | | 30 -### # # | ### 40 - | # # 50 - | 50 - | 50 - | # # ### | 60 - | # # | | 70 - | # # | | 80 - | # # 100 - | 100 - | 90 - | # # 100 - | # # Pitch: -----##----- ---##------- # # # # 0 100 200 # # Cross fader: ------------##- # # # ############################################################################ This is what the finished product will look like, only a little more real I hope :-). It will also have that "home made" look and feel to it. Costs: I source parts from a shop called "Surplustronics", it's basically a shop which takes in old equipment and sells it dirt cheap. They also sell all sorts of electronic/eletrical equipment. I recommend you start at a shop like this first, they are usually dirt cheap. My exmixer cost around $NZ40 (~$US20). 3.3 What you need for construction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.3.1 Tools and equipment required ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Solder iron, a cheap one will do. - Solder wire, small handy packs can be cheaply purchased. - Wire cutter/stripper. - An electric drill with a 2-4mm drill piece. - A multimeter, this is essential to make sure your wiring is correct. - A saw, to cut slots for the sliders. - A file. - A philips screw driver. (I used my Leatherman Super Tool, it does wonders.) 3.3.2 Parts list ~~~~~~~~~~~~~~~~ 1 box/container to put everything in. I bought an old modem or something which was in a rather large case. I ripped the guts out, cleaned the case and I had a cool recycled case. 6 100 kOhm linear variable resistors (the sliders). You can use up to 250 kOhm resistors. Make sure they are *not* logarithmic. I used shorter sliders for the pitch and longer sliders for the volume, to be neat and save space. 6 20 kOhm resistors, 0.5 Watt will do, one for each slider. 12 Screws, to hold the sliders in place. 6 knobs for the sliders. 6 Buttons that don't go click. 4m 10 to 13 core cable (a cable with 10 to 13 wires inside it). 2m for each games port. 2 15 pin male plugs to fit games port. 2 Plug houses to enclose the plugs. (if sold seperately from the plug) 0.5m Insulated wire. 3.4 Construction ~~~~~~~~~~~~~~~~ As I said earlier planning is important. If you want a good quality product in the end, you must plan every step before you go. This will save you time in the long run and things will be neater. 1. Layout: Once you have purchaced your parts or know the size of the sliders, it is good to draw on a piece of paper the layout of the exmixer. Something simple like the design in Figure-1 above will be sufficient. Remember you don't want everything crammed in together so try and make use of all the space available. An accurate scale diagram would be best. If you are going to add buttons remember to allocate them enough space as well. Once you have decided on your layout pencil in all the holes that need to be drilled, and the slider slots. I like to draw everything to scale on a piece of paper, I can then stick the paper onto the back face of the mixer using sticky tape. 2. Preparing the case: If you bought an old case like I did, make sure you remove all the unecessary things before you begin drilling. Remember: Once you have drilled a hole you cannot undrill it, so be careful. doesn't apply here :-). Cutting the slots for the sliders is the hardest part of the project. You will have to drill a few holes in a row so that you can fit a saw into the gap. I used the wood saw which comes on my Leatherman, but any jig saw will do fine. Use a file to make the sides of the slot smooth. Now screw all the sliders into place and same with the buttons. Making sure you place all the sliders the same way up. 3. Joystick plug: Now we have to create the joystick plugs. If you haven't already done so read the page at: http://www.hut.fi/Misc/Electronics/docs/joystick/pc_circuits.html it has all you need to know about the games port plug. If the page is no longer there, email me at: rgbe@yahoo.com Basically, the joystick contains 15 pins, see Figure-2 below, we are going to use all the pins except for pins 12 and 15, just to play safe. Some soundcards use these two pins for the MIDI device. Figure-2: Looking face on at the male plug. 1 2 3 4 5 6 7 8 |---------------------------------| | o o o o o o o o | \ / \ o o o o o o o / \___________________________/ 9 10 11 12 13 14 15 Pin assignments: ---------------- 1 : +5vDC 2 : Button 0 3 : Slider 0 4 : GND (ground) 5 : GND (ground) 6 : Slider 1 7 : Button 1 8 : +5vDC 9 : +5vDC 10 : Button 2 11 : Slider 2 12 : GND (ground) or MIDI 13 : Slider 3 14 : Button 3 15 : +5vDC or MIDI As you can see by looking at the table the plug is symetrical. Pins 1 and 8 do the same job, as do pins 2 and 7, and so on. Cut the 13 core cable in two, we need one for each games port. So we now have two cables of 2m length. Now solder each of the wires in the cable to the the plug, make sure not to use pins 12 and 15. Also try and keep a track of the colours of the wires you are soldering so we know which wire goes to which pin. Once this is complete double check your wiring with a multimeter, make sure you don't have any shorts anywhere. 4. Soldering the sliders and buttons: Alright what we want to do now is remove about 20cm (9") of the outer sheath of the cable. Now all the coloured wires are exposed. Study the circuit diagram below and connect up the corresponding wires. Figure-3: Circuit layout of games port ============================================== pin 1, 8, or 9 +5vDC ___________________ | | 20K | pin 3 Slider0 ______/\/\/\____ | | 100K | _/\/\/\_____| | | 20K | pin 6 Slider1 ______/\/\/\____ | | 100K | _/\/\/\_____| | | 20K | pin 11 Slider2 ______/\/\/\____ | | 100K | _/\/\/\_____| | | 20K | pin 13 Slider3 ______/\/\/\____ | | 100K | _/\/\/\_____| | ___ pin 2 button1 ______o o_______ | ___ | pin 7 button2 ______o o_______| | ___ | pin 10 button3 ______o o_______| | ___ | pin 14 button4 ______o o_______| | | pin 4 or 5 GND ______________| | ============================================== For example, if you want to connect Slider0, take the wire that is comming from pin 3, solder it to a 20 kOhm resistor, then connect the other of the resistor to a terminal on the slider. Take a wire that is going to a +5vDC pin, you can use pins 1, 8 or 9 for this. Connect this wire to the other terminal of the slider. Don't use pins 12 or 15. The 20 kOhm resistor is to avoid incorrect detection of the sliders. Some games ports such as the one on my SBLive will report a stationary slider as moving when all the sliders are near the zero resistance end. Adding a 20 kOhm resistor here should eliminate this problem. If this still occurs, using a larger resistor may help, such as a 30 or 40 kOhm resistor. For the buttons you connect one end to a button pin (2, 7, 10, or 14) and the other end to a ground pin (4 or 5). If you are making a mixer with more than four sliders or buttons, you will have to use a second cable and a second port. The instructions are the same as above. ********************************************************* **** TEST IT WITH A MULTIMETER BEFORE YOU PLUG IT IN **** ********************************************************* This is where things tend to burn when you do things wrong. Make sure you test the device before pluging it in. There should be between 0 Ohms and 100 kOhms resistance in the circuit. With the multimeter test each slider with the slider at both its limits. Test each button as well. Once you have tested the slider you can plug it in and configure it. See the next section on configuring the exmixer. Now all you have to do is secure the wires using cable ties and close the box. Make sure you also secure the main cables as well. 4. Configuring DBMix with the exmixer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following instructions will guide you through the configuration of the exmixer. It is a real simple process, first we will calibrate the exmixer, then create the exmixer preferences to set up the sliders. 4.1 Calibrating the joystick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ First we need package jscal or xjscal these can be found at: http://www.suse.cz/development/joystick/ More information on calibrating the joystick can be found here: file:///usr/src/linux/Documention/joystick.txt http://www.suse.cz/development/input/ xjscal is an easy to use calibration program that runs under X11. I recommend it for the exmixer. If you find that once you have started DBMix and the slider does things the wrong way round you can use the flip axis switch in xjscal. Be sure to return the slider to the center before calibration is complete. The calibration programs will create a ~/.joystick file, this will be used by DBMix. You must also set the nullzone to zero, otherwise there will be a part where the slider will be unresponsive. 4.2 The exmixer Preferences Dialog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once you have created the exmixer, configuring the device to work with DBMix is straight forward. You must have "Enable external mixer" checked in the DBMix preferences dialog. Then click "Config exmixer ..." to configure the exmixer. The dialog that appears is straight forward to use. If you require more than 2 devices, follow the instructions in section 5. The "Enabled" check button will enable the device given in the "Device" box. The "Assignment" column allows you to assign a given slider or button to a particular function. The "Channel" column combo boxes (if available) will assign the slider to a given channel. Assignment labels, a brief description: Pitch: Adjusts the pitch of a channel. Volume: Adjusts the volume of a channel. Main Volume: Adjusts the master volume control. Cue Volume: Adjusts the cue volume. Cross Fade: Adjusts the cross fader. Fade Speed: Adjusts the fade speed. Balance: Adjusts the master left/right balance. The button assignment labels are straight forward. If you don't know which button is which, you can press the button when the exmixer Settings window is open, this will switch the focus to the specified button. 5. Additional stuff ~~~~~~~~~~~~~~~~~~~ Thats it! Happy mixing. And *please* tell me if you ever create your own exmixer, I would like to hear from you to see how it went. And just some recognition that someone has made use of this document. If you happen to create any cool new tunes you can send a link for me to download them. If you have any requests for additional functionality, tell me and I will see what I can do. To enable more than two games ports you will need to re-compile the code, this can be done by setting: #define MAX_DEV 2 to #define MAX_DEV 3 in "/DBMix/dbmixer/exmixer.h". Then type "make clean" in the DBMix root, then "make" followed by "make install". The same can be done if you happen to build a mixer with more than four axes or buttons (don't ask me how), just change the following to however many axes/buttons you require: #define MAX_AXES 4 #define MAX_BUT 4 These can also be found in the exmixer.h file. Ciao, Simon DBMix-0.9.8/include/0000777000076400007640000000000007436306702007702 5DBMix-0.9.8/include/Makefile.in0000664000076400007640000001202107436306702011661 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ EXTRA_DIST = dbchannel.h dbaudiolib.h dbdebug.h dbsoundcard.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = include distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/include/Makefile.am0000644000076400007640000000007607346372416011662 EXTRA_DIST = dbchannel.h dbaudiolib.h dbdebug.h dbsoundcard.h DBMix-0.9.8/include/dbchannel.h0000644000076400007640000002156407434145513011714 /* Definitions for the DB Fourier Synthesis Daemon. Author: Robert Michael S Dean copyright, (c) 1999, 2000 For the dbfsd, a "channel" is defined as a data producer or consumer. the control structure is the channel_struct. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef __DB_CHANNEL_H_ #define __DB_CHANNEL_H_ #ifdef __cplusplus extern "C" { #endif /* #include */ /* #include */ #include #include #include #include #include "dbaudiolib.h" #define DB_CHANNEL_BUF_SIZE 1024 #define DB_CHANNEL_NUM_SAMPLES 1024 /* number of samples per buffer */ #define DB_CHANNEL_NUM_CHANNELS 2 #define DB_SAMPLE_SIZE 2 /* number of bytes per sample */ #define DB_SAMPLE_RATE 44100 /* default sample rate for dbfsd */ #define DB_CHANNEL_NAME_SIZE 20 /* maximum length of a channel name */ #define DB_BUFSIZE_SHORT 512 #define DB_BUFSIZE_CHAR (DB_BUFSIZE_SHORT * DB_SAMPLE_SIZE) #define DB_SAMPLER_DEFAULT_TIME (10.0) /* default # seconds in sample buffer */ #define DB_MIN_AUDIO_BUFFS 10 /* defines for shared memory*/ #define DB_CHANNELS_SM_KEY 23435 #define DB_CHANNELS_SM_KEY_CUE 23445 #define DB_SYSTEM_SM_KEY 10998 #define DB_SYSTEM_SM_KEY_CUE 10988 /* defines for message queues */ #define DB_CHANNELS_Q_KEY_BASE 31234 /* defines for semaphores */ #define DB_SEMAPHORE_KEY 16789 /* defines for communication tokens */ #define TOKEN_1 '0' #define TOKEN_2 '1' #define TOKEN_3 '2' #define TOKEN_4 '3' #define NO_TOKEN 'N' #define DB_TALKOVER_DIVISOR 4 /* 25%*/ #define DB_TALKOVER_DIVISOR_POWER 2 /* 4 = 2^2 */ #define DEFAULT_SKIP_MAX 20 #define MAX_SKIP_MAX 200 #define DEFAULT_GAIN ((85 * 128) / 100) #define DEFAULT_PITCH 100.0 /* message types are defined in dbaudiolib.h */ /* channel flags - used to describe the capabilities of a channel i.e. does the client support pitch control? Is it a microphone? can it be paused? */ #define CUE_FLAG 0x00000001 #define MIC_FLAG 0x00000002 #define PITCH_FLAG 0x00000004 #define PAUSE_FLAG 0x00000008 /* channel flag enabled macros */ #define ENABLED(a) ((ch->channel_flags & a) == a) #define CUE_ENABLED ENABLED(CUE_FLAG) #define MIC_ENABLED ENABLED(MIC_FLAG) #define PITCH_ENABLED ENABLED(PITCH_FLAG) #define PAUSE_ENABLED ENABLED(PAUSE_FLAG) typedef struct wav_header_s { guint32 main_chunk; guint32 length; guint32 chunk_type; guint32 sub_chunk; guint32 sc_len; guint16 format; guint16 modus; guint32 sample_fq; guint32 byte_p_sec; guint16 byte_p_spl; guint16 bit_p_spl; guint32 data_chunk; guint32 data_length; } wav_header; #define MAX_WAV_LENGTH 0xFFFFFFFF /* enumeration of the different channels types */ /* enum channel_type_e {PIPE_CHANNEL, SOCKET_CHANNEL}; */ /* * channel_buf_s is the structure used by a channel to hold data. */ typedef struct channel_buf_s { short len; char data_ready; signed short buf[DB_BUFSIZE_SHORT]; } channel_buf; /* * local_channel is the structure describing a channel on that exist on * the same machine as the daemon. */ typedef struct local_channel_s { /* channel control variables */ int msg_q_id; /* message queue id for this channel */ int msg_flags; /* message flags */ int channel_flags; /* to hold server options */ enum channel_type_e channel_type; short index; /* what is the index of this channel? */ short client_comm_fd; /* communication pipes fid's - opened by client */ short client_cue_fd; short server_comm_fd; /* communication pipes fid's - opened by server */ short server_cue_fd; short free_channel; /* flag, is this channel unused? */ short is_symlink; /* is this channel symlinked to /tmp/ch ? */ short skip_count; /* number of times read has been skipped due to too little data ready */ char comm_filename[512]; /* filename for main data pipe */ char cue_filename[512]; /* filename for cue data pipe */ char channel_name[64]; void (*message_handler)(dbfsd_msg message); /* pointer to IPC message handler function */ /* audio playback control variables */ float base_pitch; /* pitch value set by DBAudio_Set_Rate() */ float user_pitch; /* pitch value set by user */ short left_gain; /* gain for left stereo channel */ short right_gain; /* gain for right stereo channel */ short cue_left_gain; /* gain for left stereo cue channel */ short cue_right_gain; /* gain for right stereo cue channel */ char pause; /* flag, is this channel paused? */ char mute; /* flag, is this channel muted? */ char cue; /* flag, is this channel in cue mode? */ char writing; /* data is currently being written */ /* sampler control variables */ enum sampler_state_e sampler_state; float sampler_time; /* time length of sample buffer */ int sampler_bufsize; /* size of sample buffer */ int sampler_size; /* size of recorded sample */ int sampler_readoffset; /* location of playback read point within buffer */ int sampler_startoffset; /* location of start of samples within buffer */ int sampler_endoffset; /* end of samples within buffer */ char * sampler_buf; /* pointer to sample buffer */ /* buffers used for fourier synthesis */ channel_buf buffer; channel_buf cue_buffer; } local_channel; /* * Still haven't decided what to do with this yet... * it should be enough that most clients will have network support * themselves... */ /* typedef struct socket_channel_s */ /* { */ /* short server_read_fd; */ /* short server_write_fd; */ /* short client_read_fd; */ /* short client_write_fd; */ /* short write_fd; */ /* short data_ready; */ /* short free_channel; */ /* short is_symlink; */ /* int len; */ /* signed short buf[DB_CHANNEL_BUF_SIZE]; */ /* struct sockaddr_in client_address; */ /* int client_len; */ /* }socket_channel; */ /* * dbfsd_data holds system data for the daemon. */ typedef struct dbfsd_data_s { pid_t pid; /* pid of the daemon */ pid_t cue_pid; pid_t mixer_pid; int num_cue_buffs; /* number of audio buffers for main device */ int num_main_buffs; /* number of audio buffers for cue device */ int debug_level; /* system wide debug level - not implemented */ int num_channels; /* number of pipe input channels */ int num_sockets; /* number of network input channels */ int ready_count; /* number of ready input pipes */ int clipping_threshold; /* # of allowable clipped samples */ int free_channel_index; /* index of next free channel */ int clipping; /* difference between calc. level and max level */ int skip_max; /* maximum skipped reads before audio is passed through */ int left_balance; /* system wide left balance */ int right_balance; /* system wide right balance */ int cue_split; /* flag, enable cue splitting */ int single_output; /* flag, cue with only a single master output */ int cue_enabled; /* flag, is cue enabled in this dbfsd instance? */ int talkover_enabled; /* flag, mic talkover is enabled */ float default_sampler_time; /* default # of seconds for sampler buffer */ char main_audio_device[256]; /* path names to audio and mixer devices */ char cue_audio_device[256]; char main_mixer_device[256]; char cue_mixer_device[256]; char filename[FILENAME_MAX]; /* path name used to transfer samples between channels */ char sampler_op_flag; char recording; /* main output is being recorded to a wav file */ } dbfsd_data; /* included here becuase it is needed by dbmixer */ #define DB_FRAGSIZE 9 /* 2^DB_FRAGSIZE is the size of the fragment: 2^11 = 2048 */ #define DB_NUM_FRAGMENTS 128 /* 65536 / (2^DB_FRAGSIZE) */ #ifdef __cplusplus } #endif #endif /* __DB_CHANNEL_H_ */ DBMix-0.9.8/include/dbaudiolib.h0000644000076400007640000002036307434142575012075 /* Definitions for dbaudiolib.c Author: Bob Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef __DB_AUDIOLIB_H_ #define __DB_AUDIOLIB_H_ #ifdef __cplusplus extern "C" { #endif #include /* #include */ #define DBAUDIOLIB_VERSION "0.9.8"; /* DBAudioLib Error Codes */ /* when possible the actual system error code is left in errno, since it more specifically describes the error */ enum { ERROR_BASE = 50000, ERROR_NOT_IMPLEMENTED, /* user tried to access functionality that has not yet been implemented. */ ERROR_BAD_CHANNEL, /* unknown channel type */ ERROR_BAD_PARAM, /* function recieved a bad parameter*/ ERROR_NO_FREE_CHANNELS, /* all channels are in use */ ERROR_TOO_MUCH_DATA, /* the client gave too muxh data to dbaudiolib, conversion would overrun the internal buffers */ ERROR_BAD_SAMPLERATE, /* the samplerate provided is not supported */ ERROR_BAD_CHANNELTYPE, /* the channeltype provided is not supported */ ERROR_BAD_NUMCH, /* the number of audio channels (stereo or mono) is not supported */ ERROR_BAD_FORMAT, /* the input audio format is not supported */ ERROR_CHANNEL_IN_USE, /* the requested channel index passed to DBAudio_Init is already in use */ ERROR_BAD_CHANNEL_ID, /* the requested channel index passed to DBAudio_Init is out of range */ ERROR_TOO_LITTLE_DATA, /* the client gave too little data to dbaudiolib - depreciated */ ERROR_NOT_INITIALIZED, /* attempted to use dbaudiolib without a call to DBAudio_Init first */ ERROR_INIT_FAILURE /* some part of the init process not related to dbmix failed */ }; /* enumeration of sampler state */ enum sampler_state_e {SAMPLER_OFF, SAMPLER_RECORD, SAMPLER_PLAY_SINGLE, SAMPLER_PLAY_LOOP, SAMPLER_READY}; typedef enum sampler_state_e sampler_state; #define DBAUDIO_MAX_VOLUME 100 #define DBAUDIO_INTERNAL_MAX_VOLUME 128 #define DBAUDIO_MIN_VOLUME 0 #define DBMIX_COPYRIGHT "Copyright (c) 2002 by Robert Michael S Dean" #define DBMIX_VERSION "v0.9.8" #define SUCCESS 0 #define FAILURE -1 #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define MONO 1 #define STEREO 2 /* * Message structure used to communicate within dbmix channels */ #define DBMSG_NONE 0x00000000 #define DBMSG_ALL (0xFFFFFFFF & ~DBMSG_SAMPLERLOAD & ~DBMSG_SAMPLERSAVE) #define DBMSG_PAUSE 0x00000001 #define DBMSG_UNPAUSE 0x00000002 #define DBMSG_PLAY 0x00000004 #define DBMSG_STOP 0x00000008 #define DBMSG_EJECT 0x00000010 #define DBMSG_REWIND 0x00000020 #define DBMSG_FFORWARD 0x00000040 #define DBMSG_NEXT 0x00000080 #define DBMSG_PREV 0x00000100 #define DBMSG_MUTE 0x00000200 #define DBMSG_UNMUTE 0x00000400 #define DBMSG_SAMPLERSIZE 0x00000800 #define DBMSG_SAMPLERSAVE 0x00001000 #define DBMSG_SAMPLERLOAD 0x00002000 #define DBMSG_SAMPLERREC 0x00004000 #define DBMSG_SAMPLERSTOP 0x00008000 #define DBMSG_SAMPLERLOOP 0x00010000 #define DBMSG_SAMPLERONCE 0x00020000 typedef struct dbfsd_msg_s { long int msg_type; float data; char * datastr; } dbfsd_msg; /* enumeration of the different channels types */ enum channel_type_e {PIPE_CHANNEL, SOCKET_CHANNEL}; /* DBAudioLib Prototypes for statically linked libraries */ int DBAudio_Init(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex); int DBAudio_Ready(); int DBAudio_Write(char* buf, int len); int DBAudio_Read(char * buf, int count); int DBAudio_Close(); int DBAudio_Set_Volume(int left, int right); int DBAudio_Get_Volume(int *left, int *right); int DBAudio_Pause(int value); char * DBAudio_Get_Version(); char * DBAudio_Get_Channel_Name(char * name); int DBAudio_Set_Channel_Name(char * name); enum channel_type_e DBAudio_Get_Channel_Type(); int DBAudio_Set_Channel_Type(enum channel_type_e type); int DBAudio_Cue_Enabled(); int DBAudio_Set_Cue(int flag); int DBAudio_Get_Cue(); int DBAudio_Set_Rate(int rte); int DBAudio_Get_Rate(); int DBAudio_Set_Channels(int numch); int DBAudio_Get_Channels(); int DBAudio_Set_Format(int fmt); int DBAudio_Get_Format(); int DBAudio_Get_Bufsize(int input_bufsize); void DBAudio_perror(char *str); int DBAudio_Set_Message_Handler(void(*message_handler)(dbfsd_msg msg), int msg_flags); int DBAudio_Handle_Message_Queue(); int DBAudio_Set_Channel_Flag(unsigned int flag); int DBAudio_Clear_Channel_Flag(unsigned int flag); unsigned int DBAudio_Get_Channel_Flags(); int DBAudio_Set_Mute(int value); int DBAudio_Get_Mute(); int DBAudio_Sampler_Record(); int DBAudio_Sampler_Stop(); int DBAudio_Sampler_Loop(); int DBAudio_Sampler_Single(); int DBAudio_Sampler_Get_Offsets(int * start_offset, int * end_offset); int DBAudio_Sampler_Set_Offsets(int start_offset, int end_offset); int DBAudio_Sampler_Get_Size(int * size); int DBAudio_Sampler_Save(char * filename); int DBAudio_Sampler_Load(char * filename); sampler_state DBAudio_Sampler_Get_State(); /* structure to hold audiolib functions plugin style for dynamically linked libraries... As functions are added, they are placed at the end of the struct so as not to break clients using older versions of the library */ typedef struct { int (*DBAudio_Init)(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex); int (*DBAudio_Ready)(); int (*DBAudio_Write)(char* buf, int len); int (*DBAudio_Read)(char * buf, int count); int (*DBAudio_Close)(); int (*DBAudio_Set_Volume)(int left, int right); int (*DBAudio_Get_Volume)(int *left, int *right); int (*DBAudio_Pause)(int value); char * (*DBAudio_Get_Version)(); char * (*DBAudio_Get_Channel_Name)(char * name); int (*DBAudio_Set_Channel_Name)(char * name); enum channel_type_e (*DBAudio_Get_Channel_Type)(); int (*DBAudio_Set_Channel_Type)(enum channel_type_e type); int (*DBAudio_Cue_Enabled)(); int (*DBAudio_Set_Rate)(int rte); int (*DBAudio_Get_Rate)(); int (*DBAudio_Set_Channels)(int numch); int (*DBAudio_Get_Channels)(); int (*DBAudio_Set_Format)(int fmt); int (*DBAudio_Get_Format)(); int (*DBAudio_Set_Cue)(int flag); int (*DBAudio_Get_Cue)(); int (*DBAudio_Get_Bufsize)(int input_bufsize); void (*DBAudio_perror)(char *str); int (*DBAudio_Set_Message_Handler)(void(*message_handler)(dbfsd_msg msg),int msg_flags); int (*DBAudio_Handle_Message_Queue)(); int (*DBAudio_Set_Channel_Flag)(unsigned int flag); int (*DBAudio_Clear_Channel_Flag)(unsigned int flag); unsigned int (* DBAudio_Get_Channel_Flags)(); int (*DBAudio_Set_Mute)(int value); int (*DBAudio_Get_Mute)(); int (*DBAudio_Sampler_Record)(); int (*DBAudio_Sampler_Stop)(); int (*DBAudio_Sampler_Loop)(); int (*DBAudio_Sampler_Single)(); int (*DBAudio_Sampler_Get_Offsets)(int * start_offset, int * end_offset); int (*DBAudio_Sampler_Set_Offsets)(int start_offset, int end_offset); int (*DBAudio_Sampler_Get_Size)(int * size); int (*DBAudio_Sampler_Save)(char * filename); int (*DBAudio_Sampler_Load)(char * filename); sampler_state (*DBAudio_Sampler_Get_State)(); } DBAudioLibFunctions; DBAudioLibFunctions * DBAudio_Get_Functions(); #ifdef __cplusplus } #endif #endif /* __DB_AUDIOLIB_H_ */ DBMix-0.9.8/include/dbdebug.h0000644000076400007640000000222207346372416011366 /* Debug functions. Author: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ #ifdef __cplusplus extern "C" { #endif void Error(const char* fmt, ...); void Debug(const char *fmt, ...); int Check_Debug(); #ifdef __cplusplus } #endif DBMix-0.9.8/include/dbsoundcard.h0000644000076400007640000013225207346372416012271 #ifndef SOUNDCARD_H #define SOUNDCARD_H /* * Copyright by Hannu Savolainen 1993-1997 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. 2. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * OSS interface version. With versions earlier than 3.6 this value is * an integer with value less than 361. In versions 3.6 and later * it's a six digit hexadecimal value. For example value * of 0x030600 represents OSS version 3.6.0. * Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of * the currently active driver. */ #define SOUND_VERSION 0x030802 #define OPEN_SOUND_SYSTEM /* In Linux we need to be prepared for cross compiling */ #include /* * Supported card ID numbers (Should be somewhere else?) */ #define SNDCARD_ADLIB 1 #define SNDCARD_SB 2 #define SNDCARD_PAS 3 #define SNDCARD_GUS 4 #define SNDCARD_MPU401 5 #define SNDCARD_SB16 6 #define SNDCARD_SB16MIDI 7 #define SNDCARD_UART6850 8 #define SNDCARD_GUS16 9 #define SNDCARD_MSS 10 #define SNDCARD_PSS 11 #define SNDCARD_SSCAPE 12 #define SNDCARD_PSS_MPU 13 #define SNDCARD_PSS_MSS 14 #define SNDCARD_SSCAPE_MSS 15 #define SNDCARD_TRXPRO 16 #define SNDCARD_TRXPRO_SB 17 #define SNDCARD_TRXPRO_MPU 18 #define SNDCARD_MAD16 19 #define SNDCARD_MAD16_MPU 20 #define SNDCARD_CS4232 21 #define SNDCARD_CS4232_MPU 22 #define SNDCARD_MAUI 23 #define SNDCARD_PSEUDO_MSS 24 #define SNDCARD_GUSPNP 25 #define SNDCARD_UART401 26 /* Sound card numbers 27 to N are reserved. Don't add more numbers here. */ /*********************************** * IOCTL Commands for /dev/sequencer */ #ifndef _SIOWR #if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__INCioctlh) && !defined(__Lynx__))) /* Use already defined ioctl defines if they exist (except with Sun) */ #define SIOCPARM_MASK IOCPARM_MASK #define SIOC_VOID IOC_VOID #define SIOC_OUT IOC_OUT #define SIOC_IN IOC_IN #define SIOC_INOUT IOC_INOUT #define _SIOC_SIZE _IOC_SIZE #define _SIOC_DIR _IOC_DIR #define _SIOC_NONE _IOC_NONE #define _SIOC_READ _IOC_READ #define _SIOC_WRITE _IOC_WRITE #define _SIO _IO #define _SIOR _IOR #define _SIOW _IOW #define _SIOWR _IOWR #else /* Ioctl's have the command encoded in the lower word, * and the size of any in or out parameters in the upper * word. The high 2 bits of the upper word are used * to encode the in/out status of the parameter; for now * we restrict parameters to at most 8191 bytes. */ /* #define SIOCTYPE (0xff<<8) */ #define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */ #define SIOC_VOID 0x00000000 /* no parameters */ #define SIOC_OUT 0x20000000 /* copy out parameters */ #define SIOC_IN 0x40000000 /* copy in parameters */ #define SIOC_INOUT (SIOC_IN|SIOC_OUT) /* the 0x20000000 is so we can distinguish new ioctl's from old */ #define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y)) #define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) #define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) /* this should be _SIORW, but stdio got there first */ #define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y)) #define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK) #define _SIOC_DIR(x) (x & 0xf0000000) #define _SIOC_NONE SIOC_VOID #define _SIOC_READ SIOC_OUT #define _SIOC_WRITE SIOC_IN # endif /* _IOWR */ #endif /* !_SIOWR */ #define SNDCTL_SEQ_RESET _SIO ('Q', 0) #define SNDCTL_SEQ_SYNC _SIO ('Q', 1) #define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info) #define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */ #define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int) #define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int) #define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int) #define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */ #define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int) #define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int) #define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int) #define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int) #define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info) #define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int) #define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int) /* in=dev#, out=memsize */ #define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int) /* in=dev# */ #define SNDCTL_SEQ_PANIC _SIO ('Q',17) #define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec) #define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int) #define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info) #define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control) #define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample) typedef struct synth_control { int devno; /* Synthesizer # */ char data[4000]; /* Device spesific command/data record */ }synth_control; typedef struct remove_sample { int devno; /* Synthesizer # */ int bankno; /* MIDI bank # (0=General MIDI) */ int instrno; /* MIDI instrument number */ } remove_sample; typedef struct seq_event_rec { unsigned char arr[8]; } seq_event_rec; #define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int) #define SNDCTL_TMR_START _SIO ('T', 2) #define SNDCTL_TMR_STOP _SIO ('T', 3) #define SNDCTL_TMR_CONTINUE _SIO ('T', 4) #define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int) #define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int) # define TMR_INTERNAL 0x00000001 # define TMR_EXTERNAL 0x00000002 # define TMR_MODE_MIDI 0x00000010 # define TMR_MODE_FSK 0x00000020 # define TMR_MODE_CLS 0x00000040 # define TMR_MODE_SMPTE 0x00000080 #define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int) #define SNDCTL_TMR_SELECT _SIOW ('T', 8, int) /* * Some big endian/little endian handling macros */ #if defined(_AIX) || defined(AIX) || defined(sparc) || defined(HPPA) || defined(PPC) /* Big endian machines */ # define _PATCHKEY(id) (0xfd00|id) # define AFMT_S16_NE AFMT_S16_BE #else # define _PATCHKEY(id) ((id<<8)|0xfd) # define AFMT_S16_NE AFMT_S16_LE #endif /* * Sample loading mechanism for internal synthesizers (/dev/sequencer) * The following patch_info structure has been designed to support * Gravis UltraSound. It tries to be universal format for uploading * sample based patches but is probably too limited. * * (PBD) As Hannu guessed, the GUS structure is too limited for * the WaveFront, but this is the right place for a constant definition. */ struct patch_info { unsigned short key; /* Use WAVE_PATCH here */ #define WAVE_PATCH _PATCHKEY(0x04) #define GUS_PATCH WAVE_PATCH #define WAVEFRONT_PATCH _PATCHKEY(0x06) short device_no; /* Synthesizer number */ short instr_no; /* Midi pgm# */ unsigned int mode; /* * The least significant byte has the same format than the GUS .PAT * files */ #define WAVE_16_BITS 0x01 /* bit 0 = 8 or 16 bit wave data. */ #define WAVE_UNSIGNED 0x02 /* bit 1 = Signed - Unsigned data. */ #define WAVE_LOOPING 0x04 /* bit 2 = looping enabled-1. */ #define WAVE_BIDIR_LOOP 0x08 /* bit 3 = Set is bidirectional looping. */ #define WAVE_LOOP_BACK 0x10 /* bit 4 = Set is looping backward. */ #define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/ #define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */ #define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */ /* (use the env_rate/env_offs fields). */ /* Linux specific bits */ #define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */ #define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */ #define WAVE_SCALE 0x00040000 /* The scaling info is valid */ #define WAVE_FRACTIONS 0x00080000 /* Fraction information is valid */ /* Reserved bits */ #define WAVE_ROM 0x40000000 /* For future use */ #define WAVE_MULAW 0x20000000 /* For future use */ /* Other bits must be zeroed */ int len; /* Size of the wave data in bytes */ int loop_start, loop_end; /* Byte offsets from the beginning */ /* * The base_freq and base_note fields are used when computing the * playback speed for a note. The base_note defines the tone frequency * which is heard if the sample is played using the base_freq as the * playback speed. * * The low_note and high_note fields define the minimum and maximum note * frequencies for which this sample is valid. It is possible to define * more than one samples for an instrument number at the same time. The * low_note and high_note fields are used to select the most suitable one. * * The fields base_note, high_note and low_note should contain * the note frequency multiplied by 1000. For example value for the * middle A is 440*1000. */ unsigned int base_freq; unsigned int base_note; unsigned int high_note; unsigned int low_note; int panning; /* -128=left, 127=right */ int detuning; /* New fields introduced in version 1.99.5 */ /* Envelope. Enabled by mode bit WAVE_ENVELOPES */ unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */ unsigned char env_offset[ 6 ]; /* 255 == 100% */ /* * The tremolo, vibrato and scale info are not supported yet. * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or * WAVE_SCALE */ unsigned char tremolo_sweep; unsigned char tremolo_rate; unsigned char tremolo_depth; unsigned char vibrato_sweep; unsigned char vibrato_rate; unsigned char vibrato_depth; int scale_frequency; unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */ int volume; int fractions; int reserved1; int spare[2]; char data[1]; /* The waveform data starts here */ }; struct sysex_info { short key; /* Use SYSEX_PATCH or MAUI_PATCH here */ #define SYSEX_PATCH _PATCHKEY(0x05) #define MAUI_PATCH _PATCHKEY(0x06) short device_no; /* Synthesizer number */ int len; /* Size of the sysex data in bytes */ unsigned char data[1]; /* Sysex data starts here */ }; /* * /dev/sequencer input events. * * The data written to the /dev/sequencer is a stream of events. Events * are records of 4 or 8 bytes. The first byte defines the size. * Any number of events can be written with a write call. There * is a set of macros for sending these events. Use these macros if you * want to maximize portability of your program. * * Events SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO. Are also input events. * (All input events are currently 4 bytes long. Be prepared to support * 8 byte events also. If you receive any event having first byte >= 128, * it's a 8 byte event. * * The events are documented at the end of this file. * * Normal events (4 bytes) * There is also a 8 byte version of most of the 4 byte events. The * 8 byte one is recommended. */ #define SEQ_NOTEOFF 0 #define SEQ_FMNOTEOFF SEQ_NOTEOFF /* Just old name */ #define SEQ_NOTEON 1 #define SEQ_FMNOTEON SEQ_NOTEON #define SEQ_WAIT TMR_WAIT_ABS #define SEQ_PGMCHANGE 3 #define SEQ_FMPGMCHANGE SEQ_PGMCHANGE #define SEQ_SYNCTIMER TMR_START #define SEQ_MIDIPUTC 5 #define SEQ_DRUMON 6 /*** OBSOLETE ***/ #define SEQ_DRUMOFF 7 /*** OBSOLETE ***/ #define SEQ_ECHO TMR_ECHO /* For synching programs with output */ #define SEQ_AFTERTOUCH 9 #define SEQ_CONTROLLER 10 /******************************************* * Midi controller numbers ******************************************* * Controllers 0 to 31 (0x00 to 0x1f) and * 32 to 63 (0x20 to 0x3f) are continuous * controllers. * In the MIDI 1.0 these controllers are sent using * two messages. Controller numbers 0 to 31 are used * to send the MSB and the controller numbers 32 to 63 * are for the LSB. Note that just 7 bits are used in MIDI bytes. */ #define CTL_BANK_SELECT 0x00 #define CTL_MODWHEEL 0x01 #define CTL_BREATH 0x02 /* undefined 0x03 */ #define CTL_FOOT 0x04 #define CTL_PORTAMENTO_TIME 0x05 #define CTL_DATA_ENTRY 0x06 #define CTL_MAIN_VOLUME 0x07 #define CTL_BALANCE 0x08 /* undefined 0x09 */ #define CTL_PAN 0x0a #define CTL_EXPRESSION 0x0b /* undefined 0x0c */ /* undefined 0x0d */ /* undefined 0x0e */ /* undefined 0x0f */ #define CTL_GENERAL_PURPOSE1 0x10 #define CTL_GENERAL_PURPOSE2 0x11 #define CTL_GENERAL_PURPOSE3 0x12 #define CTL_GENERAL_PURPOSE4 0x13 /* undefined 0x14 - 0x1f */ /* undefined 0x20 */ /* The controller numbers 0x21 to 0x3f are reserved for the */ /* least significant bytes of the controllers 0x00 to 0x1f. */ /* These controllers are not recognised by the driver. */ /* Controllers 64 to 69 (0x40 to 0x45) are on/off switches. */ /* 0=OFF and 127=ON (intermediate values are possible) */ #define CTL_DAMPER_PEDAL 0x40 #define CTL_SUSTAIN 0x40 /* Alias */ #define CTL_HOLD 0x40 /* Alias */ #define CTL_PORTAMENTO 0x41 #define CTL_SOSTENUTO 0x42 #define CTL_SOFT_PEDAL 0x43 /* undefined 0x44 */ #define CTL_HOLD2 0x45 /* undefined 0x46 - 0x4f */ #define CTL_GENERAL_PURPOSE5 0x50 #define CTL_GENERAL_PURPOSE6 0x51 #define CTL_GENERAL_PURPOSE7 0x52 #define CTL_GENERAL_PURPOSE8 0x53 /* undefined 0x54 - 0x5a */ #define CTL_EXT_EFF_DEPTH 0x5b #define CTL_TREMOLO_DEPTH 0x5c #define CTL_CHORUS_DEPTH 0x5d #define CTL_DETUNE_DEPTH 0x5e #define CTL_CELESTE_DEPTH 0x5e /* Alias for the above one */ #define CTL_PHASER_DEPTH 0x5f #define CTL_DATA_INCREMENT 0x60 #define CTL_DATA_DECREMENT 0x61 #define CTL_NONREG_PARM_NUM_LSB 0x62 #define CTL_NONREG_PARM_NUM_MSB 0x63 #define CTL_REGIST_PARM_NUM_LSB 0x64 #define CTL_REGIST_PARM_NUM_MSB 0x65 /* undefined 0x66 - 0x78 */ /* reserved 0x79 - 0x7f */ /* Pseudo controllers (not midi compatible) */ #define CTRL_PITCH_BENDER 255 #define CTRL_PITCH_BENDER_RANGE 254 #define CTRL_EXPRESSION 253 /* Obsolete */ #define CTRL_MAIN_VOLUME 252 /* Obsolete */ #define SEQ_BALANCE 11 #define SEQ_VOLMODE 12 /* * Volume mode decides how volumes are used */ #define VOL_METHOD_ADAGIO 1 #define VOL_METHOD_LINEAR 2 /* * Note! SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO are used also as * input events. */ /* * Event codes 0xf0 to 0xfc are reserved for future extensions. */ #define SEQ_FULLSIZE 0xfd /* Long events */ /* * SEQ_FULLSIZE events are used for loading patches/samples to the * synthesizer devices. These events are passed directly to the driver * of the associated synthesizer device. There is no limit to the size * of the extended events. These events are not queued but executed * immediately when the write() is called (execution can take several * seconds of time). * * When a SEQ_FULLSIZE message is written to the device, it must * be written using exactly one write() call. Other events cannot * be mixed to the same write. * * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the * /dev/sequencer. Don't write other data together with the instrument structure * Set the key field of the structure to FM_PATCH. The device field is used to * route the patch to the corresponding device. * * For wave table use struct patch_info. Initialize the key field * to WAVE_PATCH. */ #define SEQ_PRIVATE 0xfe /* Low level HW dependent events (8 bytes) */ #define SEQ_EXTENDED 0xff /* Extended events (8 bytes) OBSOLETE */ /* * Record for FM patches */ typedef unsigned char sbi_instr_data[32]; struct sbi_instrument { unsigned short key; /* FM_PATCH or OPL3_PATCH */ #define FM_PATCH _PATCHKEY(0x01) #define OPL3_PATCH _PATCHKEY(0x03) short device; /* Synth# (0-4) */ int channel; /* Program# to be initialized */ sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */ }; struct synth_info { /* Read only */ char name[30]; int device; /* 0-N. INITIALIZE BEFORE CALLING */ int synth_type; #define SYNTH_TYPE_FM 0 #define SYNTH_TYPE_SAMPLE 1 #define SYNTH_TYPE_MIDI 2 /* Midi interface */ int synth_subtype; #define FM_TYPE_ADLIB 0x00 #define FM_TYPE_OPL3 0x01 #define MIDI_TYPE_MPU401 0x401 #define SAMPLE_TYPE_BASIC 0x10 #define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC #define SAMPLE_TYPE_WAVEFRONT 0x11 int perc_mode; /* No longer supported */ int nr_voices; int nr_drums; /* Obsolete field */ int instr_bank_size; unsigned int capabilities; #define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */ #define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */ #define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */ int dummies[19]; /* Reserve space */ }; struct sound_timer_info { char name[32]; int caps; }; #define MIDI_CAP_MPU401 1 /* MPU-401 intelligent mode */ struct midi_info { char name[30]; int device; /* 0-N. INITIALIZE BEFORE CALLING */ unsigned int capabilities; /* To be defined later */ int dev_type; int dummies[18]; /* Reserve space */ }; /******************************************** * ioctl commands for the /dev/midi## */ typedef struct { unsigned char cmd; char nr_args, nr_returns; unsigned char data[30]; } mpu_command_rec; #define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int) #define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int) #define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec) /******************************************** * IOCTL commands for /dev/dsp and /dev/audio */ #define SNDCTL_DSP_RESET _SIO ('P', 0) #define SNDCTL_DSP_SYNC _SIO ('P', 1) #define SNDCTL_DSP_SPEED _SIOWR('P', 2, int) #define SNDCTL_DSP_STEREO _SIOWR('P', 3, int) #define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int) #define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT #define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int) #define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS #define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int) #define SNDCTL_DSP_POST _SIO ('P', 8) #define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int) #define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int) /* Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */ #define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int) /* Returns a mask */ #define SNDCTL_DSP_SETFMT _SIOWR('P',5, int) /* Selects ONE fmt*/ # define AFMT_QUERY 0x00000000 /* Return current fmt */ # define AFMT_MU_LAW 0x00000001 # define AFMT_A_LAW 0x00000002 # define AFMT_IMA_ADPCM 0x00000004 # define AFMT_U8 0x00000008 # define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/ # define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */ # define AFMT_S8 0x00000040 # define AFMT_U16_LE 0x00000080 /* Little endian U16 */ # define AFMT_U16_BE 0x00000100 /* Big endian U16 */ # define AFMT_MPEG 0x00000200 /* MPEG (2) audio */ /* * Buffer status queries. */ typedef struct audio_buf_info { int fragments; /* # of available fragments (partially usend ones not counted) */ int fragstotal; /* Total # of fragments allocated */ int fragsize; /* Size of a fragment in bytes */ int bytes; /* Available space in bytes (includes partially used fragments) */ /* Note! 'bytes' could be more than fragments*fragsize */ } audio_buf_info; #define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info) #define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info) #define SNDCTL_DSP_NONBLOCK _SIO ('P',14) #define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int) # define DSP_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */ # define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ # define DSP_CAP_REALTIME 0x00000200 /* Real time capability */ # define DSP_CAP_BATCH 0x00000400 /* Device has some kind of */ /* internal buffers which may */ /* cause some delays and */ /* decrease precision of timing */ # define DSP_CAP_COPROC 0x00000800 /* Has a coprocessor */ /* Sometimes it's a DSP */ /* but usually not */ # define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ # define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */ #define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int) #define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int) # define PCM_ENABLE_INPUT 0x00000001 # define PCM_ENABLE_OUTPUT 0x00000002 typedef struct count_info { int bytes; /* Total # of bytes processed */ int blocks; /* # of fragment transitions since last time */ int ptr; /* Current DMA pointer value */ } count_info; #define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info) #define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info) typedef struct buffmem_desc { unsigned *buffer; int size; } buffmem_desc; #define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc) #define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc) #define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21) #define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22) #define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int) /* * Application's profile defines the way how playback underrun situations should be handled. * * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the * playback buffer whenever an underrun occurs. This consumes some time * prevents looping the existing buffer. * APF_CPUINTENS is intended to be set by CPU intensive applications which * are likely to run out of time occasionally. In this mode the buffer cleanup is * disabled which saves CPU time but also let's the previous buffer content to * be played during the "pause" after the underrun. */ #define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int) #define APF_NORMAL 0 /* Normal applications */ #define APF_NETWORK 1 /* Underruns probably caused by an "external" delay */ #define APF_CPUINTENS 2 /* Underruns probably caused by "overheating" the CPU */ #define SOUND_PCM_READ_RATE _SIOR ('P', 2, int) #define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int) #define SOUND_PCM_READ_BITS _SIOR ('P', 5, int) #define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int) /* Some alias names */ #define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT #define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED #define SOUND_PCM_POST SNDCTL_DSP_POST #define SOUND_PCM_RESET SNDCTL_DSP_RESET #define SOUND_PCM_SYNC SNDCTL_DSP_SYNC #define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE #define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT #define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS #define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT #define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE #define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE #define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK #define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS #define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER #define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER #define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO #define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR #define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR #define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF #define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF /* * ioctl calls to be used in communication with coprocessors and * DSP chips. */ typedef struct copr_buffer { int command; /* Set to 0 if not used */ int flags; #define CPF_NONE 0x0000 #define CPF_FIRST 0x0001 /* First block */ #define CPF_LAST 0x0002 /* Last block */ int len; int offs; /* If required by the device (0 if not used) */ unsigned char data[4000]; /* NOTE! 4000 is not 4k */ } copr_buffer; typedef struct copr_debug_buf { int command; /* Used internally. Set to 0 */ int parm1; int parm2; int flags; int len; /* Length of data in bytes */ } copr_debug_buf; typedef struct copr_msg { int len; unsigned char data[4000]; } copr_msg; #define SNDCTL_COPR_RESET _SIO ('C', 0) #define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer) #define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf) #define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf) #define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf) #define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf) #define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf) #define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf) #define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg) #define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg) /********************************************* * IOCTL commands for /dev/mixer */ /* * Mixer devices * * There can be up to 20 different analog mixer channels. The * SOUND_MIXER_NRDEVICES gives the currently supported maximum. * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells * the devices supported by the particular mixer. */ #define SOUND_MIXER_NRDEVICES 25 #define SOUND_MIXER_VOLUME 0 #define SOUND_MIXER_BASS 1 #define SOUND_MIXER_TREBLE 2 #define SOUND_MIXER_SYNTH 3 #define SOUND_MIXER_PCM 4 #define SOUND_MIXER_SPEAKER 5 #define SOUND_MIXER_LINE 6 #define SOUND_MIXER_MIC 7 #define SOUND_MIXER_CD 8 #define SOUND_MIXER_IMIX 9 /* Recording monitor */ #define SOUND_MIXER_ALTPCM 10 #define SOUND_MIXER_RECLEV 11 /* Recording level */ #define SOUND_MIXER_IGAIN 12 /* Input gain */ #define SOUND_MIXER_OGAIN 13 /* Output gain */ /* * The AD1848 codec and compatibles have three line level inputs * (line, aux1 and aux2). Since each card manufacturer have assigned * different meanings to these inputs, it's inpractical to assign * specific meanings (line, cd, synth etc.) to them. */ #define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */ #define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */ #define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */ #define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */ #define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */ #define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */ #define SOUND_MIXER_PHONEIN 20 /* Phone input */ #define SOUND_MIXER_PHONEOUT 21 /* Phone output */ #define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */ #define SOUND_MIXER_RADIO 23 /* Radio in */ #define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */ /* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */ /* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */ #define SOUND_ONOFF_MIN 28 #define SOUND_ONOFF_MAX 30 /* Note! Number 31 cannot be used since the sign bit is reserved */ #define SOUND_MIXER_NONE 31 /* * The following unsupported macros are no longer functional. * Use SOUND_MIXER_PRIVATE# macros in future. */ #define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE #define SOUND_MIXER_MUTE SOUND_MIXER_NONE #define SOUND_MIXER_LOUD SOUND_MIXER_NONE #define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \ "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \ "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \ "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"} #define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \ "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \ "line1", "line2", "line3", "dig1", "dig2", "dig3", \ "phin", "phout", "video", "radio", "monitor"} /* Device bitmask identifiers */ #define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */ #define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */ #define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */ #define SOUND_MIXER_CAPS 0xfc # define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */ #define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */ #define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */ #define SOUND_MIXER_OUTMASK 0xf9 /* Arg contains a bit for each supported input source to output */ /* Device mask bits */ #define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME) #define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS) #define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE) #define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH) #define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM) #define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER) #define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE) #define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC) #define SOUND_MASK_CD (1 << SOUND_MIXER_CD) #define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX) #define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM) #define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV) #define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN) #define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN) #define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1) #define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2) #define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3) #define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1) #define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2) #define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3) #define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN) #define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT) #define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO) #define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO) #define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR) /* Obsolete macros */ #define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE) #define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE) #define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD) #define MIXER_READ(dev) _SIOR('M', dev, int) #define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME) #define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS) #define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE) #define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH) #define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM) #define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER) #define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE) #define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC) #define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD) #define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX) #define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM) #define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV) #define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN) #define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN) #define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1) #define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2) #define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3) /* Obsolete macros */ #define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE) #define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE) #define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD) #define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC) #define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK) #define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK) #define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS) #define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS) #define MIXER_WRITE(dev) _SIOWR('M', dev, int) #define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME) #define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS) #define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE) #define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH) #define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM) #define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER) #define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE) #define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC) #define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD) #define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX) #define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM) #define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV) #define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN) #define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN) #define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1) #define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2) #define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3) /* Obsolete macros */ #define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE) #define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE) #define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD) #define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC) typedef struct mixer_info { char id[16]; char name[32]; int modify_counter; int fillers[10]; } mixer_info; typedef struct _old_mixer_info /* Obsolete */ { char id[16]; char name[32]; } _old_mixer_info; #define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info) #define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info) /* * A mechanism for accessing "proprietary" mixer features. This method * permits passing 128 bytes of arbitrary data between a mixer application * and the mixer driver. Interpretation of the record is defined by * the particular mixer driver. */ typedef unsigned char mixer_record[128]; #define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record) /* * Two ioctls for special souncard function */ #define SOUND_MIXER_AGC _SIOWR('M', 103, int) #define SOUND_MIXER_3DSE _SIOWR('M', 104, int) /* * The SOUND_MIXER_PRIVATE# commands can be redefined by low level drivers. * These features can be used when accessing device specific features. */ #define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int) #define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int) #define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int) #define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int) #define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int) /* * SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls can be used * for querying current mixer settings from the driver and for loading * default volume settings _prior_ activating the mixer (loading * doesn't affect current state of the mixer hardware). These calls * are for internal use only. */ typedef struct mixer_vol_table { int num; /* Index to volume table */ char name[32]; int levels[32]; } mixer_vol_table; #define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table) #define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table) /* * An ioctl for identifying the driver version. It will return value * of the SOUND_VERSION macro used when compiling the driver. * This call was introduced in OSS version 3.6 and it will not work * with earlier versions (returns EINVAL). */ #define OSS_GETVERSION _SIOR ('M', 118, int) /* * Level 2 event types for /dev/sequencer */ /* * The 4 most significant bits of byte 0 specify the class of * the event: * * 0x8X = system level events, * 0x9X = device/port specific events, event[1] = device/port, * The last 4 bits give the subtype: * 0x02 = Channel event (event[3] = chn). * 0x01 = note event (event[4] = note). * (0x01 is not used alone but always with bit 0x02). * event[2] = MIDI message code (0x80=note off etc.) * */ #define EV_SEQ_LOCAL 0x80 #define EV_TIMING 0x81 #define EV_CHN_COMMON 0x92 #define EV_CHN_VOICE 0x93 #define EV_SYSEX 0x94 /* * Event types 200 to 220 are reserved for application use. * These numbers will not be used by the driver. */ /* * Events for event type EV_CHN_VOICE */ #define MIDI_NOTEOFF 0x80 #define MIDI_NOTEON 0x90 #define MIDI_KEY_PRESSURE 0xA0 /* * Events for event type EV_CHN_COMMON */ #define MIDI_CTL_CHANGE 0xB0 #define MIDI_PGM_CHANGE 0xC0 #define MIDI_CHN_PRESSURE 0xD0 #define MIDI_PITCH_BEND 0xE0 #define MIDI_SYSTEM_PREFIX 0xF0 /* * Timer event types */ #define TMR_WAIT_REL 1 /* Time relative to the prev time */ #define TMR_WAIT_ABS 2 /* Absolute time since TMR_START */ #define TMR_STOP 3 #define TMR_START 4 #define TMR_CONTINUE 5 #define TMR_TEMPO 6 #define TMR_ECHO 8 #define TMR_CLOCK 9 /* MIDI clock */ #define TMR_SPP 10 /* Song position pointer */ #define TMR_TIMESIG 11 /* Time signature */ /* * Local event types */ #define LOCL_STARTAUDIO 1 #if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) /* * Some convenience macros to simplify programming of the * /dev/sequencer interface * * These macros define the API which should be used when possible. */ #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF() void seqbuf_dump(void); /* This function must be provided by programs */ extern int OSS_init(int seqfd, int buflen); extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen); extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen); extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen); extern void OSS_patch_caching(int dev, int chn, int patch, int fd, unsigned char *buf, int buflen); extern void OSS_drum_caching(int dev, int chn, int patch, int fd, unsigned char *buf, int buflen); extern void OSS_write_patch(int fd, unsigned char *buf, int len); extern int OSS_write_patch2(int fd, unsigned char *buf, int len); #define SEQ_PM_DEFINES int __foo_bar___ #ifdef OSSLIB # define SEQ_USE_EXTBUF() \ extern unsigned char *_seqbuf; \ extern int _seqbuflen;extern int _seqbufptr # define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len # define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen) # define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen) # define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen) # define SEQ_LOAD_GMINSTR(dev, instr) \ OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen) # define SEQ_LOAD_GMDRUM(dev, drum) \ OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen) #else /* !OSSLIB */ # define SEQ_LOAD_GMINSTR(dev, instr) # define SEQ_LOAD_GMDRUM(dev, drum) # define SEQ_USE_EXTBUF() \ extern unsigned char _seqbuf[]; \ extern int _seqbuflen;extern int _seqbufptr #ifndef USE_SIMPLE_MACROS /* Sample seqbuf_dump() implementation: * * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes * * int seqfd; -- The file descriptor for /dev/sequencer. * * void * seqbuf_dump () * { * if (_seqbufptr) * if (write (seqfd, _seqbuf, _seqbufptr) == -1) * { * perror ("write /dev/sequencer"); * exit (-1); * } * _seqbufptr = 0; * } */ #define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0 #define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump() #define _SEQ_ADVBUF(len) _seqbufptr += len #define SEQ_DUMPBUF seqbuf_dump #else /* * This variation of the sequencer macros is used just to format one event * using fixed buffer. * * The program using the macro library must define the following macros before * using this library. * * #define _seqbuf name of the buffer (unsigned char[]) * #define _SEQ_ADVBUF(len) If the applic needs to know the exact * size of the event, this macro can be used. * Otherwise this must be defined as empty. * #define _seqbufptr Define the name of index variable or 0 if * not required. */ #define _SEQ_NEEDBUF(len) /* empty */ #endif #endif /* !OSSLIB */ #define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\ _seqbuf[_seqbufptr+2] = (dev);\ _seqbuf[_seqbufptr+3] = (mode);\ _seqbuf[_seqbufptr+4] = 0;\ _seqbuf[_seqbufptr+5] = 0;\ _seqbuf[_seqbufptr+6] = 0;\ _seqbuf[_seqbufptr+7] = 0;\ _SEQ_ADVBUF(8);} /* * Midi voice messages */ #define _CHN_VOICE(dev, event, chn, note, parm) \ {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = EV_CHN_VOICE;\ _seqbuf[_seqbufptr+1] = (dev);\ _seqbuf[_seqbufptr+2] = (event);\ _seqbuf[_seqbufptr+3] = (chn);\ _seqbuf[_seqbufptr+4] = (note);\ _seqbuf[_seqbufptr+5] = (parm);\ _seqbuf[_seqbufptr+6] = (0);\ _seqbuf[_seqbufptr+7] = 0;\ _SEQ_ADVBUF(8);} #define SEQ_START_NOTE(dev, chn, note, vol) \ _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) #define SEQ_STOP_NOTE(dev, chn, note, vol) \ _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) #define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \ _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure) /* * Midi channel messages */ #define _CHN_COMMON(dev, event, chn, p1, p2, w14) \ {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = EV_CHN_COMMON;\ _seqbuf[_seqbufptr+1] = (dev);\ _seqbuf[_seqbufptr+2] = (event);\ _seqbuf[_seqbufptr+3] = (chn);\ _seqbuf[_seqbufptr+4] = (p1);\ _seqbuf[_seqbufptr+5] = (p2);\ *(short *)&_seqbuf[_seqbufptr+6] = (w14);\ _SEQ_ADVBUF(8);} /* * SEQ_SYSEX permits sending of sysex messages. (It may look that it permits * sending any MIDI bytes but it's absolutely not possible. Trying to do * so _will_ cause problems with MPU401 intelligent mode). * * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be * sent by calling SEQ_SYSEX() several times (there must be no other events * between them). First sysex fragment must have 0xf0 in the first byte * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte * between these sysex start and end markers cannot be larger than 0x7f. Also * lengths of each fragments (except the last one) must be 6. * * Breaking the above rules may work with some MIDI ports but is likely to * cause fatal problems with some other devices (such as MPU401). */ #define SEQ_SYSEX(dev, buf, len) \ {int ii, ll=(len); \ unsigned char *bufp=buf;\ if (ll>6)ll=6;\ _SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = EV_SYSEX;\ _seqbuf[_seqbufptr+1] = (dev);\ for(ii=0;ii>8)&0xff);\ _seqbuf[_seqbufptr+7] = 0;\ _SEQ_ADVBUF(8);} /* * The following 5 macros are incorrectly implemented and obsolete. * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead. */ #define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) #define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128) #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100) #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) /* * Timing and syncronization macros */ #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr+0] = EV_TIMING; \ _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0) #define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0) #define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0) #define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks) #define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks) #define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key) #define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value) #define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos) #define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig) /* * Local control events */ #define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask) /* * Events for the level 1 interface only */ #define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\ _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\ _seqbuf[_seqbufptr+1] = (byte);\ _seqbuf[_seqbufptr+2] = (device);\ _seqbuf[_seqbufptr+3] = 0;\ _SEQ_ADVBUF(4);} /* * Patch loading. */ #ifdef OSSLIB # define SEQ_WRPATCH(patchx, len) \ OSS_write_patch(seqfd, (char*)(patchx), len) # define SEQ_WRPATCH2(patchx, len) \ OSS_write_patch2(seqfd, (char*)(patchx), len) #else # define SEQ_WRPATCH(patchx, len) \ {if (_seqbufptr) SEQ_DUMPBUF();\ if (write(seqfd, (char*)(patchx), len)==-1) \ perror("Write patch: /dev/sequencer");} # define SEQ_WRPATCH2(patchx, len) \ (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len)) #endif #endif #endif DBMix-0.9.8/dbaudiolib/0000777000076400007640000000000007436306702010355 5DBMix-0.9.8/dbaudiolib/Makefile.in0000664000076400007640000003203607436306702012344 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ libdbaudiolibincludedir = $(includedir)/dbmix CFLAGS = -I../include @DBMIX_DEBUG@ -O3 lib_LTLIBRARIES = libdbaudiolib.la libdbaudiolib_la_LDFLAGS = -export-dynamic -version-info 1:1:1 libdbaudiolib_la_LIBADD = @GTK_LIBS@ @DGA_LIBS@ @VM_LIBS@ @POSIX_LIBS@ INCLUDES = @GTK_CFLAGS@ libdbaudiolib_la_SOURCES = debug.c DBAudio_IPC.c DBAudio_Init.c DBAudio_Close.c DBAudio_Get_Version.c DBAudio_Ready.c DBAudio_Volume.c DBAudio_Rate.c DBAudio_Channels.c DBAudio_Format.c DBAudio_Cue.c DBAudio_Pause.c DBAudio_Write.c DBAudio_Read.c DBAudio_Channel_Name.c DBAudio_Channel_Type.c DBAudio_Channel_Flags.c DBAudio_Get_Bufsize.c DBAudio_perror.c DBAudio_Mute.c DBAudio_Sampler.c dbaudiolib.c prototypes.h #dbaudiolib.h channel.h debug.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libdbaudiolib_la_DEPENDENCIES = libdbaudiolib_la_OBJECTS = debug.lo DBAudio_IPC.lo DBAudio_Init.lo \ DBAudio_Close.lo DBAudio_Get_Version.lo DBAudio_Ready.lo \ DBAudio_Volume.lo DBAudio_Rate.lo DBAudio_Channels.lo DBAudio_Format.lo \ DBAudio_Cue.lo DBAudio_Pause.lo DBAudio_Write.lo DBAudio_Read.lo \ DBAudio_Channel_Name.lo DBAudio_Channel_Type.lo \ DBAudio_Channel_Flags.lo DBAudio_Get_Bufsize.lo DBAudio_perror.lo \ DBAudio_Mute.lo DBAudio_Sampler.lo dbaudiolib.lo COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(libdbaudiolib_la_SOURCES) OBJECTS = $(libdbaudiolib_la_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps dbaudiolib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) distclean-libLTLIBRARIES: maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: libdbaudiolib.la: $(libdbaudiolib_la_OBJECTS) $(libdbaudiolib_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libdbaudiolib_la_LDFLAGS) $(libdbaudiolib_la_OBJECTS) $(libdbaudiolib_la_LIBADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = dbaudiolib distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done DBAudio_Channel_Flags.lo DBAudio_Channel_Flags.o : \ DBAudio_Channel_Flags.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Channel_Name.lo DBAudio_Channel_Name.o : DBAudio_Channel_Name.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Channel_Type.lo DBAudio_Channel_Type.o : DBAudio_Channel_Type.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Channels.lo DBAudio_Channels.o : DBAudio_Channels.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Close.lo DBAudio_Close.o : DBAudio_Close.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Cue.lo DBAudio_Cue.o : DBAudio_Cue.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Format.lo DBAudio_Format.o : DBAudio_Format.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Get_Bufsize.lo DBAudio_Get_Bufsize.o : DBAudio_Get_Bufsize.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Get_Version.lo DBAudio_Get_Version.o : DBAudio_Get_Version.c \ ../include/dbaudiolib.h DBAudio_IPC.lo DBAudio_IPC.o : DBAudio_IPC.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Init.lo DBAudio_Init.o : DBAudio_Init.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Mute.lo DBAudio_Mute.o : DBAudio_Mute.c ../include/dbaudiolib.h \ ../include/dbchannel.h ../include/dbsoundcard.h DBAudio_Pause.lo DBAudio_Pause.o : DBAudio_Pause.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Rate.lo DBAudio_Rate.o : DBAudio_Rate.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Read.lo DBAudio_Read.o : DBAudio_Read.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h DBAudio_Ready.lo DBAudio_Ready.o : DBAudio_Ready.c \ ../include/dbaudiolib.h ../include/dbchannel.h \ ../include/dbsoundcard.h DBAudio_Sampler.lo DBAudio_Sampler.o : DBAudio_Sampler.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_Volume.lo DBAudio_Volume.o : DBAudio_Volume.c \ ../include/dbaudiolib.h ../include/dbchannel.h \ ../include/dbsoundcard.h DBAudio_Write.lo DBAudio_Write.o : DBAudio_Write.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h DBAudio_perror.lo DBAudio_perror.o : DBAudio_perror.c \ ../include/dbsoundcard.h ../include/dbchannel.h \ ../include/dbaudiolib.h ../include/dbdebug.h prototypes.h dbaudiolib.lo dbaudiolib.o : dbaudiolib.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h prototypes.h debug.lo debug.o : debug.c ../include/dbdebug.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-libLTLIBRARIES install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-libLTLIBRARIES uninstall: uninstall-am all-am: Makefile $(LTLIBRARIES) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile \ mostlyclean-libtool distclean-libtool clean-libtool \ maintainer-clean-libtool tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean #libdbaudiolibinclude_HEADERS = dbaudiolib.h channel.h debug.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/dbaudiolib/Makefile.am0000644000076400007640000000174307414416632012332 libdbaudiolibincludedir = $(includedir)/dbmix CFLAGS = -I../include @DBMIX_DEBUG@ -O3 lib_LTLIBRARIES = libdbaudiolib.la libdbaudiolib_la_LDFLAGS = -export-dynamic -version-info 1:1:1 libdbaudiolib_la_LIBADD = @GTK_LIBS@ @DGA_LIBS@ @VM_LIBS@ @POSIX_LIBS@ INCLUDES = @GTK_CFLAGS@ libdbaudiolib_la_SOURCES = debug.c \ DBAudio_IPC.c \ DBAudio_Init.c \ DBAudio_Close.c \ DBAudio_Get_Version.c \ DBAudio_Ready.c \ DBAudio_Volume.c \ DBAudio_Rate.c \ DBAudio_Channels.c \ DBAudio_Format.c \ DBAudio_Cue.c \ DBAudio_Pause.c \ DBAudio_Write.c \ DBAudio_Read.c \ DBAudio_Channel_Name.c \ DBAudio_Channel_Type.c \ DBAudio_Channel_Flags.c \ DBAudio_Get_Bufsize.c \ DBAudio_perror.c \ DBAudio_Mute.c \ DBAudio_Sampler.c \ dbaudiolib.c \ prototypes.h #dbaudiolib.h channel.h debug.h #libdbaudiolibinclude_HEADERS = dbaudiolib.h channel.h debug.h DBMix-0.9.8/dbaudiolib/debug.c0000644000076400007640000000322307346372414011526 /* implementation of debug.h AUthor: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include int debug_level; static char tempstr[1024]; /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ void Error(const char*fmt, ...) { va_list args; va_start(args, fmt); vsprintf(tempstr,fmt,args); perror(tempstr); va_end(args); } void Debug ( const char *fmt, ...) { if(debug_level) { va_list args; va_start(args, fmt); fflush(stdout); /* fprintf(stdout,"dbfsd.c: "); */ vfprintf(stdout, fmt, args); fprintf(stdout,"\n"); fflush(stdout); va_end(args); } } int Check_Debug() { return debug_level; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_IPC.c0000644000076400007640000001117007434135617012402 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ int DBAudio_Set_Message_Handler(void(*message_handler)(dbfsd_msg msg), int msg_flags) { if (ch == NULL) {errno = ERROR_NOT_INITIALIZED; return FAILURE;} ch->message_handler = message_handler; ch->msg_flags = msg_flags; /* do not allow pause messages to be requested if the device does not support pausing */ return SUCCESS; } /* handles message sent to DBAudioLib by outside sources. */ int DBAudio_Handle_Message_Queue() { dbfsd_msg msg; if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } if (ch->msg_q_id == -1) { return SUCCESS; } while (msgrcv(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),0,IPC_NOWAIT) != -1) { /* if the client has asked for this message, send it */ if (ch->msg_flags & msg.msg_type) { if (ch->message_handler != NULL) { Debug("dbaudiolib: passing message %d to client",msg.msg_type); (ch->message_handler)((dbfsd_msg)msg); } } else { /* hanle message internally */ switch (msg.msg_type) { case DBMSG_NONE: break; case DBMSG_MUTE: Debug("dbaudiolib: got MUTE message."); ch->mute = 1; break; case DBMSG_UNMUTE: Debug("dbaudiolib: got UNMUTE message."); ch->mute = 0; break; case DBMSG_PAUSE: Debug("dbaudiolib: got PAUSE message. waiting for unpause..."); if (!(PAUSE_ENABLED)) break; DBAudio_Pause(TRUE); break; case DBMSG_UNPAUSE: Debug("dbaudiolib: got UNPAUSE message."); if (!(PAUSE_ENABLED)) break; DBAudio_Pause(FALSE); break; case DBMSG_PLAY: Debug("dbaudiolib: got PLAY message."); break; case DBMSG_STOP: Debug("dbaudiolib: got STOP message."); break; case DBMSG_EJECT: Debug("dbaudiolib: got EJECT message."); break; case DBMSG_REWIND: Debug("dbaudiolib: got REWIND message."); break; case DBMSG_FFORWARD: Debug("dbaudiolib: got FFORWARD message."); break; case DBMSG_NEXT: Debug("dbaudiolib: got NEXT message."); break; case DBMSG_PREV: Debug("dbaudiolib: got PREV message."); break; case DBMSG_SAMPLERSIZE: Debug("dbaudiolib: got SAMPLERSIZE message."); break; case DBMSG_SAMPLERSAVE: Debug("dbaudiolib: got SAVE message."); DBAudio_Sampler_Save(sysdata->filename); break; case DBMSG_SAMPLERLOAD: Debug("dbaudiolib: got LOAD message."); DBAudio_Sampler_Load(sysdata->filename); break; case DBMSG_SAMPLERREC: Debug("dbaudiolib: got REC message."); DBAudio_Sampler_Record(); break; case DBMSG_SAMPLERSTOP: Debug("dbaudiolib: got STOP message."); DBAudio_Sampler_Stop(); break; case DBMSG_SAMPLERLOOP: Debug("dbaudiolib: got LOOP message."); DBAudio_Sampler_Loop(); break; case DBMSG_SAMPLERONCE: Debug("dbaudiolib: got ONCE message."); DBAudio_Sampler_Single(); break; default: Error("DBAudioLib: Handle_Message_Queue: unknown message type: %l\n",msg.msg_type); break; } } } return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Init.c0000644000076400007640000002352507414414176012677 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ int shmid, sysshmid; dbfsd_data * sysdata = NULL; local_channel * local_channels = NULL; /* static local_channel * cue_channels; */ local_channel * ch = NULL; /* variables to describe the input audio stream */ int format; int sample_rate; int num_channels; int paused; /* globally static audio write variables */ float local_pitch; float sample1, sample2; float float_index; int sampleindex; int outlen; signed short output_buf[OUTPUT_BUFSIZE]; /* buffer used to hold main output to dbfsd */ signed short cue_buf[OUTPUT_BUFSIZE]; /* buffer used to hold cue output to dbfsd */ signed short conv_buf[OUTPUT_BUFSIZE]; /* buffer used to hold format converted input */ extern int errno; extern int debug_level; /* declared in debug module */ /* DBAudio_Init - initializes this instance. If an error occurs, returns FAILURE otherwise, returns SUCCESS. Parameters: fmt - format of input data (see OSS Programmer's Manual http://www.opensound.com/pguide/index.html) rte - input data rate expressed as a whole integer. i.e. 44.1 kHz = 44100 numch - number of channels in the input data type - DBMix channel type, see enum channel_type_e in channel.h chindex - if 0 returns the first available channel, otherwise tries to use the channel associated with (chindex -1). If this channel is not free, FAILURE is returned. Pre Condition: - None Post Condition - Shared memory channel data created by dbfsd is attached to this process.. - From this data, determine the next free/unused channel. The pointer to this channel is stored in the static global ch variable. - Open communication and signal pipes for communicating with dbfsd Note: this function makes use of goto statements. More specifically, a label called cleanup exists at the end of the function allowing a single cleanup point in the function. This is a result of the coding standards my group at work enforces. Despite what you were taught about the evils of goto, this method of their use makes the code cleaner and more elegant, otherwise the exact same shmdt() statements would be scattered half a dozen times through out the code. The single "goto cleanup" line replaces 4-10 lines of repetitive cleanup code each time it is used. */ int DBAudio_Init(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex) { char init_buffer[PIPE_BUF]; int templen; #ifdef DBMIX_DEBUG debug_level = 1; #else debug_level = 0; #endif /* init errno to SUCCESS to maintain error state */ errno = SUCCESS; if (ch != NULL) { goto cleanup; } if (local_channels != NULL) { goto cleanup; } if (sysdata != NULL) { goto cleanup; } /* init variables used by DBAudio_Write() */ local_pitch = 1.0; sample1 = sample2 = 0.0; float_index = 0.0; sampleindex = 0; outlen = 0; /* verify format */ if (fmt != 0) { format = fmt; } else { format = AFMT_S16_NE; } /* verify sample rate */ if (rte == 0) { sample_rate = DB_SAMPLE_RATE; } else { if ((rte >= 8000) && (rte < 49000)) { sample_rate = rte; } else { errno = ERROR_BAD_SAMPLERATE; goto cleanup; } } /* verify number of channels */ switch(numch) { case 0: num_channels = 2; break; /* default to stereo */ case 1: num_channels = 1; break; /* mono */ case 2: num_channels = 2; break; /* stereo */ default: errno = ERROR_BAD_NUMCH; goto cleanup; } /* Get system data */ { sysshmid = shmget((key_t) DB_SYSTEM_SM_KEY, sizeof(dbfsd_data), 0666 | O_RDWR ); if (sysshmid == -1) { Error("DBAudioLib ERROR: could not create shared memory for system data.\n Is dbfsd running?"); errno = ERROR_INIT_FAILURE; goto cleanup; } sysdata = shmat(sysshmid,(void *)0, 0); if ((int)sysdata == -1) { Error("DBAudioLib ERROR: error attaching system data shared memory."); errno = ERROR_INIT_FAILURE; goto cleanup; } /* verify that there is a free channel into dbfsd */ if (sysdata->free_channel_index == -1) { ch = NULL; Error("DBAudio_Init: no free channels."); if (shmdt(sysdata) == -1) { Error("DBAudio_Init: could not detach system data memory segment."); errno = ERROR_INIT_FAILURE; goto cleanup; } errno = ERROR_NO_FREE_CHANNELS; goto cleanup; } } /* End get system data */ /* retrieve the channel memory id */ { shmid = shmget((key_t) DB_CHANNELS_SM_KEY, (sysdata->num_channels * sizeof(local_channel)), 0666); if (shmid == -1) { Error("DBAudioLib ERROR: error creating channel shared memory."); errno = ERROR_INIT_FAILURE; goto cleanup; } else { Debug("DBAudioLib: shmid is: %d ",shmid); } /* attach the channel memory segment*/ local_channels = (local_channel *) shmat(shmid,(void *)0, 0); if ((int)local_channels == -1) { Error("DBAudioLib ERROR: error attaching channel shared memory."); errno = ERROR_INIT_FAILURE; goto cleanup; } /* get channel id */ if (chindex == 0) { ch = &(local_channels[sysdata->free_channel_index]); } else { /* chindex is begins at 1, so decrement to directly reference the channel array */ chindex--; if ((chindex < 0) || (chindex > sysdata->num_channels)) { errno = ERROR_BAD_CHANNEL_ID; goto cleanup; } if (local_channels[chindex].free_channel) { ch = &(local_channels[chindex]); } } Debug("DBAudioLib: opening comm pipe: %s",ch->comm_filename); /* open comm pipe to server */ if ((ch->client_comm_fd = open(ch->comm_filename, O_WRONLY)) == -1) { Debug("%s",ch->comm_filename); DBAudio_perror("DBAudioLib: Error opening comm pipe."); errno = ERROR_INIT_FAILURE; goto cleanup; } Debug("comm fd is: %d\n",ch->client_comm_fd); if (CUE_ENABLED) { printf("flags is %d\n",ch->channel_flags); /* open cue_pipe to be NON BLOCKING -- very important since the server does not check the cue channel with its select() call*/ Debug("DBAudioLib: opening cue pipe: %s",ch->cue_filename); if ((ch->client_cue_fd = open(ch->cue_filename, O_WRONLY | O_NONBLOCK)) == -1) { Debug("%s",ch->cue_filename); DBAudio_perror("DBAudioLib: Error opening cue pipe."); errno = ERROR_INIT_FAILURE; goto cleanup; } Debug("Cue fd is: %d\n",ch->client_cue_fd); } ch->left_gain = DEFAULT_GAIN; ch->right_gain = DEFAULT_GAIN; ch->cue = FALSE; ch->channel_type = type; ch->base_pitch = DEFAULT_PITCH; switch(ch->channel_type) { case PIPE_CHANNEL: Debug("DBAudioLib: Channel type: PIPE CHANNEL"); break; default: break; } /* update channel name check against 48 to allow for channel index */ DBAudio_Set_Channel_Name(name); } /* end retrieve the channel memory id */ DBAudio_Set_Rate(rte); /* clear msg queue */ if (ch->msg_q_id != -1) { dbfsd_msg msg; while (msgrcv(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),0,IPC_NOWAIT) != -1) { Debug("DBAudio_Init: cleared message %d",msg.msg_type); } } /* init message handler to NULL */ ch->message_handler = NULL; /* init sample buffer */ { ch->sampler_state = SAMPLER_OFF; ch->sampler_bufsize = (ch->sampler_time /* number of seconds */ * (DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS) /* size of 1 stereo sample */ * DB_SAMPLE_RATE); /* num samples per second */ ch->sampler_size = 0; ch->sampler_readoffset = 0; ch->sampler_startoffset = 0; ch->sampler_buf = (char *) malloc(ch->sampler_bufsize); Debug("sampler bufsize is: %d",ch->sampler_bufsize); } /* write an empty buffer to the mixer to init this channel */ { memset(init_buffer,0,PIPE_BUF); ch->cue = TRUE; Debug("writing init buffer... \n"); templen = PIPE_BUF; if (DBAudio_Write(init_buffer,templen) == FAILURE) { DBAudio_perror("Error writing init data to channel:: "); } Debug("done\n"); ch->cue = FALSE; Debug("DBAudioLib: dbaudio_init complete."); } cleanup: /* ENOMSG is a side effect of opening/clearing the message queue, so remap it */ if (errno == ENOMSG) errno = SUCCESS; /* if error, retur to initial state */ if (errno != SUCCESS) { ch = NULL; if (local_channels != NULL) { shmdt(local_channels); } if (sysdata != NULL) { shmdt(sysdata); } return FAILURE; } return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Close.c0000644000076400007640000000462507346372414013043 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ /* DBAudio_Close - closes this instance and frees all resources. */ int DBAudio_Close() { int error; error = SUCCESS; Debug("DBAudioLib: freeing sampler buffer..."); if (ch->sampler_buf != NULL) { free(ch->sampler_buf); } Debug("DBAudioLib: deleteing shared memory segment for channel data... "); /* close pipes */ if(ch != NULL) { close(ch->client_comm_fd); if(DBAudio_Cue_Enabled()) { close(ch->client_cue_fd); } } ch = NULL; /* detach channel memory segment */ if(shmdt(local_channels) == -1) { Error("DBAudioLib: could not detach channel memory segment."); error = FAILURE; } local_channels = NULL; Debug("DBAudioLib: deleteing system data shared memory segment... "); /* detach system data memory segment */ if(shmdt(sysdata) == -1) { Error("DBAudioLib: could not detach system data memory segment."); error = FAILURE; } sysdata = NULL; Debug("DBAudioLib: close done."); return error; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Get_Version.c0000644000076400007640000000163707346372414014222 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include char* DBAudio_Get_Version() { return DBAUDIOLIB_VERSION; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Ready.c0000644000076400007640000000217507427425627013045 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include extern local_channel * ch; /* DBAudio_Ready - If this instance has been initialized and is ready to be written to returns SUCCESS, otherwise returns FAILURE */ int DBAudio_Ready() { if(ch == NULL) {return FAILURE;} return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Volume.c0000644000076400007640000000420107427425662013237 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include extern local_channel * ch; extern int errno; /* DBAudio_Set_Volume - sets the volume for the left and right channels for the channel associated with this instance. left and right should be within the range 0 <= x <= 100 */ int DBAudio_Set_Volume(int left, int right) { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } /* convert to 0-128 point scale */ left = (left * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; right = (right * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; if(left < DBAUDIO_MIN_VOLUME) {left = DBAUDIO_MIN_VOLUME;} if(left > DBAUDIO_INTERNAL_MAX_VOLUME) {left = DBAUDIO_INTERNAL_MAX_VOLUME;} if(right < DBAUDIO_MIN_VOLUME) {right = DBAUDIO_MIN_VOLUME;} if(right > DBAUDIO_INTERNAL_MAX_VOLUME) {right = DBAUDIO_INTERNAL_MAX_VOLUME;} ch->left_gain = left; ch->right_gain = right; return SUCCESS; } /* DBAudio_Get_Volume - returns the volumes associated with the channel for this instance. */ int DBAudio_Get_Volume(int *left, int *right) { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } /* convert volumes to 0-100 scale*/ *left = (ch->left_gain * 100) >> 7; *right = (ch->right_gain * 100) >> 7; return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Rate.c0000644000076400007640000000312207346372414012660 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ extern int sample_rate; int DBAudio_Set_Rate(int rte) { if(rte <= 8000) {errno = ERROR_BAD_SAMPLERATE; return FAILURE;} if(rte > 49000) {errno = ERROR_BAD_SAMPLERATE; return FAILURE;} sample_rate = rte; ch->base_pitch = (sample_rate*100) / DB_SAMPLE_RATE; return SUCCESS; } int DBAudio_Get_Rate() { return sample_rate; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Channels.c0000644000076400007640000000303107346372414013517 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern int errno; extern int debug_level; /* declared in debug module */ extern int num_channels; int DBAudio_Set_Channels(int numch) { if((numch == MONO) || (numch == STEREO)) { num_channels = numch; return SUCCESS; } else { errno = ERROR_BAD_NUMCH; return FAILURE; } } int DBAudio_Get_Channels() { return num_channels; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Format.c0000644000076400007640000000302407346372414013216 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern int errno; extern int debug_level; /* declared in debug module */ extern int format; int DBAudio_Set_Format(int fmt) { switch(fmt) { case AFMT_U8: case AFMT_S8: case AFMT_S16_LE: case AFMT_S16_BE: format = fmt; return SUCCESS; default: errno = ERROR_BAD_FORMAT; return FAILURE; } } int DBAudio_Get_Format() { return format; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Cue.c0000644000076400007640000000373307346372414012511 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ /* DBAudio_Cue_Enabled if the **system** cue flag is enabled, return true. this fucniton *does*not* check to see if cueing for this channel is enabled. */ int DBAudio_Cue_Enabled() { if(CUE_ENABLED) { return TRUE; } else { return FALSE; } } /* DBAudio_Set_Cue if flag is true, set the channels cue flag to be true, if flag is false, set the channels cue flag to be false else, return failure. */ int DBAudio_Set_Cue(int flag) { switch(flag) { case TRUE: ch->cue = TRUE; break; case FALSE: ch->cue = FALSE; default: errno = ERROR_BAD_PARAM; return FAILURE; } return SUCCESS; } int DBAudio_Get_Cue() { return ch->cue; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Pause.c0000644000076400007640000000261507346372414013050 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ /* */ int DBAudio_Pause(int value) { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } ch->pause = value; return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Write.c0000644000076400007640000003342607433666556013103 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ extern float local_pitch; extern float sample1, sample2; extern float float_index; extern signed short output_buf[OUTPUT_BUFSIZE]; /* buffer used to hold main output to dbfsd */ extern signed short cue_buf[OUTPUT_BUFSIZE]; /* buffer used to hold cue output to dbfsd */ extern signed short conv_buf[OUTPUT_BUFSIZE]; /* buffer used to hold format converted input */ extern int sampleindex; extern int outlen; extern int num_channels; extern int format; /* DBAudio_Write - given a buf of length len, write the data to the channel associated with this instance. On success, the number of bytes read is returned. Otherwise -1, or FAILURE, is returned, and errno is set accordingly. Hopefully this function returns values in the same fashion as other basic I/O functions such as read() and write() Variables: count is the number of bytes written during a loop iteration totalcount is the total number of bytes written left_gain and right_gain are percentages used to adjust the output signal volume tempbuf is a temporary pointer used in the volume operation temp_chbuf is a pointer to the buffer to be written to during shared memory mode. */ int DBAudio_Write(char* buf, int len) { int left_gain,right_gain; int left_cue_gain, right_cue_gain; signed short * tempbuf, *tempbuf2, * tempoutbuf; char * tempcharbuf; int incr_flag, count; int intindex; float buflen, gain1, gain2; int index1,index2, output_sample; int i; int stereo_multiplier,format_multiplier; int tempsize; int sampler_flag; enum sampler_state_e local_sampler_state; /* check parameters */ if (buf == NULL) {errno = ERROR_BAD_PARAM; return FAILURE;} if (ch == NULL) {errno = ERROR_NOT_INITIALIZED; return FAILURE;} if (len < 0) {errno = ERROR_BAD_PARAM; return FAILURE;} DBAudio_Handle_Message_Queue(); /* remember sampler state as it may change during the course of the function */ local_sampler_state = ch->sampler_state; if (ch->pause) { return 0; } /* get pitch */ local_pitch = (ch->base_pitch / 100.000) * (ch->user_pitch / 100.000); buflen = len / 2.0; /* calculate buffer space needed to convert the data to 44.1kHz 16bit stereo*/ switch (num_channels) { case 1: stereo_multiplier = 2; break; case 2: stereo_multiplier = 1; break; default: errno = ERROR_BAD_NUMCH; return FAILURE; } switch (format) { case AFMT_U8: format_multiplier = 2; break; case AFMT_S8: format_multiplier = 2; break; case AFMT_S16_LE: format_multiplier = 1; break; case AFMT_S16_BE: format_multiplier = 1; break; default: errno = ERROR_BAD_FORMAT; return FAILURE; } /* return error if the needed output space is greater than the output buffer */ if (ceil((buflen * (float)stereo_multiplier * (float)format_multiplier) / local_pitch) > (float)(OUTPUT_BUFSIZE)) { errno = ERROR_TOO_MUCH_DATA; return FAILURE; } ch->writing = 1; /* init local variables */ intindex = 0; incr_flag = 0; sampleindex = 0; gain1 = gain2 = 0.0; sample1 = sample2 = 0.0; sampler_flag = 0; left_cue_gain = ch->cue_left_gain; right_cue_gain = ch->cue_right_gain; /* calculate gain percentages */ if (ch->mute == TRUE) { left_gain = right_gain = 0; } else { left_gain = ch->left_gain * sysdata->left_balance; right_gain = ch->right_gain * sysdata->right_balance; /* cut volume if mic is being used */ if (sysdata->talkover_enabled && !(MIC_ENABLED)) { left_gain = left_gain >> DB_TALKOVER_DIVISOR_POWER; right_gain = right_gain >> DB_TALKOVER_DIVISOR_POWER; } } switch (local_sampler_state) { case SAMPLER_PLAY_SINGLE: case SAMPLER_PLAY_LOOP: if (ch->sampler_size == 0) { ch->sampler_state = SAMPLER_OFF; len = 0; goto done; } /* tempsize - amount of data available in buffer to read */ tempsize = (ch->sampler_endoffset - ch->sampler_readoffset); sampler_flag = 1; /* if we are in loop mode and loop over end of buffer, get data from start of buffer */ if ((tempsize < len) && (local_sampler_state == SAMPLER_PLAY_LOOP)) { /* copy portion at end of buffer */ memcpy(conv_buf,(ch->sampler_buf + ch->sampler_readoffset),tempsize); /* copy portion at beginning of buffer */ memcpy(conv_buf+tempsize,ch->sampler_buf+ch->sampler_startoffset,(len - tempsize)); /* update variables */ /* read offset is now amount to write, minus the overflow, plus the startoffset */ ch->sampler_readoffset = len - tempsize + ch->sampler_startoffset; tempsize = len; } else { /* if we are in simgle play mode and out of data, reset state and exit */ if ((tempsize <= 0) && (local_sampler_state == SAMPLER_PLAY_SINGLE)) { ch->sampler_state = SAMPLER_READY; goto done; } /* get full buffers worth of data from somewhere in middle of sampler buffer */ if (tempsize > len) tempsize = len; memcpy(conv_buf,(ch->sampler_buf + ch->sampler_readoffset),tempsize); ch->sampler_readoffset += tempsize; } /* update function state variables */ buflen = (tempsize / 2); tempbuf = conv_buf; break; default: { /* convert input data into 44.1 KHz 16 bit stereo */ tempbuf = (signed short *) buf; /* convert mono input to stereo */ if (num_channels == 1) { tempbuf2 = conv_buf; if ((format == AFMT_U8) || (format == AFMT_S8)) { tempcharbuf = buf; for (i = 0; i < buflen*2.0; i++) { *tempbuf2 = *tempcharbuf; tempbuf2++; *tempbuf2 = *tempcharbuf; tempbuf2++; tempcharbuf++; } } else { for (i = 0; i < buflen; i++) { *tempbuf2 = *tempbuf; tempbuf2++; *tempbuf2 = *tempbuf; tempbuf2++; tempbuf++; } } buflen *=2.0; tempbuf = conv_buf; } /* convert 8 bit input to 16 bit input */ if ((format != AFMT_S16_LE) && (format != AFMT_S16_BE) && (format != AFMT_S16_NE)) { switch (format) { case AFMT_U8: tempbuf2 = conv_buf; buflen *= 2.0; /* if data was mono, then it is already in conv_buf */ if (num_channels == 1) { for (i = 0; i < buflen; i++) { *tempbuf = (*tempbuf2 - 127) << 8; tempbuf++; tempbuf2++; } } else { /* data is 8 bit stereo, and is in buf not conv_buf*/ tempcharbuf = buf; for (i = 0; i < len; i++) { *tempbuf = (*tempcharbuf - 127) << 8; tempbuf++; tempcharbuf++; } } tempbuf = conv_buf; break; case AFMT_S8: tempbuf2 = conv_buf; buflen *= 2.0; /* if data was mono, then it is already in conv_buf */ if (num_channels == 1) { for (i = 0; i < buflen; i++) { *tempbuf = *tempbuf2 << 8; tempbuf++; tempbuf2++; } } else { /* data is 8 bit stereo, and is in buf not conv_buf*/ tempcharbuf = buf; for (i = 0; i < len; i++) { *tempbuf = *tempcharbuf << 8; tempbuf++; tempcharbuf++; } } tempbuf = conv_buf; break; default: { errno = ERROR_BAD_FORMAT; ch->writing = 0; return FAILURE; } } } } /* end default case*/ } /* end switch sampler_state */ /* copy buffer to sample buffer if sampler state is record */ if (local_sampler_state == SAMPLER_RECORD) { tempsize = 0; /* get amount of data to copy */ if ((ch->sampler_size + (buflen * 2)) > ch->sampler_bufsize) { tempsize = ch->sampler_bufsize - ch->sampler_size; } else { tempsize = (buflen * 2); } /* change state if buffer is full */ if (tempsize == 0) { ch->sampler_state = SAMPLER_READY; } /* copy data */ memcpy(((ch->sampler_buf) + (ch->sampler_size)),tempbuf,tempsize); /* update sampler state variables */ ch->sampler_size += tempsize; ch->sampler_endoffset = ch->sampler_size; } if ((local_pitch == 1.0) || (!(PITCH_ENABLED))) { memcpy(output_buf,tempbuf,buflen*2); outlen = buflen*2; tempbuf = output_buf; goto apply_gain; } /* calculate pitch shifted signal using basic linear interpolation the theory is this: you have two known samples, and want to calculate the value of a new sample in between them. The new sample will contain a percentage of the first sample and a percentage of the second sample. These percentages are porportional to the distance between the new sample and each of the knwon samples. The "position" of the new sample is determined by the float index */ tempoutbuf = output_buf; while (intindex < buflen) { /* calculate sample percentages (amplitude) */ intindex = floor(float_index); gain2 = float_index - intindex; gain1 = 1.0 - gain2; /* get index of first sample pair */ intindex = intindex << 1; /* check incr_flag to see if we should be operatiing on the left or right channel sample */ if (incr_flag) { float_index += local_pitch; incr_flag = 0; intindex++;} else {incr_flag = 1;} index1 = intindex; /* get the first "known" sample*/ sample1 = tempbuf[index1]; index2 = index1 + 2; /* get the second "known" sample */ if (index2 < (buflen)) {sample2 = tempbuf[index2];} else /* if index2 is beyond the length of the input buffer, then cheat to prevent audio pops/snaps/etc */ { *tempoutbuf = sample1; sampleindex++; break; } /* create the new sample */ output_sample = (((float)sample1 * gain1) + ((float)sample2 * gain2)); if (output_sample > 32767) {output_sample = 32767;} if (output_sample < -32767) {output_sample = -32767;} *tempoutbuf = output_sample; tempoutbuf++; sampleindex++; } /* update global variables */ outlen = (sampleindex-1) << 1; float_index = float_index - floor(float_index); tempbuf = output_buf; /* if (outlen < PIPE_BUF) {errno = ERROR_TOO_LITTLE_DATA; return FAILURE;} */ apply_gain: /* if cueing is enabled, copy the buffer before the volume adjustment */ if (CUE_ENABLED && ch->cue) { /* memcpy(cue_buf,output_buf,outlen); */ tempbuf = cue_buf; tempoutbuf = output_buf; for (i = 0; i < outlen/2; i++) { (*tempbuf) = (*tempoutbuf * left_cue_gain) >> 7; tempbuf++; tempoutbuf++; (*tempbuf) = (*tempoutbuf * right_cue_gain) >> 7; tempbuf++; tempoutbuf++; } } else { if (CUE_ENABLED) { memset(cue_buf,0,outlen); } } tempbuf = output_buf; /* adjust volume - volume is adjusted here so that it is only applied to the main output buffer and not the cue buffer. If volume was adjusted in the linear interpolation loop, cue volume would be affected as well, which would be bad. */ for (i = 0; i < outlen/2; i++) { (*tempbuf) = ((*tempbuf) * left_gain) >> 14; tempbuf++; (*tempbuf) = ((*tempbuf) * right_gain) >> 14; tempbuf++; } /* write main and cue output buffers */ { int numbytes; char * write_cue_buf; char * write_output_buf; write_cue_buf = (char *) cue_buf; write_output_buf = (char *) output_buf; while(outlen > 0) { if(outlen > DB_BUFSIZE_CHAR) { numbytes = DB_BUFSIZE_CHAR; } else { numbytes = outlen; } outlen -= numbytes; if (CUE_ENABLED) { if(ch->cue) { if ((count = write(ch->client_cue_fd,write_cue_buf,numbytes)) < 0) { if (errno != 11) { Error("DBAudioLib: DBAudio_Write: error %d on cue pipe write.",errno); } } } } /* printf("numbytes: %d buflen %f\n",numbytes,buflen); */ if ((count = write(ch->client_comm_fd,write_output_buf,numbytes)) < 0) { Error("DBAudioLib: DBAudio_Write: Error on pipe write"); } write_cue_buf += numbytes; write_output_buf += numbytes; } } done: ch->writing = 0; if (sampler_flag) { return 0; } else { return len; } } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Read.c0000644000076400007640000000306407346372414012645 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ int DBAudio_Read(char * buf, int count) { errno = ERROR_NOT_IMPLEMENTED; return FAILURE; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Channel_Name.c0000644000076400007640000000500207414177461014275 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ /* DBAudio_Get_Channel_Name returns a pointer to the name associated with this channel, and also copies the name in to the character buffer pointed to by name. */ char * DBAudio_Get_Channel_Name(char * name) { if (name == NULL) { errno = ERROR_BAD_PARAM; return NULL; } if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return NULL; } strcpy(name,ch->channel_name); return name; } /* DBAudio_Set_Channel_name sets the name for this channel to be name */ int DBAudio_Set_Channel_Name(char * name) { int i; static char temp[DB_CHANNEL_NAME_SIZE],temp2[DB_CHANNEL_NAME_SIZE]; if (name == NULL) { errno = ERROR_BAD_PARAM; return FAILURE; } if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } /* if the name is longer than the name buffer for the channel, truncate it */ if ((strlen(name) - 6) > DB_CHANNEL_NAME_SIZE) { for (i = 0; i < (DB_CHANNEL_NAME_SIZE - 6); i++) { temp[i] = name[i]; } temp[i] = '\0'; sprintf(temp2,"%s - %d",temp,ch->index+1); } else { sprintf(temp2,"%s - %d",name,ch->index+1); } strcpy(ch->channel_name,temp2); return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Channel_Type.c0000644000076400007640000000361107346372414014341 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ int DBAudio_Set_Channel_Type(enum channel_type_e type) { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } switch(type) { case PIPE_CHANNEL: Debug("DBAudioLib: Setting Channel type: PIPE CHANNEL"); break; /* case SHM_CHANNEL: */ /* Debug("DBAudioLib: Setting Channel type: SHM CHANNEL"); */ break; default: errno = ERROR_BAD_CHANNELTYPE; return FAILURE; } ch->channel_type = type; return SUCCESS; } enum channel_type_e DBAudio_Get_Channel_Type() { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } return ch->channel_type; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Channel_Flags.c0000644000076400007640000000340207346372414014452 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ int DBAudio_Set_Channel_Flag(unsigned int flag) { ch->channel_flags |= flag; return SUCCESS; } int DBAudio_Clear_Channel_Flag(unsigned int flag) { ch->channel_flags &= ~flag; return SUCCESS; } unsigned int DBAudio_Get_Channel_Flags() { return ch->channel_flags; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Get_Bufsize.c0000644000076400007640000000674507346372414014211 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ extern float local_pitch; extern int num_channels; extern int format; /* DBAudio_Get_Bufsize - */ int DBAudio_Get_Bufsize(int input_bufsize) { int format_multiplier; int stereo_multiplier; int output_bufsize, difference; float bufsize; errno = ERROR_NOT_IMPLEMENTED; return FAILURE; if(ch == NULL) {errno = ERROR_NOT_INITIALIZED; return FAILURE;} if(input_bufsize == 0) {input_bufsize = PIPE_BUF;} local_pitch = (ch->base_pitch / 100.0) * (ch->user_pitch / 100.0); switch(num_channels) { case 1: stereo_multiplier = 2; break; case 2: stereo_multiplier = 1; break; default: errno = ERROR_BAD_NUMCH; return FAILURE; } switch(format) { case AFMT_U8: format_multiplier = 2; break; case AFMT_S8: format_multiplier = 2; break; case AFMT_S16_LE: format_multiplier = 1; break; case AFMT_S16_BE: format_multiplier = 1; break; default: errno = ERROR_BAD_FORMAT; return FAILURE; } bufsize = ((float) input_bufsize * (float) stereo_multiplier * (float)format_multiplier) / local_pitch; output_bufsize = ceil(bufsize); /* printf("bufsize si %f\n",bufsize); */ /* check to see if there is too much data to fit in the output buffer */ if(output_bufsize > OUTPUT_BUFSIZE) { difference = (int)ceil(((float)(output_bufsize - OUTPUT_BUFSIZE) * local_pitch) / (float)(stereo_multiplier * format_multiplier)); printf("too much data. difference is %d suggested is %d\n",difference,input_bufsize - difference); return input_bufsize - difference; } /* check to see if there is too little data for dbfsd to handle*/ if(local_pitch > 1.0) { if(output_bufsize < PIPE_BUF) { difference = (int)ceil(((float)(PIPE_BUF - output_bufsize) * local_pitch) / (float)(stereo_multiplier * format_multiplier)); printf("%d is too little data. difference is %d suggested is %d\n",input_bufsize,difference,input_bufsize + difference); return input_bufsize + difference; } } return input_bufsize; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_perror.c0000644000076400007640000000650207346372414013303 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ void DBAudio_perror(char *str) { char* str2 = NULL; switch(errno) { case SUCCESS: return; case ERROR_NOT_IMPLEMENTED: str2 = "DBAudio ERROR: The requested function has not yet been implemented."; break; case ERROR_BAD_CHANNEL: str2 = "DBAudio ERROR: Unknown channel type."; break; case ERROR_BAD_PARAM: str2 = "DBAudio ERROR: The function recieved a bad parameter."; break; case ERROR_NO_FREE_CHANNELS: str2 = "DBAudio ERROR: All channels into dbfsd are in use."; break; case ERROR_TOO_MUCH_DATA: str2 = "DBAudio ERROR: DBAudio_Write recieved a data block which is too large too process."; break; case ERROR_BAD_SAMPLERATE: str2 = "DBAudio ERROR: The requested samplerate is out of range."; break; case ERROR_BAD_CHANNELTYPE: str2 = "DBAudio ERROR: Unknown channel type."; break; case ERROR_BAD_NUMCH: str2 = "DBAudio ERROR: Bad number of audio channels (it is neither stereo nor mono)."; break; case ERROR_BAD_FORMAT: str2 = "DBAudio ERROR: The audio data format is unsupported."; break; case ERROR_CHANNEL_IN_USE: str2 = "DBAudio ERROR: The requested channel index is in use."; break; case ERROR_BAD_CHANNEL_ID: str2 = "DBAudio ERROR: The requested channel index is out of range."; break; case ERROR_TOO_LITTLE_DATA: str2 = "DBAudio ERROR: DBAudio_Write recieved a data block which is too small too process."; break; case ERROR_NOT_INITIALIZED: str2 = "DBAudio ERROR: DBAudioLib is not initialized."; break; case ERROR_INIT_FAILURE: str2 = "DBAudio ERROR: DBAudiolib initialization failed."; break; default: perror(str); return; } if(str2 == NULL) { fprintf(stderr,"DBAUDIO_PERROR FAILURE: error code %d\n",errno); } fprintf(stderr,str); fprintf(stderr,str2); fprintf(stderr,"\n"); } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Mute.c0000644000076400007640000000234307427425720012702 /* Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include extern int errno; extern local_channel * ch; int DBAudio_Set_Mute(int value) { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } ch->mute = value; return SUCCESS; } int DBAudio_Get_Mute() { if (ch == NULL) { errno = ERROR_NOT_INITIALIZED; return FAILURE; } ch->mute = 0; return SUCCESS; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/DBAudio_Sampler.c0000664000076400007640000001715007436277074013406 /* Author: Bob Dean Copyright (c) 1999, 2000, 2001 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prototypes.h" /* variables to access DBMix channels shared memory */ extern int shmid, sysshmid; extern dbfsd_data * sysdata; extern local_channel * local_channels; /* static local_channel * cue_channels; */ extern local_channel * ch; extern int errno; extern int debug_level; /* declared in debug module */ /* DBAudio_Sample_Record - enable sample recording for current audio stream */ int DBAudio_Sampler_Record() { int err; err = SUCCESS; /* init channel sample control variables */ ch->sampler_size = 0; ch->sampler_readoffset = 0; ch->sampler_startoffset = 0; /* set record */ ch->sampler_state = SAMPLER_RECORD; return err; } /* DBAudio_Sample_Stop - stop sample recording/playback for current audio stream */ int DBAudio_Sampler_Stop() { int err; err = SUCCESS; ch->sampler_state = SAMPLER_READY; return err; } /* DBAudio_Sampler_Play_Loop - enable looping sample playback */ int DBAudio_Sampler_Loop() { int err; err = SUCCESS; /* if we are already playing a single sample, reset. otherwise, start loop at current position in sample playback */ /* Note that the loop state is not checked for, this will allow the user to easially restart the loop at the begining of the sample. Sometimes a neat DJ effect. */ if (ch->sampler_state != SAMPLER_PLAY_SINGLE) { ch->sampler_readoffset = ch->sampler_startoffset; } ch->sampler_state = SAMPLER_PLAY_LOOP; return err; } /* DBAudio_Sampler_Play_Single - enable a single sample playback */ int DBAudio_Sampler_Single() { int err; err = SUCCESS; /* sampler mode is not checked here, as it is assumed that the User wants the single shot of a sample to override all others */ ch->sampler_readoffset = ch->sampler_startoffset; ch->sampler_state = SAMPLER_PLAY_SINGLE; return err; } /* DBAudio_Sample_Get_Offsets - get the start and end offsets within the sample buffer */ int DBAudio_Sampler_Get_Offsets(int * start_offset, int * end_offset) { int err; err = SUCCESS; /* convert char buffer offsets into number of samples */ *start_offset = ch->sampler_startoffset / 4; *end_offset = ch->sampler_endoffset / 4; return err; } /* DBAudio_Sample_Set-OFfsets - set the start and end offsets within the sample buffer */ int DBAudio_Sampler_Set_Offsets(int start_offset, int end_offset) { int err; err = SUCCESS; /* convert number of samples to char buffer indexes */ start_offset *= 4; end_offset *= 4; if (start_offset > end_offset) { err = ERROR_BAD_PARAM; goto cleanup; } if (start_offset > ch->sampler_size) { err = ERROR_BAD_PARAM; goto cleanup; } ch->sampler_startoffset = start_offset; ch->sampler_endoffset = end_offset; cleanup: return err; } /* DBAudio_Sampler_Get_Size - Get total number of samples in sample buffer */ int DBAudio_Sampler_Get_Size(int * size) { int err; err = SUCCESS; /* convert size of char buffer to number of samples */ *size = ch->sampler_size / 4; return err; } /* DBAudio_Sampler_Get_State - Get the current state of the sampler */ sampler_state DBAudio_Sampler_Get_State() { return ch->sampler_state; } /* DBAudio_Sample_Save - save sample using provided filename */ int DBAudio_Sampler_Save(char * filename) { int err; int fid; char header[512]; int count; char * tempbuf; err = SUCCESS; fid = 0; /* open output file */ if ((fid = open(filename,O_CREAT | O_WRONLY,0777)) == -1) { perror("DBAudiolib Sample Save: file creation failed."); err = -1; goto cleanup; } /* Debug("\nSAVE SAMPLE HEADER: "); */ /* Debug("time: %f",ch->sampler_time); */ /* Debug("bufsize: %d",ch->sampler_bufsize); */ /* Debug("size: %d",ch->sampler_size); */ /* Debug("readoffset: %d",ch->sampler_readoffset); */ /* Debug("startoffset: %d",ch->sampler_startoffset); */ /* Debug("endoffset: %d",ch->sampler_endoffset); */ /* create header */ sprintf(header,"%s %f %d %d %d %d %d %c", "DBMix ", ch->sampler_time, ch->sampler_bufsize, ch->sampler_size, ch->sampler_readoffset, ch->sampler_startoffset, ch->sampler_endoffset, '\0'); /* write header */ if ((err = write(fid,header,512)) == -1) { perror("DBAudiolib Sample Save: header write failed"); goto cleanup; } count = 0; tempbuf = ch->sampler_buf; /* write sample */ while (tempbuf < (ch->sampler_buf + ch->sampler_bufsize)) { count = 4096; if ((err = write(fid,tempbuf,count)) == -1) { perror("DBAudiolib Sample Save: sample write failed"); goto cleanup; } /* incr pointer by number of bytes written */ tempbuf += err; } /* tell mixer that op is done */ sysdata->sampler_op_flag = 0; cleanup: if (fid != 0) { close(fid); } return err; } /* DBAudio_Sample_Load - load sample using provided filename */ int DBAudio_Sampler_Load(char * filename) { int err; int fid; char header[512]; char dbmixname[128]; char * tempbuf; int count; int num_left; err = SUCCESS; fid = 0; /* open output file */ if ((fid = open(filename,O_RDONLY)) == -1) { err = -1; perror("DBAudiolib Sample Load: open failed"); goto cleanup; } /* read header */ if ((err = read(fid,header,512)) == -1) { perror("DBAudiolib Sample Load: header read failed."); goto cleanup; } /* parse header */ sscanf(header,"%s %f %d %d %d %d %d", dbmixname, &(ch->sampler_time), &(ch->sampler_bufsize), &(ch->sampler_size), &(ch->sampler_readoffset), &(ch->sampler_startoffset), &(ch->sampler_endoffset)); count = 0; tempbuf = ch->sampler_buf; num_left = ch->sampler_bufsize; while (num_left > 0) { if (num_left > 4096) { count = 4096; } else { count = num_left; } if ((err = read(fid,tempbuf,count)) == -1) { perror("DBAudiolib Sample Load: read failed!!!"); goto cleanup; } tempbuf += err; num_left -= err; } /* tell mixer that operation is done */ sysdata->sampler_op_flag = 0; ch->sampler_state = SAMPLER_READY; cleanup: if (fid != 0) { close(fid); } return err; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/dbaudiolib.c0000644000076400007640000000432207346372414012537 /* DB Audiolib =========== DB Audiolib is a series of routines to simplify access to the DBMix Fourier Synthesis Daemon (dbfsd) This software is brought to you by the letter C and the number 1. This library is intended to be as simple to use as possible. If a function here is similar to a known system function, then the local function (i.e. DBAudio_Write()) is designed to be similar in operation to the system function (i.e. write()). Version: C.2 Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include "prototypes.h" extern int errno; extern int debug_level; /* declared in debug module */ DBAudioLibFunctions dbaudio_fxns = { DBAudio_Init, DBAudio_Ready, DBAudio_Write, DBAudio_Read, DBAudio_Close, DBAudio_Set_Volume, DBAudio_Get_Volume, DBAudio_Pause, DBAudio_Get_Version, DBAudio_Get_Channel_Name, DBAudio_Set_Channel_Name, DBAudio_Get_Channel_Type, DBAudio_Set_Channel_Type, DBAudio_Cue_Enabled, DBAudio_Set_Rate, DBAudio_Get_Rate, DBAudio_Set_Channels, DBAudio_Get_Channels, DBAudio_Set_Format, DBAudio_Get_Format, DBAudio_Set_Cue, DBAudio_Get_Cue, DBAudio_Get_Bufsize, DBAudio_perror, DBAudio_Set_Message_Handler, DBAudio_Handle_Message_Queue, DBAudio_Set_Channel_Flag, DBAudio_Clear_Channel_Flag, DBAudio_Get_Channel_Flags }; DBAudioLibFunctions * DBAudio_Get_Functions() { return &dbaudio_fxns; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbaudiolib/prototypes.h0000644000076400007640000000576507434054674012715 /* prototypes.h this file contains function prototypes and definitions private to dbaudiolib, and therefore are should not be exported in the dbaudiolib.h header file. Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #ifndef __DBAUDIO_PROTO_H__ #define __DBAUDIO_PROTO_H__ #include /* DBAudioLib Prototypes */ int DBAudio_Init(char * name, int fmt, int rte, int numch, enum channel_type_e type, int chindex); int DBAudio_Ready(); int DBAudio_Write(char* buf, int len); int DBAudio_Close(); int DBAudio_Set_Volume(int left, int right); int DBAudio_Get_Volume(int *left, int *right); int DBAudio_Pause(int value); char * DBAudio_Get_Version(); char * DBAudio_Get_Channel_Name(char * name); int DBAudio_Set_Channel_Name(char * name); enum channel_type_e DBAudio_Get_Channel_Type(); int DBAudio_Set_Channel_Type(enum channel_type_e type); int DBAudio_Cue_Enabled(); int DBAudio_Set_Rate(int rte); int DBAudio_Get_Rate(); int DBAudio_Set_Channels(int numch); int DBAudio_Get_Channels(); int DBAudio_Set_Format(int fmt); int DBAudio_Get_Format(); int DBAudio_Get_Bufsize(int input_bufsize); void DBAudio_perror(char *str); int DBAudio_Set_Message_Handler(void(*message_handler)(dbfsd_msg msg), int msg_flags); int DBAudio_Handle_Message_Queue(); int DBAudio_Set_Channel_Flag(unsigned int flag); int DBAudio_Clear_Channel_Flag(unsigned int flag); unsigned int DBAudio_Get_Channel_Flags(); int DBAudio_Set_Mute(int value); int DBAudio_Get_Mute(); int DBAudio_Sample_Record(); int DBAudio_Sample_Stop(); int DBAudio_Sampler_Loop(); int DBAudio_Sampler_Single(); int DBAudio_Sample_Get_Offsets(int * start_offset, int * end_offset); int DBAudio_Sample_Set_Offsets(int start_offset, int end_offset); int DBAudio_Sampler_Get_Size(int * size); int DBAudio_Sampler_Save(char * filename); int DBAudio_Sampler_Load(char * filename); sampler_state DBAudio_Sampler_Get_State(); #define OUTPUT_BUFSIZE (PIPE_BUF * 6) /* size of internal buffers for audio format conversion */ #define SAMPLER_WRITESIZE (PIPE_BUF * 2) /* amount of bytes to write if sampler is in play mode */ #endif /* __DBAUDIO_PROTO_H__ */ #ifdef __cplusplus } #endif DBMix-0.9.8/dbfsd_src/0000777000076400007640000000000007436306702010210 5DBMix-0.9.8/dbfsd_src/Makefile.in0000664000076400007640000002354707436306702012206 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ INCLUDES = . @GLIB_CFLAGS@ @GTK_CFLAGS@ -I../include CFLAGS = @DBMIX_DEBUG@ -O2 bin_PROGRAMS = dbfsd dbcat dbin dbfsd_LDADD = dbfsd_SOURCES = dbfsd.c debug.c fsadders.c dbaudio.c debug.h dbaudio.h fsadders.h dbcat_SOURCES = dbcat.c debug.c dbcat_LDFLAGS = @GTK_LIBS@ -ldbaudiolib dbin_SOURCES = dbin.c debug.c dbin_LDFLAGS = @GTK_LIBS@ -ldbaudiolib mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ dbfsd_OBJECTS = dbfsd.o debug.o fsadders.o dbaudio.o dbfsd_DEPENDENCIES = dbfsd_LDFLAGS = dbcat_OBJECTS = dbcat.o debug.o dbcat_LDADD = $(LDADD) dbcat_DEPENDENCIES = dbin_OBJECTS = dbin.o debug.o dbin_LDADD = $(LDADD) dbin_DEPENDENCIES = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(dbfsd_SOURCES) $(dbcat_SOURCES) $(dbin_SOURCES) OBJECTS = $(dbfsd_OBJECTS) $(dbcat_OBJECTS) $(dbin_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps dbfsd_src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: dbfsd: $(dbfsd_OBJECTS) $(dbfsd_DEPENDENCIES) @rm -f dbfsd $(LINK) $(dbfsd_LDFLAGS) $(dbfsd_OBJECTS) $(dbfsd_LDADD) $(LIBS) dbcat: $(dbcat_OBJECTS) $(dbcat_DEPENDENCIES) @rm -f dbcat $(LINK) $(dbcat_LDFLAGS) $(dbcat_OBJECTS) $(dbcat_LDADD) $(LIBS) dbin: $(dbin_OBJECTS) $(dbin_DEPENDENCIES) @rm -f dbin $(LINK) $(dbin_LDFLAGS) $(dbin_OBJECTS) $(dbin_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = dbfsd_src distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done dbaudio.o: dbaudio.c dbaudio.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbcat.o: dbcat.c ../include/dbaudiolib.h ../include/dbdebug.h dbfsd.o: dbfsd.c ../include/dbsoundcard.h dbaudio.h \ ../include/dbchannel.h ../include/dbaudiolib.h fsadders.h \ ../include/dbdebug.h dbin.o: dbin.c ../include/dbaudiolib.h ../include/dbdebug.h dbaudio.h \ ../include/dbchannel.h ../include/dbsoundcard.h debug.o: debug.c ../include/dbdebug.h fsadders.o: fsadders.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h ../include/dbdebug.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/dbfsd_src/Makefile.am0000644000076400007640000000054307346372414012165 INCLUDES = . @GLIB_CFLAGS@ @GTK_CFLAGS@ -I../include CFLAGS = @DBMIX_DEBUG@ -O2 bin_PROGRAMS = dbfsd dbcat dbin dbfsd_LDADD = dbfsd_SOURCES = dbfsd.c debug.c fsadders.c dbaudio.c debug.h dbaudio.h fsadders.h dbcat_SOURCES = dbcat.c debug.c dbcat_LDFLAGS = @GTK_LIBS@ -ldbaudiolib dbin_SOURCES = dbin.c debug.c dbin_LDFLAGS = @GTK_LIBS@ -ldbaudiolib DBMix-0.9.8/dbfsd_src/dbfsd.c0000644000076400007640000012274407436272026011365 /* DB Fourier Synthesis Daemon =========================== Description: ----------- This deamon creates input "channels" using pipes and network sockets, and then combines their input for writing to /dev/dsp. The daemon assumes that the data is 16 bit 44.1 kHz stereo. It *is*not* the task of this daemon to perform audio format conversions. Such calculation would add delay to channels that do not require it. The number of pipe channels is a constant number set at startup. Due to connection oriented nature of socket streams, the number of socket channels in existence at any given time is variable. The maximum number of connections is also set at startup. This software is brought to you by the letter A and the number 4 Version: see VRESION_STR declared below Author: Bob Dean Copyright (c) 1999, 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ /* source code used to write wave files copied from the XMMS Disk Writer Plugin, released under the GNU General Public License Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies */ /* Design notes: Use of signals: SIGINT - shut down SIGHUP - close and reopen audio devices SIGUSR1 - start recording to disk using filename stored in sysdata structure (filled in by dbmixer). SIGUSR2 - stop recording to disk. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbaudio.h" #include #include "fsadders.h" #include /* local defines */ #define DBFSD_VERSION_STR "A.12" /* timeout values for the select call. */ #define MIN_TIMEOUT_VALUE_SEC 0 #define MAX_TIMEOUT_VALUE_SEC 60 #define MIN_TIMEOUT_VALUE_USEC 25000 #define MAX_TIMEOUT_VALUE_USEC 0 /* local global variables */ extern int errno; extern int debug_level; /* local prototypes */ void shutdown_dbfsd(); /***************************************************************************/ /* Global variables */ /***************************************************************************/ /* daemon system data*/ dbfsd_data * sysdata; int loop_flag; /*main loop flag*/ int free_channels_flag; int cue_flag; int single_output_flag; int reset_audio_flag; int shmid; /* shared memory id for channels*/ int sysshmid; /* shared memory id for dbfsd_data*/ int semid; /* channel semaphore id */ FILE * record_fid; gint record_count; wav_header header; /*channel arrays*/ local_channel *local_channels, *cue_channels; /* socket_channel **socket_channels; */ char tempdirstr[512], cue_tempdirstr[512]; /*flags to hold cmdline switches*/ int stdout_flag; int quiet_flag; fd_set read_ch_set; /*fd set for select*/ signed short output_buf[DB_BUFSIZE_SHORT], cue_output_buf[DB_BUFSIZE_SHORT], empty_buf[DB_BUFSIZE_SHORT]; /* signed short *output_buf, *cue_output_buf, *empty_buf; */ oss_control_struct * main_audio, * cue_audio; /***************************************************************************/ /* Initialization functions */ /***************************************************************************/ /* print_version - outputs version info to stdout */ void print_version() { printf("DB Fourier Synthesis Daemon for OSS\n"); printf("%s\n",DBMIX_COPYRIGHT); printf("DBfsd Version: %s\n",DBFSD_VERSION_STR); printf("DBMix Version: %s\n",DBMIX_VERSION); } /* print_greeting - outputs to stdout a greeting inputs: none outputs: none */ void print_help() { print_version(); printf("\n"); printf("Supported options (argument type in parens) [defaults in brackets]: \n"); printf(" -d turn on debug messages to console (none) [Off] \n"); printf(" -c set op mode to cue (none) [no cue] \n"); printf(" -e output cue as left channel of master out (none) [Off] \n"); printf(" -n set total number of input channels (int) [4] \n"); printf(" -s set number of input channels to be sockets (int) [0] \n"); printf(" -a set master output audio device (string) [/dev/dsp0]\n"); printf(" -b set cue output audio device (string) [/dev/dsp2]\n"); printf(" -r set number of OSS output fragments (int) [128] \n"); printf(" -o write mixed output to stdout (none) [Off] \n"); printf(" -v print version information (none) \n"); printf(" -h print this message (none) \n"); printf("\n"); printf("For example, to run the server with cueing, 5 input channels, and sending\n"); printf("master output to /dev/dsp15 you would type:\n"); printf("dbfsd -c -n 5 -a /dev/dsp15\n"); printf("\n"); printf("WARNING: if you use the -r option, the minimum number of allowable fragments\n"); printf(" is %d. Any fewer, and audio corruption may occur withing the driver.\n",DB_MIN_AUDIO_BUFFS); printf(" Depending on your system, if you expeience audio corruption, \n"); printf(" you should increase the number of fragments.\n"); printf("\n"); } /* parse_cmdline - steps through argv and sets all the variables inputs - argc argv outputs - sets system variables */ void parse_cmdline(int argc, char* argv[]) { int opt; /* init arguments... */ quiet_flag = FALSE; stdout_flag = FALSE; cue_flag = FALSE; single_output_flag = FALSE; record_fid = NULL; sprintf(tempdirstr,"/tmp/ch"); sysdata->cue_audio_device[0] = '\0'; cue_tempdirstr[0] = '\0'; sysdata->pid = getpid(); strcpy(sysdata->main_audio_device,DEFAULT_AUDIO_DEVICE); /* parse argv */ while ((opt = getopt(argc,argv,"n:s:a:b:ovqhdcer:")) != -1) { switch (opt) { case 'h': print_help(); shutdown_dbfsd(); break; case 'a': strcpy(sysdata->main_audio_device,optarg); Debug("Set master audio device to be: \"%s\"",sysdata->main_audio_device); break; case 'b': strcpy(sysdata->cue_audio_device,optarg); Debug("Set cue audio device to be: \"%s\"",sysdata->cue_audio_device); break; case 'e': Debug("Set single output flag."); single_output_flag = TRUE; sysdata->single_output = TRUE; sysdata->cue_split = TRUE; /* fail through to enable cue */ case 'c': cue_flag = TRUE; sysdata->cue_enabled = TRUE; Debug("set cue flag."); break; case 'v': print_version(); shutdown_dbfsd(); case 'n': sysdata->num_channels = atoi(optarg); printf("sysdata->num_channels set %d\n",sysdata->num_channels); break; case 'o': stdout_flag = TRUE; Debug("output to stdout"); break; case 'q': /* I wish I could remember what this was for... */ quiet_flag = TRUE; Debug("quiet flag set"); break; case 'r': sysdata->num_main_buffs = atoi(optarg); if (sysdata->num_main_buffs < DB_MIN_AUDIO_BUFFS) { printf("The requested number of audio buffs is less than the allowable minimum. Setting the number of buffs to be the minimum of: %d buffers.",DB_MIN_AUDIO_BUFFS); sysdata->num_main_buffs = DB_MIN_AUDIO_BUFFS; } sysdata->num_cue_buffs = sysdata->num_main_buffs; Debug("num audio buffs set %d\n",sysdata->num_main_buffs); case 's': sysdata->num_sockets = atoi(optarg); Debug("numsockets set %d\n",sysdata->num_sockets); break; case 'd': sysdata->debug_level = debug_level = 1; Debug("debug level set\n"); break; case ':': printf("option needs a value\n"); break; case '?': printf("unknown option: %c\n",optopt); exit(0); break; default: break; } } /*end while*/ if (cue_flag) { sprintf(cue_tempdirstr,"/tmp/cue"); if (sysdata->cue_audio_device[0] == '\0') { strcpy(sysdata->cue_audio_device,DEFAULT_CUE_AUDIO_DEVICE); } sysdata->cue_pid = getpid(); } } /* init_sysdata - allocates shared memory to hold the system dbfsd_data struct inputs - none outputs - none side effects - allocates a chunk of shared memory and point to it with sysdata */ void init_sysdata() { /*allocate ssytem data struct*/ sysshmid = shmget((key_t) DB_SYSTEM_SM_KEY, sizeof(dbfsd_data), 0666 | O_RDWR | IPC_CREAT); if (sysshmid == -1) { Error("init_sysdata: error creating shared memory for system data."); exit(EXIT_FAILURE); } sysdata = shmat(sysshmid,(void *)0, 0); if ((int)sysdata == -1) { Error("init_sysdata: error attaching system data shared memory."); if (shmdt(sysdata) == -1) { Error("init_sysdata: could not detach system data memory segment."); } if (shmctl(sysshmid,IPC_RMID, 0) == -1) { Error("init_sysdata: could not delete system data shared memory segment."); } exit(EXIT_FAILURE); } Debug("init_sysdata: system data shared memory attached successfully."); memset(sysdata->filename,0,FILENAME_MAX); sysdata->num_channels = 4; sysdata->num_sockets = 0; sysdata->debug_level = 0; sysdata->ready_count = 0; sysdata->free_channel_index = 0; sysdata->clipping_threshold = 20; sysdata->main_audio_device[0] = '\0'; sysdata->cue_audio_device[0] = '\0'; sysdata->main_mixer_device[0] = '\0'; sysdata->cue_mixer_device[0] = '\0'; sysdata->clipping = 0; sysdata->num_main_buffs = DB_NUM_FRAGMENTS; sysdata->num_cue_buffs = DB_NUM_FRAGMENTS; sysdata->left_balance = 100; sysdata->right_balance = 100; sysdata->cue_split = 0; sysdata->single_output = 0; sysdata->talkover_enabled = 0; sysdata->skip_max = DEFAULT_SKIP_MAX; sysdata->default_sampler_time = DB_SAMPLER_DEFAULT_TIME; sysdata->mixer_pid = 0; sysdata->sampler_op_flag = 0; sysdata->recording = 0; } int reset_channel(local_channel * ch, int reset) { char tempstr[256]; if (reset) { Debug("Reseting channel %d...",ch->index); Debug(" Closing and unlinking pipes..."); close(ch->server_comm_fd); unlink(ch->comm_filename); close(ch->server_cue_fd); unlink(ch->cue_filename); Debug(" closing message queue..."); if (msgctl(ch->msg_q_id,IPC_RMID,0) != SUCCESS) { Error("Failed to delete message queue on channel %d",ch->index); } } else { Debug(" Creating channel %d...",ch->index); } /* intialize the channel name to "Channel x" */ sprintf(ch->channel_name,"Channel - %d",ch->index+1); Debug(" Set channel name to: %s",ch->channel_name); /* create message queue */ ch->msg_q_id = msgget(DB_CHANNELS_Q_KEY_BASE + ch->index, 0666 | IPC_CREAT); if (ch->msg_q_id == -1) { Error("Failed to create message queue on channel %d",ch->index); } Debug(" reset_channel: Opened message queue."); /* create comm pipe */ if (mkfifo(ch->comm_filename,0777) != 0) { if (errno != EEXIST) { sprintf(tempstr,"reset_channel: Error creating %s",ch->comm_filename); perror(tempstr); return FAILURE; } } /* open comm pipe */ if ((ch->server_comm_fd = open(ch->comm_filename, O_RDONLY | O_NONBLOCK )) == -1) { sprintf(tempstr,"reset_channel: Error opening %s for read:",ch->comm_filename); perror(tempstr); return FAILURE; } Debug(" reset_channel: opened pipe %s",ch->comm_filename); if (cue_flag) { /* create cue pipe */ Debug(" reset_channel: creating cue pipe..."); if (mkfifo(ch->cue_filename,0777) != 0) { if (errno != EEXIST) { sprintf(tempstr,"reset_channel: Error creating %s", ch->cue_filename); perror(tempstr); return FAILURE; } } /* open cue pipe */ Debug(" reset_channel: Opening cue pipe..."); if ((ch->server_cue_fd = open(ch->cue_filename,O_RDONLY | O_NONBLOCK )) == -1) { sprintf(tempstr,"reset_channel: Error opening %s for read:", ch->cue_filename); perror(tempstr); return FAILURE; } ch->channel_flags |= CUE_FLAG; Debug(" reset_channel: opened pipe %s",ch->cue_filename); } else { ch->channel_flags &= ~CUE_FLAG; ch->cue_filename[0] = '\0'; ch->server_cue_fd = -1; } /*add to select set*/ FD_SET(ch->server_comm_fd,&read_ch_set); ch->msg_flags = 0; ch->free_channel = TRUE; ch->is_symlink = FALSE; ch->left_gain = DEFAULT_GAIN; ch->right_gain = DEFAULT_GAIN; ch->cue_left_gain = DEFAULT_GAIN; ch->cue_right_gain = DEFAULT_GAIN; ch->cue = FALSE; ch->base_pitch = DEFAULT_PITCH; ch->user_pitch = DEFAULT_PITCH; ch->message_handler = NULL; ch->pause = FALSE; ch->mute = FALSE; ch->skip_count = 0; ch->writing = 0; /* init sampler variables */ ch->sampler_state = SAMPLER_OFF; ch->sampler_time = sysdata->default_sampler_time; ch->sampler_bufsize = 0; ch->sampler_size = 0; ch->sampler_readoffset = 0; ch->sampler_startoffset = 0; ch->sampler_endoffset = 0; ch->sampler_buf = NULL; /* init default channel flags */ ch->channel_flags |= (PITCH_FLAG | PAUSE_FLAG); Debug(" reset_channel: channel %d reset.",ch->index); return SUCCESS; } /* * init_channels - creates and initializes the input channels * channels 1 2 and 3 are named pipes. * channel 4 is the soundcard linein. * * inputs: str - filesystem location for FIFO's * num - number of channels * outputs: error codes... */ int init_channels() { int len,i; local_channel* temp_ch; key_t channels_key; len = strlen(tempdirstr) + 20; /* output_buf = (signed short*) malloc(DB_BUFSIZE_CHAR); */ /* cue_output_buf = (signed short*) malloc(DB_BUFSIZE_CHAR); */ /* empty_buf = (signed short *) malloc(DB_BUFSIZE_CHAR); */ memset(empty_buf,0,DB_BUFSIZE_CHAR); channels_key = DB_CHANNELS_SM_KEY; Debug("init_channels: samples per channel buffer %d",DB_BUFSIZE_SHORT); /* allocate input channel control structs */ shmid = shmget(channels_key, ((sysdata->num_channels) * sizeof(local_channel)), 0666 | O_RDWR | IPC_CREAT); if (shmid == -1) { Error("init_channels: error creating shared memory."); shutdown_dbfsd(); } local_channels = shmat(shmid,(void *)0, 0); if ((int)local_channels == -1) { Error("init_channels: error attaching shared memory."); if (shmdt(local_channels) == -1) { Error("init_channels: could not detach memory segment."); } if (shmctl(shmid,IPC_RMID, 0) == -1) { Error("init_channels: could not delete shared memory segment."); } shutdown_dbfsd(); } Debug("init_channels: shared memory attached successfully."); FD_ZERO(&read_ch_set); temp_ch = local_channels; /*initialize channels*/ for (i = 0; i < sysdata->num_channels; i++) { local_channels[i].channel_flags = 0; /*create comm pipe filename*/ sprintf(local_channels[i].comm_filename,"%s%d_comm",tempdirstr,i+1); /*create cue filename*/ if (cue_flag) { sprintf(local_channels[i].cue_filename,"%s%d_cue",tempdirstr,i+1); } else { local_channels[i].cue_filename[0] = '\0'; } local_channels[i].index = i; reset_channel(temp_ch,FALSE); temp_ch++; } return SUCCESS; } /* sigexit - changes system variables to force clean shutdown inputs - none outputs - none */ void sigexit(int signum) { loop_flag = FALSE; Debug("Sigexit has been called."); } void sigcont(int signum) { Debug("Sigcont has been called."); } /* sighup - callback when a SIGHUP signal is recieved, resets audio devices */ void sighup(int signum) { Debug("sighup has been called."); reset_audio_flag = 1; } /* sigusr - callback when a SIGUSR signal is recieved, starts recording to disk. */ void sigusr1(int signum) { Debug("sigusr1 has been called."); /* if not recording, start recording */ if (record_fid == NULL) { sysdata->recording = 1; /* open file */ record_fid = fopen(sysdata->filename,"wb"); if (!record_fid) { Error("DBFSD: Could not open output file for recording.\n"); return; } /* initialize wav header */ memcpy(&header.main_chunk, "RIFF", 4); header.length = GUINT32_TO_LE(0); memcpy(&header.chunk_type, "WAVE", 4); memcpy(&header.sub_chunk, "fmt ", 4); header.sc_len = GUINT32_TO_LE(16); header.format = GUINT16_TO_LE(1); header.modus = GUINT16_TO_LE(DB_CHANNEL_NUM_CHANNELS); header.sample_fq = GUINT32_TO_LE(DB_SAMPLE_RATE); header.bit_p_spl = GUINT16_TO_LE(DB_SAMPLE_SIZE * 8); header.byte_p_sec = GUINT32_TO_LE(DB_SAMPLE_RATE * DB_CHANNEL_NUM_CHANNELS * DB_SAMPLE_SIZE); header.byte_p_spl = GUINT16_TO_LE((GUINT16_FROM_LE(header.bit_p_spl) / (8 / DB_CHANNEL_NUM_CHANNELS))); memcpy(&header.data_chunk, "data", 4); header.data_length = GUINT32_TO_LE(0); /* init data count to zero */ record_count = 0; /* write wav header */ fwrite(&header, sizeof(wav_header), 1, record_fid); } } /* sigusr2 - callback for SIGUSR2 signal, stops recording to disk */ void sigusr2(int signum) { Debug("sigusr2 has been called"); if (record_fid != NULL) { sysdata->recording = 0; /* recording, stop recording */ header.length = GUINT32_TO_LE(record_count + sizeof(wav_header) - 8); header.data_length = GUINT32_TO_LE(record_count); fseek(record_fid, 0, SEEK_SET); fwrite(&header, sizeof(wav_header), 1, record_fid); fclose(record_fid); record_count = 0; record_fid = NULL; } } /* shutdown - frees all resources before exiting. * No need to free the global malloc'd bits here since the system process cleanup will take care of it... * inputs - none outputs - none */ void shutdown_dbfsd() { int i; Debug("closing..."); Debug("removing channels:"); unlink(tempdirstr); if(local_channels != NULL) { for (i = 0; i < sysdata->num_channels;i++) { Debug(" removing channel %d of %d...",i+1,sysdata->num_channels); close(local_channels[i].server_comm_fd); close(local_channels[i].server_cue_fd); unlink(local_channels[i].comm_filename); unlink(local_channels[i].cue_filename); if (msgctl(local_channels[i].msg_q_id,IPC_RMID,0) == -1) { Error("shutdown_dbfsd: could not delete message queue."); } } Debug("deleteing shared memory segment for channel data... "); if (shmdt(local_channels) == -1) { Error("shutdown_dbfsd: could not detach memory segment."); } if (shmctl(shmid,IPC_RMID, 0) == -1) { Error("shutdown_dbfsd: could not delete shared memory segment."); } } Debug("deleteing system data shared memory segment... "); if (shmdt(sysdata) == -1) { Error("shutdown_dbfsd: could not detach system data memory segment."); } if (shmctl(sysshmid,IPC_RMID, 0) == -1) { Error("shutdown_dbfsd: could not delete system data shared memory segment."); } Debug("closing audio devices..."); close_audio(cue_audio); close_audio(main_audio); Debug("done.\nthank you for using DBfsd."); /*I can never remember if this should be a 0 or a 1...*/ exit(0); } /*************************************************************************/ /* Execution functions */ /*************************************************************************/ /* make_ch_symlink - Loops through the available looking for a channel that is not in use. If one is found, a link to /tmp/ch otherwise /tmp/ch does not exist. When complete, ch_link is the index of the linked channel, otherwise is is greater than data->num_channels. */ void make_ch_symlink() { int i, flag,notdone; unlink(tempdirstr); /*find first unused channel*/ i=0; flag = FALSE; notdone = TRUE; while ((i < sysdata->num_channels) && notdone) { if (local_channels[i].free_channel) { symlink(local_channels[i].comm_filename,tempdirstr); local_channels[i].is_symlink = TRUE; flag = TRUE; notdone = FALSE; sysdata->free_channel_index = i; } else {i++;} } if (flag) { Debug("MAKE_SYMLINK: made link to channel %d",i); } else { sysdata->free_channel_index = -1; free_channels_flag = FALSE; Debug("MAKE_SYMLINK: All channels are in use."); } } /* run_it debug functions */ void PrintData(char* str) { Debug("%s ready_count: %d free_channel_index: %d",str, sysdata->ready_count,sysdata->free_channel_index); } void PrintChannelSettings(local_channel * ch) { printf("====================\n"); printf("Current Channel Settings:\n"); printf(" Comm Name: %s\n",ch->comm_filename); if ((ch->channel_flags & CUE_FLAG) == CUE_FLAG) printf(" Cue Name: %s\n",ch->cue_filename); switch (ch->channel_type) { case PIPE_CHANNEL: printf(" Type: PIPE\n");break; case SOCKET_CHANNEL: printf(" Type: SOCKET\n");break; default: printf(" Type: UNKNOWN\n"); } switch (ch->cue) { case 0: printf(" Cue? NO\n"); break; default: printf(" Cue? YES\n"); break; } switch (ch->free_channel) { case 0: printf(" Free? NO\n"); break; default: printf(" Free? YES\n"); break; } switch (ch->is_symlink) { case 0: printf(" Symlink? NO\n"); break; default: printf(" Symlink? YES\n"); } printf(" Left Gain: %d\n",ch->left_gain); printf(" Right Gain: %d\n",ch->right_gain); printf("====================\n"); } signed short * add_main_audio(signed short * out_buf,local_channel ** buf_pointers, int channel_count) { switch (channel_count) { case 0: return NULL; case 1: memcpy(out_buf,buf_pointers[0]->buffer.buf,DB_BUFSIZE_CHAR); return out_buf; break; case 2: fs_add2channels(out_buf,&(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer)); return out_buf; break; case 3: fs_add3channels(out_buf,&(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer),&(buf_pointers[2]->buffer)); return out_buf; break; case 4: fs_add4channels(out_buf, &(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer), &(buf_pointers[2]->buffer), &(buf_pointers[3]->buffer)); return out_buf; break; case 5: fs_add5channels(out_buf, &(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer), &(buf_pointers[2]->buffer), &(buf_pointers[3]->buffer), &(buf_pointers[4]->buffer)); return out_buf; break; case 6: fs_add6channels(out_buf, &(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer), &(buf_pointers[2]->buffer), &(buf_pointers[3]->buffer), &(buf_pointers[4]->buffer), &(buf_pointers[5]->buffer)); return out_buf; break; case 7: fs_add7channels(out_buf, &(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer), &(buf_pointers[2]->buffer), &(buf_pointers[3]->buffer), &(buf_pointers[4]->buffer), &(buf_pointers[5]->buffer), &(buf_pointers[6]->buffer)); return out_buf; break; case 8: fs_add8channels(out_buf, &(buf_pointers[0]->buffer), &(buf_pointers[1]->buffer), &(buf_pointers[2]->buffer), &(buf_pointers[3]->buffer), &(buf_pointers[4]->buffer), &(buf_pointers[5]->buffer), &(buf_pointers[6]->buffer), &(buf_pointers[7]->buffer)); return out_buf; break; default: Error("add_main_audio: fs_addNchannels NOT IMPLEMENTED!!!!!!!!"); /* fs_addNchannels(out_buf,&(buf_pointers,sysdata->num_channels);*/ break; } /* end switch */ return NULL; } signed short * add_cue_audio(signed short * out_buf,local_channel ** buf_pointers, int channel_count) { switch (channel_count) { case 0: return NULL; case 1: memcpy(out_buf,buf_pointers[0]->cue_buffer.buf,DB_BUFSIZE_CHAR); return out_buf; break; case 2: fs_add2channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer)); return out_buf; break; case 3: fs_add3channels(out_buf,&(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer),&(buf_pointers[2]->cue_buffer)); return out_buf; break; case 4: fs_add4channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer), &(buf_pointers[2]->cue_buffer), &(buf_pointers[3]->cue_buffer)); return out_buf; break; case 5: fs_add5channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer), &(buf_pointers[2]->cue_buffer), &(buf_pointers[3]->cue_buffer), &(buf_pointers[4]->cue_buffer)); return out_buf; break; case 6: fs_add6channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer), &(buf_pointers[2]->cue_buffer), &(buf_pointers[3]->cue_buffer), &(buf_pointers[4]->cue_buffer), &(buf_pointers[5]->cue_buffer)); return out_buf; break; case 7: fs_add7channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer), &(buf_pointers[2]->cue_buffer), &(buf_pointers[3]->cue_buffer), &(buf_pointers[4]->cue_buffer), &(buf_pointers[5]->cue_buffer), &(buf_pointers[6]->cue_buffer)); return out_buf; break; case 8: fs_add8channels(out_buf, &(buf_pointers[0]->cue_buffer), &(buf_pointers[1]->cue_buffer), &(buf_pointers[2]->cue_buffer), &(buf_pointers[3]->cue_buffer), &(buf_pointers[4]->cue_buffer), &(buf_pointers[5]->cue_buffer), &(buf_pointers[6]->cue_buffer), &(buf_pointers[7]->cue_buffer)); return out_buf; break; default: Error("add_cue_audio: fs_addNchannels NOT IMPLEMENTED!!!!!!!!"); /* fs_addNchannels(out_buf,buf_pointers,sysdata->num_channels);*/ break; } /* end switch */ return NULL; } /* run_it - executes the channel listener loop, applies Fourier Synthesis when data is ready. Note that two different timeout values are used with select. While audio is being played, the smaller value is being used. Once a timeout occurs, the larger value will be used. This way the audio pause command can be issued a short time after audio has stopped, and cleanup the audio output in case artifacts remain. inputs - the input channel pipes outputs - the fourier synthesis of the pipes is sent to the soundcard. */ void run_it() { static int select_result,result,channel_count,cue_count,numch; static int i,checknum; /*pointers to arrays of signed shorts*/ static local_channel ** buf_pointers; static local_channel ** temp_buf_pointers; static local_channel ** cue_pointers; static local_channel ** temp_cue_pointers; static fd_set temp_read_set; static struct timeval timeout; static int timeout_value_sec; static int timeout_value_usec; /* temp channel */ static struct local_channel_s *temp_ch; static struct local_channel_s *temp_cue; static struct channel_buf_s *temp_buf; static int total_timeout_count,current_timeout_count; static int local_cue; static int pause_flag; static int skipnum; /* static int loop_count = 0; */ /* init local vars */ result = select_result = channel_count = cue_count = i = 0; loop_flag = TRUE; checknum = total_timeout_count = current_timeout_count = 0; /* set number of (io fd's to check) to be the max read fd + 1 */ numch = local_channels[sysdata->num_channels-1].server_comm_fd + 1; /* allocate the temporary buf pointers */ buf_pointers = (local_channel **) malloc(sizeof(local_channel*) * sysdata->num_channels); cue_pointers = (local_channel **) malloc(sizeof(local_channel*) * sysdata->num_channels); for (i = 0; i < sysdata->num_channels; i++) { buf_pointers[i] = NULL; } free_channels_flag = TRUE; make_ch_symlink(); local_cue = FALSE; pause_flag = 1; /* set initial timeout to be 5 seconds */ timeout_value_sec = MIN_TIMEOUT_VALUE_SEC; timeout_value_usec = MIN_TIMEOUT_VALUE_USEC; while (loop_flag) { /* reset audio if necessary */ if (reset_audio_flag) { reset_audio_flag = 0; if (main_audio != NULL) { close_audio(main_audio); main_audio = NULL; } Debug("Re-opening main audio device."); if ((main_audio = init_audio(sysdata->main_audio_device,O_WRONLY,stdout_flag, sysdata->num_main_buffs)) == NULL) { Error("Could not open main audio device."); } if (cue_flag) { Debug("Re-opening cue audio device..."); if (cue_audio != NULL) { close_audio(cue_audio); cue_audio = NULL; } if ((cue_audio = init_audio(sysdata->cue_audio_device, O_WRONLY/* | O_NONBLOCK */, stdout_flag,sysdata->num_cue_buffs)) == NULL) { Error("Could not open cue audio device."); } } Debug("Audio is reset."); } /******* Handle IO *******/ /* reset file descriptor set */ FD_ZERO(&temp_read_set); temp_read_set = read_ch_set; /* reset temp_buf_pointer and channel pointer */ temp_buf_pointers = buf_pointers; temp_cue_pointers = cue_pointers; temp_ch = local_channels; temp_cue = local_channels; temp_buf = NULL; channel_count = cue_count = 0; /* check to see if any descriptors are ready... select returns -1 on an interrupt, which is handled elsewhere, and returns 0 on timeout. */ timeout.tv_sec = timeout_value_sec; timeout.tv_usec = timeout_value_usec; select_result = select(numch,&temp_read_set,(fd_set*) 0,(fd_set*) 0, &timeout); /* verify that all pipes have enough data in them */ if (select_result > 0) { skipnum = 0; pause_flag = 1; timeout_value_sec = MIN_TIMEOUT_VALUE_SEC; timeout_value_usec = MIN_TIMEOUT_VALUE_USEC; /* set through channels and see if data is ready */ for (i=0; i < sysdata->num_channels;i++) { if (FD_ISSET(temp_ch->server_comm_fd,&temp_read_set)) { /* get amount of data in the buffer */ if (ioctl(temp_ch->server_comm_fd,FIONREAD,&result) != 0) { perror("FIONREAD FAILED!!! "); } else { if (result < DB_BUFSIZE_CHAR) { /* sleep for 5000 miroseconds and wait for data to arrive on the pipe. the 5000 is becuase this is slightly less than the amount of sound data in a 1024 byte buffer */ int usec = 5000; struct timeval tv; temp_ch->skip_count++; tv.tv_sec = usec / 1000000; usec -= tv.tv_sec * 1000000; tv.tv_usec = usec; select(0, NULL, NULL, NULL, &tv); /* force the for loop to exit to minimize sleeps */ i = sysdata->num_channels; /* to prevent pausing all output, if less than a buffers worth of data is sitting in the pipe for more than SKIP_MAX iterations, then clean the pipe out */ if (temp_ch->skip_count < sysdata->skip_max) skipnum++; } } } temp_ch++; } /* if there is a pipe without enough data, then skip the I/O section of the loop so that the pipe has time to catch up */ if (skipnum) continue; temp_ch = local_channels; /* check each channel to see if data is ready */ for (i=0; i < sysdata->num_channels;i++) { /* grab cue value for use inside the critical section */ local_cue = temp_ch->cue; if (FD_ISSET(temp_ch->server_comm_fd,&temp_read_set)) { switch (temp_ch->channel_type) { case PIPE_CHANNEL: /* get buffer to read pipe data to, always use buffer1 */ temp_buf = &(temp_ch->buffer); result = read(temp_ch->server_comm_fd,temp_buf->buf, DB_BUFSIZE_CHAR); temp_buf->len = result; temp_ch->skip_count = 0; break; case SOCKET_CHANNEL: Error("Socket channels not yet implemented."); break; default: Error("Unknown channel type."); break; } /* if we read data, then add it to the buffer array */ if (result > 0) { /* remember buffer cause temp_ch->buffer-> requires a useless extra addition... depends on how smart the compiler is... */ temp_buf = &(temp_ch->buffer); temp_buf->data_ready = TRUE; /* see if this channel was previously free, if so then update the free channel symlink also, toss out this buffer of info because it is the init buffer written by DBAudio_Init() */ if (temp_ch->is_symlink) { if (Check_Debug()) { Debug("New data on %s",temp_ch->comm_filename); PrintChannelSettings(temp_ch); } temp_ch->is_symlink = FALSE; temp_ch->free_channel = FALSE; make_ch_symlink(); /* clear cue buffer data for synch.*/ if (cue_flag) { if (local_cue) { result = read(temp_ch->server_cue_fd,temp_buf->buf, DB_BUFSIZE_CHAR); } } } else { /* calculate check value for buffer zeroing */ checknum = DB_BUFSIZE_CHAR - temp_buf->len; /* if the max # of bytes wasn't read, then blank the tail of the buffer*/ if (checknum) { Debug("cleared %d bytes",checknum); /* divide by two since buf is signed shorts which are 2 bytes long */ memset(temp_buf->buf + (temp_buf->len / sizeof(signed short)),0,checknum); } /* keep a pointer to the buffer that has data_ready */ temp_buf_pointers[channel_count] = temp_ch; channel_count++; /* we read the cue data here becuase, cue data exists only if data exists on the main input. It is easier to use the main input pipe to detect data ready. */ if (cue_flag && local_cue) { temp_buf = &(temp_ch->cue_buffer); result = read(temp_ch->server_cue_fd,temp_buf->buf, DB_BUFSIZE_CHAR); if (result > 0) { temp_buf->len = result; temp_buf->data_ready = TRUE; /* calculate check value for buffer zeroing*/ checknum = DB_BUFSIZE_CHAR - temp_buf->len; /* if the max # of bytes wasn't read, then blank the tail of the buffer*/ if (checknum) { /* divide by two since buf is signed shorts which are 2 bytes long */ memset(temp_buf->buf + (temp_buf->len / sizeof(signed short)),0,checknum); } /* keep a pointer to the buffer that has data_ready */ temp_cue_pointers[cue_count] = temp_ch; cue_count++; } /* end if result > 0 */ } /* end cue_flag */ } } /*end if result */ else { /* Now there is a probable EOF situation so remove the pipe, and reopen it */ Debug("Handling pipe EOF: %s",temp_ch->comm_filename); FD_CLR(temp_ch->server_comm_fd,&read_ch_set); reset_channel(temp_ch,TRUE); /*check the symlink*/ if (!free_channels_flag) { Debug("Channels in use is now less than Maximum."); free_channels_flag = TRUE; make_ch_symlink(); } } } /*end fd_set check*/ temp_ch++; } /*end for*/ /*write main channel data*/ if (add_main_audio(output_buf,buf_pointers,channel_count) != NULL) { /*write cue data*/ if (cue_flag) { if (add_cue_audio(cue_output_buf,cue_pointers,cue_count) != NULL) { /* handle cue split */ if (sysdata->cue_split) { int tempval, tempval2; short * tempout, *tempout2; int i; tempout = (short *) output_buf; tempout2 = (short *) cue_output_buf; tempout = output_buf; tempout2 = cue_output_buf; for(i = 0; i < DB_BUFSIZE_SHORT/2; i++) { /* get output sample */ tempval = (int)(((float)tempout[0]) + ((float)(tempout[1]))); /* get cue sample */ tempval2 = (int)(((float)tempout2[0]) + ((float)(tempout2[1]))); if(tempval > 32767) {tempval = 32767;} if(tempval < -32688) {tempval = -32767;} if(tempval2 > 32767) {tempval2 = 32767;} if(tempval2 < -32688) {tempval2 = -32767;} /* add to cue buffer */ *tempout2 = (short)tempval; tempout2++; *tempout2 = (short)tempval2; tempout2++; tempout++; tempout++; } } if (single_output_flag) { memcpy(output_buf,cue_output_buf,DB_BUFSIZE_CHAR); } else { if (write_audio(cue_audio,cue_output_buf,DB_BUFSIZE_CHAR) <= 0) { perror("error outputing cue data "); } } } else /* add_cue_audio */ { if (single_output_flag) { /* create mono output of master and set cue to zero */ int tempval, tempval2; short * tempout, *tempout2; int i; tempout = (short *) output_buf; tempout2 = (short *) cue_output_buf; tempout = output_buf; tempout2 = cue_output_buf; for(i = 0; i < DB_BUFSIZE_SHORT/2; i++) { /* get output sample */ tempval = (int)(((float)tempout[0]) + ((float)(tempout[1]))); /* get cue sample */ tempval2 = (int)(((float)tempout2[0]) + ((float)(tempout2[1]))); if(tempval > 32767) {tempval = 32767;} if(tempval < -32688) {tempval = -32767;} if(tempval2 > 32767) {tempval2 = 32767;} if(tempval2 < -32688) {tempval2 = -32767;} /* add to cue buffer */ *tempout = (short)tempval; tempout++; *tempout = (short)0; tempout++; tempout2++; tempout2++; } } else { write_audio(cue_audio,empty_buf,DB_BUFSIZE_CHAR); } /* memset(cue_output_buf,0,DB_BUFSIZE_CHAR); */ } /* add cue audio */ } /* end write cue data */ if (write_audio(main_audio,output_buf,DB_BUFSIZE_CHAR) <= 0) { perror("error outputing main data "); } /* if we are recording, write data to file */ if (record_fid != NULL) { /* make sure there is space in the file, Max is ~4GB */ if (record_count < (MAX_WAV_LENGTH - DB_BUFSIZE_CHAR)) { record_count += fwrite(output_buf,1,DB_BUFSIZE_CHAR,record_fid); } else { /* out of space, stop recording */ raise(SIGUSR2); Error("DBFSD: ran out of space while recording output."); } } } /* add_main_audio */ } /*end if select_result*/ else { if (select_result == 0) { Debug("Timeout total: %d since last sample: %d (minutes)",total_timeout_count,current_timeout_count); total_timeout_count++; current_timeout_count++; /* since no audio has occured, set longer timeout */ timeout_value_sec = MAX_TIMEOUT_VALUE_SEC; timeout_value_usec = MAX_TIMEOUT_VALUE_USEC; if (pause_flag) { Debug("Pausing main audio..."); pause_audio(main_audio); if (cue_flag) { Debug("Pausing cue audio..."); pause_audio(cue_audio); } pause_flag = 0; } } /*received an error on select, check which one it is.*/ if (select_result == -1) { switch (errno) { case EBADF: Error("EBADF: invalid descriptors for select.\n"); break; case EINTR: Debug("EINTR: select returned due to interrupt.\n"); break; case EINVAL: Error("EINVAL: invalid parameters to select.\n"); break; default: Error("Unknown error on select.\n"); break; } } /*end if select_result*/ } /*end else*/ } /* end while */ } /***************************************************************************/ /* MAIN */ /***************************************************************************/ int main (int argc, char *argv[]) { /*daemon init's*/ #ifdef DBMIX_DEBUG printf("WARNING!!! This program has been compiled with environment options specific to the head DBMix developer. It may not work on your system!!!\n"); #endif sysdata = NULL; local_channels = NULL; init_sysdata(); Debug("sysdata allocated."); parse_cmdline(argc,argv); Debug("cmdline parsed."); Debug("pid is: %d\n",sysdata->pid); Debug("Begining initialization...\n"); /*init audio, this *must* be done before the call to init_channels*/ /* open audio device */ /* if a device was not specified on the command line, then use the hardcoded defaults. */ Debug("Opening master audio device... %s...",sysdata->main_audio_device); main_audio = cue_audio = NULL; if ((main_audio = init_audio(sysdata->main_audio_device,O_WRONLY,stdout_flag, sysdata->num_main_buffs)) == NULL) { Error("Could not open main audio device."); return -1; } if (single_output_flag) { Debug("WARNING!!! Cue will be output as a channel of the master output!!!!\n"); cue_audio = NULL; } else { if (cue_flag) { Debug("Opening cue audio device..."); if ((cue_audio = init_audio(sysdata->cue_audio_device, O_WRONLY/* | O_NONBLOCK */, 0,sysdata->num_cue_buffs)) == NULL) { Error("Could not open cue audio device."); return -1; } } } Debug("audio initialized."); if (init_channels() != SUCCESS) {shutdown_dbfsd(); return -1;} Debug("channels initialized."); /*install signal handlers*/ reset_audio_flag = 0; signal(SIGINT,sigexit); signal(SIGTERM,sigexit); signal(SIGCONT,sigcont); signal(SIGHUP,sighup); signal(SIGUSR1,sigusr1); signal(SIGUSR2,sigusr2); Debug("Initialization complete... running... \n"); run_it(); Debug("Run_it complete."); shutdown_dbfsd(); return 0; } DBMix-0.9.8/dbfsd_src/debug.c0000644000076400007640000000322307346372414011361 /* implementation of debug.h AUthor: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include int debug_level; static char tempstr[1024]; /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ void Error(const char*fmt, ...) { va_list args; va_start(args, fmt); vsprintf(tempstr,fmt,args); perror(tempstr); va_end(args); } void Debug ( const char *fmt, ...) { if(debug_level) { va_list args; va_start(args, fmt); fflush(stdout); /* fprintf(stdout,"dbfsd.c: "); */ vfprintf(stdout, fmt, args); fprintf(stdout,"\n"); fflush(stdout); va_end(args); } } int Check_Debug() { return debug_level; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbfsd_src/fsadders.c0000644000076400007640000002615407346372414012076 /* Fourier Synthesis Adders ======================== The functions contain herein perform fourier synthesis on multiple input buffers. The functions are named using the following format: fs_addxchannels() where x is the number of input channels. The function will be mathematically optimized for x number of channels. This software is brought to you by the letter A and the number 2 Version: 1 Author: Robert Michael S Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include int int_buffer[2048]; int clip_count; extern dbfsd_data* sysdata; /* fs_addNchannels - nieve fourier synthesis solution. I say nieve as in it uses straight loops while the functions are optimized a specific number of channels. */ signed short * fs_addNchannels(signed short* output, channel_buf ** in_channels, int num_channels) { printf("AddNChannels NOT IMPELEMENTED YET!!!\n"); /* int m,n,o, *temp_int_buffer; */ /* signed short * tempbuf, * out; */ /* channel_buf *tempch; */ /* temp_int_buffer = int_buffer; */ /* tempch = in_channels; */ /*find first buffer with data_ready to init the int_buffer*/ /* m = 0; */ /* while(in_channels[m].data1_ready == FALSE) */ /* { */ /* m++; */ /* tempch++; */ /* } */ /* tempbuf = tempch->buf; */ /* tempch->data1_ready = FALSE; */ /*init temp int buffer*/ /* for(n=0; n < DB_BUFSIZE_SHORT; n++) */ /* { */ /* *temp_int_buffer++ = *tempbuf++; */ /* } */ /* m++; */ /* temp_int_buffer = int_buffer; */ /* for(o = m; o < num_channels; o++) */ /* { */ /* if(tempch->data1_ready) */ /* { */ /* tempch->data1_ready = FALSE; */ /* tempbuf = tempch->buf; */ /* for(n = 0; n < DB_BUFSIZE_SHORT; n++) */ /* { */ /* *temp_int_buffer++ += *tempbuf++; */ /* } */ /* } */ /* tempch++; */ /* } */ /* out = output; */ /* temp_int_buffer = int_buffer; */ /* for(n = 0; n < DB_BUFSIZE_SHORT; n++) */ /* { */ /* *out++ = *temp_int_buffer++ / num_channels; */ /* } */ return output; } /* fs_add2channels - adds two buffers into the output buffer. addition is done using the int tempval to avoid overflow issues from adding two 16 bit values within a 16bit value. */ signed short * fs_add2channels(signed short * output, channel_buf * input1, channel_buf * input2) { signed short* out, * in1, * in2; int i,tempval; out = output; in1 = input1->buf; in2 = input2->buf; clip_count = 0; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { /*left channel*/ tempval = *in1++ + *in2++; /* applying clipping algorithm... */ if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; /*right channel*/ tempval = *in1++ + *in2++; /* applying clipping algorithm... */ if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32688) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } /* set clipping detector */ if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; /* Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); */ } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add3channels(signed short * output, channel_buf * input1, channel_buf * input2, channel_buf* input3) { signed short *out, *in1, *in2, *in3; int i,tempval; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; clip_count = 0; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++; /* applying clipping algorithm... */ if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; /*right channel*/ tempval = *in1++ + *in2++ + *in3++; /* applying clipping algorithm... */ if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32688) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; /* Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); */ } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add4channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4) { signed short* out, * in1, * in2, *in3, *in4; int i,tempval; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; in4 = input4->buf; clip_count = 0; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++ + *in4++; //tempval = tempval / 4; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; tempval = *in1++ + *in2++ + *in3++ + *in4++; //tempval = tempval / 4; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; /* Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); */ } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add5channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5) { signed short* out, * in1, * in2, *in3, *in4, *in5; int i,tempval; clip_count = 0; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; in4 = input4->buf; in5 = input5->buf; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++; //tempval = tempval / 5; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++; //tempval = tempval / 5; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; /* Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); */ } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add6channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6) { signed short* out, * in1, * in2, *in3, *in4, *in5, *in6; int i,tempval; clip_count = 0; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; in4 = input4->buf; in5 = input5->buf; in6 = input6->buf; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++; //tempval = tempval / 6; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++; //tempval = tempval / 6; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add7channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6, channel_buf *input7) { signed short* out, * in1, * in2, *in3, *in4, *in5, *in6, *in7; int i,tempval; clip_count = 0; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; in4 = input4->buf; in5 = input5->buf; in6 = input6->buf; in7 = input7->buf; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++ + *in7++; //tempval = tempval / 7; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++ + *in7++; //tempval = tempval / 7; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); } else { /* sysdata->clipping = 0; */ } return output; } signed short * fs_add8channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6, channel_buf *input7, channel_buf *input8) { signed short* out, * in1, * in2, *in3, *in4, *in5, *in6, *in7, *in8; int i,tempval; clip_count = 0; out = output; in1 = input1->buf; in2 = input2->buf; in3 = input3->buf; in4 = input4->buf; in5 = input5->buf; in6 = input6->buf; in7 = input7->buf; in8 = input8->buf; for(i = 0; i < (DB_BUFSIZE_SHORT / 2); i++) { tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++ + *in7++ + *in8++; //tempval = tempval / 8; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; tempval = *in1++ + *in2++ + *in3++ + *in4++ + *in5++ + *in6++ + *in7++ + *in8++; //tempval = tempval / 8; if(tempval > 32767) {tempval = 32767; clip_count++;} if(tempval < -32767) {tempval = -32767; clip_count++;} *out = (signed short) tempval; out++; } if(clip_count > 0) { if(clip_count > sysdata->clipping) sysdata->clipping = clip_count; Debug("FSADDERS: Clipped %d out of %d samples",clip_count,DB_BUFSIZE_SHORT / 2); } else { /* sysdata->clipping = 0; */ } return output; } DBMix-0.9.8/dbfsd_src/dbaudio.c0000644000076400007640000001226007416765043011705 /* This file provides an interface to the /dev/dsp and /dev/Mixer devices of the Open Sound System Author: Bob Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include "dbaudio.h" #include #include #ifndef SUCCESS /* this is a hack for now...*/ #define SUCCESS 0 #define FAILURE -1 #endif oss_control_struct * oss_ctrl = NULL, *cue_ctrl = NULL; oss_control_struct * init_audio(char * dsp_path, int flags, int output_stdout, int numbuffs) { oss_control_struct * local_oss_ctrl; char * dsp_device; int frag; local_oss_ctrl = (oss_control_struct *) malloc(sizeof(oss_control_struct)); local_oss_ctrl->sample_format = AFMT_S16_NE; local_oss_ctrl->channels = DBSTEREO; local_oss_ctrl->sample_rate = 44100; if (numbuffs <= 0) { numbuffs = DB_NUM_FRAGMENTS; Debug("init_audio: invalid value for numbuffs, resetting to be DB_NUM_FRAGMENTS"); } if (output_stdout) { local_oss_ctrl->fd_dsp = 1; return local_oss_ctrl; } /* allow user to specify which audio device output is sent to */ if (dsp_path == NULL) { Debug("init_audio: dsp_path is NULL."); dsp_device = "/dev/dsp"; } else { dsp_device = dsp_path; } /*try to open sound device*/ if ((local_oss_ctrl->fd_dsp = open(dsp_device,flags,0)) == -1) { char str[256]; sprintf(str,"init_audio: cannot open device \"%s\"",dsp_device); perror(str); return NULL; } /* set fragment number and size */ if (numbuffs > 0) { frag = (numbuffs << 16) | DB_FRAGSIZE; if (ioctl(local_oss_ctrl->fd_dsp,SNDCTL_DSP_SETFRAGMENT,&frag) == -1) { perror("init_audio: could not set fragment size."); close_audio(local_oss_ctrl); return NULL; } else { Debug("init_audio: num fragments %d fragement size: %d",DB_NUM_FRAGMENTS,2^DB_FRAGSIZE); } } /*set audio format*/ if (ioctl(local_oss_ctrl->fd_dsp,SNDCTL_DSP_SETFMT,&(local_oss_ctrl->sample_format)) == -1) { perror("init_audio: failure setting format."); /*perror("SNDCTL_DSP_SETFMT");*/ close_audio(local_oss_ctrl); return NULL; } /*set full duplex if allowed, remember if not*/ /* if (ioctl(local_oss_ctrl->fd_dsp, SNDCTL_DSP_SETDUPLEX, 0) == -1) { perror("init_audio: failure setting full duplex mode:"); local_oss_ctrl->fullduplex = FALSE; } else { local_oss_ctrl->fullduplex = TRUE; } */ /*set channels to be stero*/ local_oss_ctrl->channels = DBSTEREO; /* local_oss_ctrl->channels = DBMONO; */ if (ioctl(local_oss_ctrl->fd_dsp,SNDCTL_DSP_STEREO,&(local_oss_ctrl->channels)) == -1) { perror("init_audio: Error setting stereo"); /*perror("SNDCTL_DSP_STEREO");*/ close_audio(local_oss_ctrl); return NULL; } /*set sample rate*/ if (ioctl(local_oss_ctrl->fd_dsp,SNDCTL_DSP_SPEED,&(local_oss_ctrl->sample_rate)) == -1) { perror("init_audio: Could not set sample rate."); /*perror("SNDCTL_DSP_SPEED");*/ close_audio(local_oss_ctrl); return NULL; } if (local_oss_ctrl->sample_rate < 44000) { printf("ERROR: soundcard does not support minimum sampling rate of 44.1 kHz\n"); printf(" sampling rate returned by driver is: %d\n",local_oss_ctrl->sample_rate); exit(-1); } { int frag_size; audio_buf_info info; Debug("****************"); Debug("device: %s",dsp_device); Debug("sample rate: %d",local_oss_ctrl->sample_rate); Debug("getting fragment data..."); if (ioctl(local_oss_ctrl->fd_dsp, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) perror("getting frag size"); Debug("Frag size: %d",frag_size); ioctl(local_oss_ctrl->fd_dsp, SNDCTL_DSP_GETOSPACE, &info); Debug("fragments: %d",info.fragments); Debug("fragstotal: %d",info.fragstotal); Debug("fragsize: %d",info.fragsize); Debug("bytes: %d",info.bytes); Debug("****************"); } return local_oss_ctrl; } oss_control_struct * get_audio_info() { return oss_ctrl; } void close_audio(oss_control_struct * in_ctrl) { if (in_ctrl == NULL) return; close(in_ctrl->fd_dsp); free(in_ctrl); return; } void pause_audio(oss_control_struct * in_ctrl) { if (in_ctrl == NULL) return; if (in_ctrl->fd_dsp == 1) return; ioctl(in_ctrl->fd_dsp, SNDCTL_DSP_POST, 0); return; } int write_audio(oss_control_struct * in_ctrl, void* buf, int size) { if (in_ctrl == NULL) return 0; return write(in_ctrl->fd_dsp,buf,size); } int read_audio(oss_control_struct * in_ctrl, void* buf, int size) { if (in_ctrl == NULL) return 0; return read(in_ctrl->fd_dsp,buf,size); } DBMix-0.9.8/dbfsd_src/debug.h0000644000076400007640000000222207346372414011364 /* Debug functions. Author: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ #ifdef __cplusplus extern "C" { #endif void Error(const char* fmt, ...); void Debug(const char *fmt, ...); int Check_Debug(); #ifdef __cplusplus } #endif DBMix-0.9.8/dbfsd_src/dbaudio.h0000644000076400007640000000622207351671724011713 /* dbaudio.h structure and function definitions for interfacing with the /dev/dsp device Author: Bob Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef __DB_AUDIO_H_ #define __DB_AUDIO_H_ #include /*The following structure contains all the variables needed to control the Open Sound System device.*/ #define DBMONO 0 #define DBSTEREO 1 /* audio devices are hardcoded for now... */ #ifdef DBMIX_DEBUG #define DEFAULT_AUDIO_DEVICE "/dev/dsp0" #define DEFAULT_CUE_AUDIO_DEVICE "/dev/dsp8" #else #define DEFAULT_AUDIO_DEVICE "/dev/dsp" #define DEFAULT_CUE_AUDIO_DEVICE "/dev/dsp2" #endif /* #ifndef DB_FRAGSIZE */ #if 0 #define DB_FRAGSIZE 9 /* 2^DB_FRAGSIZE is the size of the fragment: 2^11 = 2048 */ #define DB_NUM_FRAGMENTS 65536 / (2^DB_FRAGSIZE) #endif /* #endif */ typedef struct oss_control_s { /*variables for controlling the Mixer device /dev/Mixer */ int fd_mixer; /*file descriptors*/ int fd_dsp; /*Soundcard.h Macro Description */ int master_volume; /*SOUND_MIXER_VOLUME master output level*/ int treble; /*SOUND_MIXER_TREBLE master treble*/ int bass; /*SOUND_MIXER_BASS master bass*/ int synth_input_volume;/*SOUND_MIXER_SYNTH synthesizer input volume*/ int PCM_volume; /*SOUND_MIXER_PCM Out vol for devs dsp, audio*/ int speaker_volume; /*SOUND_MIXER_SPEAKER Out vol for PC speakers*/ int line_input_volume; /*SOUND_MIXER_LINE in vol for line in*/ int mic_input_volume; /*SOUND_MIXER_MIC in vol from microphone*/ int CD_input_volume; /*SOUND_MIXER_CD in vol from cd audio*/ int IMIX_volume; /*SOUND_MIXER_IMIX some recording thing */ int ALTPCM_volume; /*SOUND_MIXER_ALTPCM out vol for alternate codec*/ int record_level; /*SOUND_MIXER_RECLEV global recording level*/ /*varibles for controlling the /dev/dsp device*/ int sample_format; /*format of data sent to dsp*/ int channels; /*0 = mono 1 = stereo*/ int sample_rate; /*sampling rate*/ int fullduplex; /* true/false */ } oss_control_struct; /* Interface functions */ oss_control_struct * init_audio(char * dsp_path, int flags, int output_stdout, int numbuffs); void close_audio(oss_control_struct * in_ctrl); void pause_audio(oss_control_struct * in_ctrl); int write_audio(oss_control_struct * in_ctrl, void* buf, int size); int read_audio(oss_control_struct * in_ctrl, void* buf, int size); #endif /* __DB_AUDIO_H_ */ DBMix-0.9.8/dbfsd_src/fsadders.h0000644000076400007640000000445007346372414012076 /* fsadders.h structure and function definitions for the fourier synthesis adders Author: Robert Michael S Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef __FSADDERS_H_ #define __FSADDERS_H_ signed short * fs_add2channels(signed short * output, channel_buf * input1, channel_buf * input2); signed short * fs_add3channels(signed short * output, channel_buf * input1, channel_buf * input2, channel_buf* input3); signed short * fs_add4channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4); signed short * fs_add5channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5); signed short * fs_add6channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6); signed short * fs_add7channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6, channel_buf *input7); signed short * fs_add8channels(signed short *output, channel_buf *input1, channel_buf *input2, channel_buf *input3, channel_buf *input4, channel_buf *input5, channel_buf *input6, channel_buf *input7, channel_buf *input8); signed short * fs_addNchannels(signed short* output, channel_buf ** in_channels, int num_channels); #endif /* __FSADDERS_H_ */ DBMix-0.9.8/dbfsd_src/dbcat.c0000644000076400007640000002043707420502704011344 /* DB Concatenate ============== DBCat takes in sound data, converts it to the 16bit unsigned 44.1kHz format and then sends the data to the DB Fourier Synthesis Daemon. DBCat sends the data to whichever dbfsd pipe is free at the time. If no pipe is free, the program will exit with an error message. Version: B.2 Author: Bob Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include /* functions used to dynamically link to libs */ #include #include #define DBCAT_DEFAULT_NAME "DBCat" #define DBCAT_SAMPLE_NAME "DBSamp" extern int errno; extern int debug_level; int loop_flag; int sample_flag; int in_fd,out_fd; int numch,sample_size,sample_rate,chindex; enum channel_type_e type; int pause_flag; #ifdef USE_DYNAMIC_LIBRARY DBAudioLibFunctions * dbaudiofxns; void * h; #endif /***************************************************************************/ /* Initialization functions */ /***************************************************************************/ /* print_help - outputs help to the console. inputs - none outputs - text to the console. */ void print_version() { printf("DBCat - sound concatenation utility for the DB Fourier Synthesis Daemon\n"); printf("%s\n",DBMIX_COPYRIGHT); printf("DBMix Version: %s\n",DBMIX_VERSION); } void print_help() { print_version(); printf("\n"); printf("Supported options [defaults in brackets]:\n"); printf(" -d turn on debug messages to console [Off]\n"); printf(" -v print version information. [None]\n"); printf(" -m input data is mono. [Stereo]\n"); printf(" -r N input data has a sampling rate of N Hz [44100 Hz]\n"); printf(" -8 input data is 8 bit unsigned samples [16 bit signed]\n"); printf(" -c X use channel X if available [first available]\n"); printf(" -S sample only mode. [none]\n"); printf("\n"); } /* parse_cmdline - steps through argv and sets all the variables inputs - argc argv outputs - sets system variables */ void parse_cmdline(int argc, char* argv[]) { int opt; in_fd = 0; debug_level = 0; numch = 2; sample_size = 16; sample_rate = 44100; chindex = 0; pause_flag = 0; sample_flag = 0; while((opt = getopt(argc,argv,"hvdr:c:m8S")) != -1) { switch(opt) { case 'd': debug_level = 1; break; case 'h': print_help(); exit(0); break; case 'm': numch = 1; break; case '8': sample_size = 8; break; case 'r': sample_rate = atoi(optarg); Debug("sample_rate is %d\n",sample_rate); break; case 'c': chindex = atoi(optarg); Debug("chindex is %d\n",chindex); break; case 'v': print_version(); exit(0); case 'S': sample_flag = 1; Debug("Set sample only mode\n"); break; case ':': Debug("option needs a value\n"); exit(0); case '?': Debug("unknown option: %c\n",optopt); exit(0); default: break; } } } /* sigexit - changes system variables to force clean shutdown inputs - none outputs - none */ void sigexit(int signum) { loop_flag = FALSE; #ifdef USE_DYNAMIC_LIBRARY if(dbaudiofxns != NULL) dbaudiofxns->DBAudio_Close(); dlclose(h); #else DBAudio_Close(); #endif Debug("DBCat has completed. Meow.\n"); exit(0); } /* function to sleep a thread for usec microseconds*/ void dbcat_usleep(gint usec) { struct timeval tv; tv.tv_sec = usec / 1000000; usec -= tv.tv_sec * 1000000; tv.tv_usec = usec; select(0, NULL, NULL, NULL, &tv); } void dbcat_message_handler(dbfsd_msg msg) { switch (msg.msg_type) { case DBMSG_PAUSE: pause_flag = 1; DBAudio_Pause(pause_flag); break; case DBMSG_UNPAUSE: pause_flag = 0; DBAudio_Pause(pause_flag); break; case DBMSG_PLAY: pause_flag = 0; DBAudio_Pause(pause_flag); break; case DBMSG_MUTE: break; case DBMSG_UNMUTE: break; case DBMSG_STOP: break; case DBMSG_EJECT: break; case DBMSG_REWIND: break; case DBMSG_FFORWARD: break; case DBMSG_NEXT: break; case DBMSG_PREV: break; default: Error("dbcat_message_handler: unknown or unsupported IPC message %d\n ",msg); } return; } /***************************************************************************/ /* MAIN */ /***************************************************************************/ int main(int argc, char **argv) { char buf[PIPE_BUF*2]; char * dbcat_name; int len,error,count; #ifdef USE_DYNAMIC_LIBRARY void * (*get_fxns) (); /* define function pointer to hold pntr to DBAudio_Get_Functions() */ dbaudiofxns = NULL; #endif debug_level = 0; type = PIPE_CHANNEL; pause_flag = 0; memset(buf,0,PIPE_BUF*2); /*install signal handlers*/ signal(SIGINT,sigexit); signal(SIGTERM,sigexit); parse_cmdline(argc,argv); if (sample_flag) { dbcat_name = DBCAT_SAMPLE_NAME; } else { dbcat_name = DBCAT_DEFAULT_NAME; } #ifdef USE_DYNAMIC_LIBRARY Debug("USING DLOPEN()"); /* link against DBAudioLib and retrieve fucntion structure */ if((h = dlopen("libdbaudiolib.so",RTLD_NOW)) == NULL) { printf("Failed to open DBAudioLib:: %s\n",dlerror()); return 1; } if((get_fxns = dlsym(h,"DBAudio_Get_Functions")) == NULL) { printf("Failed to retrieve pntr to DBAudio_Get_Functions: %s\n",dlerror()); return 1; } dbaudiofxns = (DBAudioLibFunctions*)get_fxns(); error = dbaudiofxns->DBAudio_Init(dbcat_name,sample_size,sample_rate,numch,type,chindex); /* error = DBAudio_Init("Dbcat",sample_size,sample_rate,numch,type,chindex); */ #else Debug("USING SHARED LIBRARY"); error = DBAudio_Init(dbcat_name,sample_size,sample_rate,numch,type,chindex); #endif if(error != SUCCESS) { printf("Error. Is dbfsd running?\n"); return 1; } #ifdef USE_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Set_Message_Handler(dbcat_message_handler,DBMSG_ALL); #else DBAudio_Set_Message_Handler(dbcat_message_handler,DBMSG_ALL); #endif /*init variables for main loop*/ loop_flag = TRUE; count = 0; /*main loop*/ while(loop_flag) { char c1; if (pause_flag) { #ifdef USE_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Handle_Message_Queue(); #else DBAudio_Handle_Message_Queue(); #endif usleep(50000); } else { /* if not in sample mode, read in data */ if (!sample_flag) { /* read in data, adjusting for count bytes already in the buffer */ if((len = read(in_fd,buf+count,PIPE_BUF-count)) < 0) { loop_flag = FALSE; #ifdef USE_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Close(); dlclose(h); #else DBAudio_Close(); #endif } len+=count; } else { /* sample mode, write full empty buffer */ len = PIPE_BUF*2; } #ifdef USE_DYNAMIC_LIBRARY if((count = dbaudiofxns->DBAudio_Write(buf,len)) == FAILURE) #else if((count = DBAudio_Write(buf,len)) == FAILURE) #endif { perror("DBCAT: DBAudio_Write failed::"); } /* if we could not write the full buffer, copy the unwritten data to the front of the buffer */ if((count < len) && (count > 0)) { c1 = *(buf+count); memmove(buf,buf+count,len - count); count = len - count; } else { /* if we could not write *any* data, we are probably PAUSED adjust count to compensate */ if (count == 0) { count = PIPE_BUF; } else { count = 0; } } } } return 0; } DBMix-0.9.8/dbfsd_src/dbin.c0000644000076400007640000003001307346372414011204 /* DB Line In Utility ================== DBin reads data from a sound device, and forwards the data to DBMix. It is through the use of DBin that line in and microphone data can be added to the DBMix system. Version: 1 Author: Bob Dean Copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* functions used to dynamically link to libs */ #include #include #include #include "dbaudio.h" #define DBIN_BUFSIZE (PIPE_BUF * 10) #define DBIN_WRITESIZE (PIPE_BUF * 2) #define DBIN_READSIZE (PIPE_BUF) extern int errno; extern int debug_level; int loop_flag, the_other_loop_flag; int in_fd,out_fd; int numch,sample_size,sample_rate,chindex; enum channel_type_e type; char audio_source_path[256]; int line_flag; int stdout_flag; #ifdef USE_DYNAMIC_LIBRARY DBAudioLibFunctions * dbaudio; void * h; #endif pthread_t buffer_thread; gint read_index, write_index; char * buffer; oss_control_struct main_audio; /***************************************************************************/ /* Initialization functions */ /***************************************************************************/ /* print_help - outputs help to the console. inputs - none outputs - text to the console. */ void print_version() { printf("DBIn - line in and microphone client for DBMix\n"); printf("%s\n",DBMIX_COPYRIGHT); printf("Compiled for DBMix version %s\n",DBMIX_VERSION); } void print_help() { print_version(); printf("\n"); printf("Usage:\n"); printf(" dbin [options]\n"); printf("\n"); printf("Supported options (argument type in parens) [default value in brackets]:\n"); printf(" -d print debug messages (none) [off]\n"); printf(" -l audio input source in line in (none) [mic]\n"); printf(" -a set audio device path (string) [/dev/dsp]\n"); printf(" -c X use channel X if available (int) [first available]\n"); printf(" -m input data is mono. (none) [Stereo]\n"); printf(" -r N input sampling rate is N Hz (int) [44100 Hz]\n"); printf(" -8 input data is 8 bit unsigned (none) [16 bit signed]\n"); printf(" -s output to stdout, not dbmix (none) [dbmix]\n"); printf(" -h print help screen (none) [mic]\n"); printf("\n\n"); } /* parse_cmdline - steps through argv and sets all the variables inputs - argc argv outputs - sets system variables */ void parse_cmdline(int argc, char* argv[]) { int opt; debug_level = 0; numch = 2; sample_size = 16; sample_rate = 44100; chindex = 0; line_flag = 0; stdout_flag = 0; strcpy(audio_source_path,"/dev/dsp0"); while ((opt = getopt(argc,argv,"hsvda:lr:c:m8")) != -1) { switch (opt) { case 'd': debug_level = 1; break; case 'h': print_help(); exit(0); break; case 's': stdout_flag = 1; break; case 'm': numch = 1; break; case 'l': line_flag = 1; break; case 'a': strcpy(audio_source_path,optarg); Debug("Set master audio device to be: \"%s\"",audio_source_path); break; case '8': sample_size = 8; Debug("set sample size to be AFMT_S8"); break; case 'r': sample_rate = atoi(optarg); Debug("sample_rate is %d",sample_rate); break; case 'c': chindex = atoi(optarg); Debug("chindex is %d",chindex); break; case 'v': print_version(); exit(0); break; case ':': Debug("option needs a value"); exit(0); case '?': Debug("unknown option: %c",optopt); exit(0); default: break; } } } /* sigexit - changes system variables to force clean shutdown inputs - none outputs - none */ void sigexit(int signum) { loop_flag = FALSE; the_other_loop_flag = FALSE; return; } /* function to sleep a thread for usec microseconds*/ void dbin_usleep(gint usec) { struct timeval tv; tv.tv_sec = usec / 1000000; usec -= tv.tv_sec * 1000000; tv.tv_usec = usec; select(0, NULL, NULL, NULL, &tv); } /* buffer thread loop - takes data from buffer and writes it to dbmix */ void * write_audio_loop(void * args) { gint used, count; char * buf; while (the_other_loop_flag) { buf = buffer + read_index; /* determine if there is data to be written */ if (write_index >= read_index) { used = write_index - read_index; } used = DBIN_BUFSIZE - (read_index - write_index); if (used > 0) { /* write to stdout if desired */ if (stdout_flag) { write(1,buf,DBIN_WRITESIZE); } else { /* write to dbmix */ #ifdef USE_DYNAMIC_LIBRARY if ((count = dbaudio->DBAudio_Write(buf,DBIN_WRITESIZE)) == FAILURE) #else if ((count = DBAudio_Write(buf,DBIN_WRITESIZE)) == FAILURE) #endif { #ifdef USE_DYNAMIC_LIBRARY dbaudio->DBAudio_perror("DBIN: DBAudio_Write failed::"); #else DBAudio_perror("DBIN: DBAudio_Write failed::"); #endif } } /* update buffer control variables */ read_index += DBIN_WRITESIZE; read_index = read_index % DBIN_BUFSIZE; } else { printf("writer sleeping"); dbin_usleep(10000); } } pthread_exit(NULL); } /***************************************************************************/ /* MAIN */ /***************************************************************************/ int main(int argc, char **argv) { int error,count; int mixer_fd, value; oss_control_struct main_audio; #ifdef USE_DYNAMIC_LIBRARY void * (*get_fxns) (); /* define function pointer to hold pntr to DBAudio_Get_Functions() */ dbaudio = NULL; #endif type = PIPE_CHANNEL; buffer = NULL; /*install signal handlers*/ signal(SIGINT,sigexit); signal(SIGTERM,sigexit); parse_cmdline(argc,argv); count = DBIN_BUFSIZE; buffer = (char * ) malloc(count); /* open audio device */ { int flags; int frag; flags = O_RDONLY; main_audio.sample_format = sample_size; main_audio.channels = numch; main_audio.sample_rate = sample_rate; if((main_audio.fd_dsp = open(audio_source_path,flags,0)) == -1) { char str[256]; sprintf(str,"init_audio: cannot open device \"%s\"",audio_source_path); perror(str); exit(0); } Debug("opened audio device %s",audio_source_path); frag = (10 << 16) | (DB_FRAGSIZE); if(ioctl(main_audio.fd_dsp,SNDCTL_DSP_SETFRAGMENT,&frag) == -1) { perror("init_audio: could not set fragment size."); goto cleanup; } else { Debug("init_audio: num fragments %d fragement size: %d",DB_NUM_FRAGMENTS,2^DB_FRAGSIZE); } if(ioctl(main_audio.fd_dsp,SNDCTL_DSP_SETFMT,&(main_audio.sample_format)) == -1) { perror("init_audio: failure setting format."); /*perror("SNDCTL_DSP_SETFMT");*/ goto cleanup; } else { Debug("set sound format to be %d",main_audio.sample_format); } main_audio.channels = DBSTEREO; if(ioctl(main_audio.fd_dsp,SNDCTL_DSP_STEREO,&(main_audio.channels)) == -1) { perror("init_audio: Error setting stereo"); /*perror("SNDCTL_DSP_STEREO");*/ goto cleanup; } else { Debug("set stereo mode"); } /*set sample rate*/ if(ioctl(main_audio.fd_dsp,SNDCTL_DSP_SPEED,&(main_audio.sample_rate)) == -1) { perror("init_audio: Could not set sample rate."); /*perror("SNDCTL_DSP_SPEED");*/ goto cleanup; } else { Debug("sample rate set to be %d",main_audio.sample_rate); } { int frag_size; audio_buf_info info; Debug("****************"); Debug("device: %s",audio_source_path); Debug("getting fragment data..."); if (ioctl(main_audio.fd_dsp, SNDCTL_DSP_GETBLKSIZE, &frag_size) == -1) perror("getting frag size"); Debug("Frag size: %d",frag_size); ioctl(main_audio.fd_dsp, SNDCTL_DSP_GETOSPACE, &info); Debug("fragments: %d",info.fragments); Debug("fragstotal: %d",info.fragstotal); Debug("fragsize: %d",info.fragsize); Debug("bytes: %d",info.bytes); Debug("****************"); } } /* init recording source */ { mixer_fd = open("/dev/mixer0",O_RDONLY); if (mixer_fd != -1) { if(line_flag) { Debug("Setting source to be line"); value = (1 << SOUND_MIXER_LINE); } else { Debug("Setting source to be mic"); value = (1 << SOUND_MIXER_MIC); } if (ioctl(mixer_fd,SOUND_MIXER_WRITE_RECSRC, &value) != 0) { Error("Could not set record source."); goto cleanup; } else { Debug("Set record source."); } close(mixer_fd); } else { perror("DBin: failed to set record source."); } } if (!stdout_flag) { #ifdef USE_DYNAMIC_LIBRARY /* link against DBAudioLib and retrieve fucntion structure */ { if ((h = dlopen("libdbaudiolib.so",RTLD_NOW)) == NULL) { Debug("Failed to open DBAudioLib:: %s",dlerror()); goto cleanup; } if ((get_fxns = dlsym(h,"DBAudio_Get_Functions")) == NULL) { Debug("Failed to retrieve pntr to DBAudio_Get_Functions: %s",dlerror()); goto cleanup; } dbaudio = (DBAudioLibFunctions*)get_fxns(); } #endif /* init dbaudiolib */ { #ifdef USE_DYNAMIC_LIBRARY error = dbaudio->DBAudio_Init("DBin",sample_size,sample_rate,numch,type,chindex); dbaudio->DBAudio_Clear_Channel_Flag(PITCH_FLAG); dbaudio->DBAudio_Clear_Channel_Flag(PAUSE_FLAG); #else error = DBAudio_Init("DBin",sample_size,sample_rate,numch,type,chindex); DBAudio_Clear_Channel_Flag(PITCH_FLAG); DBAudio_Clear_Channel_Flag(PAUSE_FLAG); #endif if (!line_flag) { #ifdef USE_DYNAMIC_LIBRARY dbaudio->DBAudio_Set_Channel_Flag(MIC_FLAG); #else DBAudio_Set_Channel_Flag(MIC_FLAG); #endif } if (error != SUCCESS) { Debug("Error. Is dbfsd running?"); goto cleanup; } else { Debug("Opened dbmix channel."); } } } /*init variables for main loop*/ loop_flag = TRUE; the_other_loop_flag = TRUE; count = 0; pthread_create(&buffer_thread,NULL,write_audio_loop,NULL); /* read data from soundcard */ { gint len, free; char * buf; while (loop_flag) { buf = buffer + write_index; /* determine if there is enough room in the buffer for new data */ if (read_index > write_index) { free = read_index - write_index; } else { free = DBIN_BUFSIZE - write_index; } if (read_index == write_index) { free = 0; } /* if there is free space */ if (free >= DBIN_READSIZE) { /* read data into buffer */ if ((len = read(main_audio.fd_dsp,buf,DBIN_READSIZE)) > 0) { write_index += DBIN_READSIZE; write_index = write_index % DBIN_BUFSIZE; } else { if(errno != EIO) { loop_flag = FALSE; perror("DBin main(): unexpected error:"); } } } else { /* sleep if no space available */ Debug("reader sleeping"); dbin_usleep(5000); } } } cleanup: /* pthread_join(buffer_thread, NULL); */ close(main_audio.fd_dsp); if (buffer != NULL) { free(buffer); } #ifdef USE_DYNAMIC_LIBRARY if (dbaudio != NULL) { dbaudio->DBAudio_Close(); } dlclose(h); #else if (DBAudio_Ready()) { DBAudio_Close(); } #endif Debug("DBin has completed. Have a nice day!\n"); exit(0); } DBMix-0.9.8/xmms_plugin/0000777000076400007640000000000007436306703010622 5DBMix-0.9.8/xmms_plugin/Makefile.in0000664000076400007640000002311107436306703012603 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ lib_LTLIBRARIES = libdbmix.la libdir = $(XMMS_OUTPUT_PLUGIN_DIR) libdbmix_la_LDFLAGS = -export-dynamic -avoid-version LIBS = @GTK_LIBS@ @PTHREAD_LIBS@ -lxmms -ldbaudiolib COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -D_REENTRANT @GTK_CFLAGS@ -I../include @DBMIX_DEBUG@ COMMON_SRC = dbmix.c dbmixout.h mixer.c about.c configure.c audio.c init.c debug.c CFLAGS = $(COMMON_CFLAGS) libdbmix_la_SOURCES = $(COMMON_SRC) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ libdbmix_la_LIBADD = libdbmix_la_OBJECTS = dbmix.lo mixer.lo about.lo configure.lo audio.lo \ init.lo debug.lo COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(libdbmix_la_SOURCES) OBJECTS = $(libdbmix_la_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps xmms_plugin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) distclean-libLTLIBRARIES: maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: libdbmix.la: $(libdbmix_la_OBJECTS) $(libdbmix_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libdbmix_la_LDFLAGS) $(libdbmix_la_OBJECTS) $(libdbmix_la_LIBADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = xmms_plugin distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done about.lo about.o : about.c dbmixout.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h audio.lo audio.o : audio.c ../include/dbsoundcard.h \ ../include/dbchannel.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbmixout.h configure.lo configure.o : configure.c dbmixout.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h dbmix.lo dbmix.o : dbmix.c dbmixout.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h debug.lo debug.o : debug.c ../include/dbdebug.h init.lo init.o : init.c ../include/dbaudiolib.h dbmixout.h \ ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbdebug.h mixer.lo mixer.o : mixer.c dbmixout.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-libLTLIBRARIES install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-libLTLIBRARIES uninstall: uninstall-am all-am: Makefile $(LTLIBRARIES) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile \ mostlyclean-libtool distclean-libtool clean-libtool \ maintainer-clean-libtool tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/xmms_plugin/Makefile.am0000644000076400007640000000065607346372416012605 lib_LTLIBRARIES = libdbmix.la libdir = $(XMMS_OUTPUT_PLUGIN_DIR) libdbmix_la_LDFLAGS = -export-dynamic -avoid-version LIBS = @GTK_LIBS@ @PTHREAD_LIBS@ -lxmms -ldbaudiolib COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -D_REENTRANT @GTK_CFLAGS@ -I../include @DBMIX_DEBUG@ COMMON_SRC = dbmix.c dbmixout.h mixer.c about.c configure.c audio.c init.c debug.c CFLAGS = $(COMMON_CFLAGS) libdbmix_la_SOURCES = $(COMMON_SRC) DBMix-0.9.8/xmms_plugin/dbmix.c0000644000076400007640000000322207433676622012013 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbmixout.h" OutputPlugin dbmix_op = { NULL, NULL, "DBMix Output Plugin v0.9.8 OSS", dbmix_init, dbmix_about, dbmix_configure, dbmix_get_volume, dbmix_set_volume, dbmix_open, dbmix_write, dbmix_close, dbmix_flush, dbmix_pause, dbmix_free, dbmix_playing, dbmix_get_output_time, dbmix_get_written_time, }; OutputPlugin *get_oplugin_info(void) { return &dbmix_op; } DBMix-0.9.8/xmms_plugin/dbmixout.h0000644000076400007640000000467707434034401012547 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef DBMIXOUT_H #define DBMIXOUT_H #include #include #include #include #include #include #include #include #include #include #include "xmms/plugin.h" /* #include "libxmms/util.h" */ #include extern OutputPlugin op; typedef struct { gchar channel_name[DB_CHANNEL_NAME_SIZE]; gint buffer_size; gint prebuffer; gint close_flag; gint buffer_enable; } DBMixConfig; #define DBMIX_MESSAGES (DBMSG_ALL) extern DBMixConfig dbmix_cfg; void dbmix_message_handler(dbfsd_msg msg); void * dbmix_message_handler_loop(void * arg); int dbmix_message_handler_callback(gpointer data); void dbmix_init(void); void dbmix_about(void); void dbmix_configure(void); void dbmix_get_volume(int *l, int *r); void dbmix_set_volume(int l, int r); int dbmix_playing(void); int dbmix_free(void); void dbmix_write(void *ptr, int length); void dbmix_close(void); void dbmix_flush(int time); void dbmix_pause(short p); int dbmix_open(AFormat fmt, int rate, int nch); int dbmix_get_output_time(void); int dbmix_get_written_time(void); void dbmix_set_audio_params(void); #endif DBMix-0.9.8/xmms_plugin/mixer.c0000644000076400007640000000335007346372416012033 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbmixout.h" #include #include #ifdef DBMIX_DYNAMIC_LIBRARY extern local_channel* dbmix_ch; extern DBAudioLibFunctions *dbaudiofxns; #endif void dbmix_get_volume(int *l, int *r) { #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Get_Volume(l,r); #else DBAudio_Get_Volume(l,r); #endif } void dbmix_set_volume(int l, int r) { #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Set_Volume(l,r); #else DBAudio_Set_Volume(l,r); #endif } DBMix-0.9.8/xmms_plugin/about.c0000644000076400007640000000613007346372416012020 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbmixout.h" #include #include static GtkWidget *dialog, *button, *label; void dbmixout_about_close_cb(GtkWidget * w, gpointer data) { gtk_widget_destroy(dialog); } void dbmix_about(void) { char tempstr[1024]; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), "About DBMix Output Plugin"); gtk_container_border_width(GTK_CONTAINER(dialog), 5); sprintf(tempstr, "DBMix Digital Audio Mixing System %s\n\n \ Based off of the OSS Output plugin for xmms by \n \ Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies\n\n All additional code to allow the plugin to work with\n \ DBMix %s\n\n This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation; either version 2 of the License, or\n\ (at your option) any later version.\n\ \n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n\ USA.",DBMIX_VERSION,DBMIX_COPYRIGHT); label = gtk_label_new(tempstr); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); gtk_widget_show(label); button = gtk_button_new_with_label(" Close "); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(dbmixout_about_close_cb), NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show(dialog); gtk_widget_grab_focus(button); } DBMix-0.9.8/xmms_plugin/configure.c0000644000076400007640000002643107434030046012661 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "dbmixout.h" #include #include #include #include static GtkWidget *configure_win = NULL; static GtkWidget *main_box; static GtkWidget *name_box,*ipc_box,*close_box,*label,*text,*button_box,*ok,*cancel; static GtkWidget *ipc_frame/* ,*ipc_group,*pipe_radiobutton, *shm_radiobutton*/ ; #ifdef CLOSE_FLAG static GtkWidget *close_group,*close_frame,*close_radiobutton, *open_radiobutton; #endif static GtkWidget *buffer_size_spin; static GtkWidget *enable_buffer_button; extern gint xmms_session_id; extern gint close_flag; #ifdef DBMIX_DYNAMIC_LIBRARY extern DBAudioLibFunctions * dbaudiofxns; #endif static gchar channel_name[DB_CHANNEL_NAME_SIZE]; extern DBMixConfig dbmix_cfg; static void ok_button(GtkWidget * w, gpointer data) { ConfigFile *cfgfile; gchar * str1; str1 = gtk_entry_get_text(GTK_ENTRY(text)); #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Set_Channel_Name(str1); #else DBAudio_Set_Channel_Name(str1); #endif #if CLOSE_FLAG if(GTK_TOGGLE_BUTTON(close_radiobutton)->active) { dbmix_cfg.close_flag = TRUE; } else { dbmix_cfg.close_flag = FALSE; } #endif cfgfile = xmms_cfg_open_default_file(); xmms_cfg_write_int(cfgfile, "DBMIX", "buffer_size", dbmix_cfg.buffer_size); xmms_cfg_write_int(cfgfile, "DBMIX", "prebuffer", dbmix_cfg.prebuffer); xmms_cfg_write_int(cfgfile, "DBMIX", "buffer_enable", dbmix_cfg.buffer_enable); #if CLOSE_FLAG xmms_cfg_write_int(cfgfile, "DBMIX", "close_flag",dbmix_cfg.close_flag); #endif xmms_cfg_write_string(cfgfile, "DBMIX", "channel_name",dbmix_cfg.channel_name); xmms_cfg_write_default_file(cfgfile); xmms_cfg_free(cfgfile); gtk_widget_destroy(configure_win); } void get_value_buffer(GtkAdjustment * adj) { dbmix_cfg.buffer_size = adj->value; } void get_value_prebuffer(GtkAdjustment * adj) { dbmix_cfg.prebuffer = adj->value; } void enter_callback( GtkWidget *widget, GtkWidget *entry ) { strcpy(dbmix_cfg.channel_name,gtk_entry_get_text(GTK_ENTRY(entry))); } void enable_buffer_clicked(GtkWidget *widget) { if (GTK_TOGGLE_BUTTON(widget)->active) { dbmix_cfg.buffer_enable = TRUE; } else { dbmix_cfg.buffer_enable = FALSE; } /* Grey out the button if needed */ gtk_widget_set_sensitive(GTK_WIDGET(buffer_size_spin),dbmix_cfg.buffer_enable); } void dbmix_configure(void) { GtkWidget *buffer_frame, *buffer_vbox, *buffer_table; GtkWidget *buffer_size_box, *buffer_size_label; GtkObject *buffer_size_adj; if (!configure_win) { configure_win = gtk_window_new(GTK_WINDOW_DIALOG); gtk_signal_connect(GTK_OBJECT(configure_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win); gtk_window_set_title(GTK_WINDOW(configure_win), "DBMix Plugin configuration"); /* gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, FALSE, FALSE); */ gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE); gtk_container_border_width(GTK_CONTAINER(configure_win), 10); /* make boxes */ { main_box = gtk_vbox_new(FALSE,0); gtk_widget_show(main_box); name_box = gtk_hbox_new(FALSE,0); gtk_widget_show(name_box); ipc_box = gtk_hbox_new(FALSE,0); gtk_widget_show(ipc_box); close_box = gtk_hbox_new(FALSE,0); gtk_widget_show(close_box); } /* Fill name box */ { gchar str1[DB_CHANNEL_NAME_SIZE]; gint tempint; label = gtk_label_new("Channel Name:"); gtk_box_pack_start(GTK_BOX(name_box),label,FALSE,FALSE,10); gtk_widget_show(label); text = gtk_entry_new_with_max_length(DB_CHANNEL_NAME_SIZE-1); #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Get_Channel_Name(str1); #else DBAudio_Get_Channel_Name(str1); #endif sscanf(str1,"%s - %d",channel_name,&tempint); gtk_entry_set_text(GTK_ENTRY(text),channel_name); gtk_signal_connect(GTK_OBJECT(text), "changed", GTK_SIGNAL_FUNC(enter_callback), text); gtk_box_pack_start(GTK_BOX(name_box),text,FALSE,FALSE,10); gtk_widget_show(text); } /* fill ipc box */ /* { */ /* ipc_frame = gtk_frame_new("IPC Method:"); */ /* gtk_container_set_border_width(GTK_CONTAINER(ipc_frame), 5); */ /* gtk_widget_show(ipc_frame); */ /* pipe_radiobutton = gtk_radio_button_new_with_label(NULL, */ /* "Use pipes for IPC"); */ /* ipc_group = gtk_radio_button_group(GTK_RADIO_BUTTON(pipe_radiobutton)); */ /* shm_radiobutton = gtk_radio_button_new_with_label(ipc_group, */ /* "Use shared memory for IPC"); */ /* switch(dbaudiofxns->DBAudio_Get_Channel_Type()) */ /* { */ /* case PIPE_CHANNEL: */ /* gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pipe_radiobutton),TRUE); */ /* break; */ /* default: */ /* break; */ /* } */ /* gtk_container_add(GTK_CONTAINER(ipc_frame),ipc_box); */ /* gtk_box_pack_start(GTK_BOX(ipc_box),pipe_radiobutton,TRUE,TRUE,0); */ /* gtk_box_pack_start(GTK_BOX(ipc_box),shm_radiobutton,TRUE,TRUE,0); */ /* gtk_widget_show(pipe_radiobutton); */ /* } */ /* fill close open frame */ #if CLOSE_FLAG { close_frame = gtk_frame_new("Channel Handling:"); gtk_container_set_border_width(GTK_CONTAINER(close_frame), 5); gtk_widget_show(close_frame); close_radiobutton = gtk_radio_button_new_with_label(NULL, "Open and close a channel for each song."); close_group = (GtkWidget*)gtk_radio_button_group(GTK_RADIO_BUTTON(close_radiobutton)); open_radiobutton = (GtkWidget*)gtk_radio_button_new_with_label((GSList *)close_group, "Use one channel for all songs."); if(dbmix_cfg.close_flag) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(close_radiobutton),TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(open_radiobutton),TRUE); } gtk_container_add(GTK_CONTAINER(close_frame),close_box); gtk_box_pack_start(GTK_BOX(close_box),close_radiobutton,TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(close_box),open_radiobutton,TRUE,TRUE,0); gtk_widget_show(close_radiobutton); gtk_widget_show(open_radiobutton); } #endif { buffer_frame = gtk_frame_new("Buffering:"); gtk_container_set_border_width(GTK_CONTAINER(buffer_frame), 5); buffer_vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(buffer_frame), buffer_vbox); /* check box to enable buffer */ enable_buffer_button = gtk_check_button_new_with_label("Enable Prebuffer (Prevents skips on slower systems)"); gtk_widget_show (enable_buffer_button); gtk_signal_connect(GTK_OBJECT(enable_buffer_button), "clicked", GTK_SIGNAL_FUNC(enable_buffer_clicked), NULL); gtk_box_pack_start(GTK_BOX(buffer_vbox),enable_buffer_button,FALSE,FALSE,0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enable_buffer_button), dbmix_cfg.buffer_enable); /* spin box fro buffer size */ buffer_table = gtk_table_new(2, 1, TRUE); gtk_container_set_border_width(GTK_CONTAINER(buffer_table), 5); gtk_box_pack_start(GTK_BOX(buffer_vbox), buffer_table, FALSE, FALSE, 0); buffer_size_box = gtk_hbox_new(FALSE, 5); gtk_table_attach_defaults(GTK_TABLE(buffer_table), buffer_size_box, 0, 1, 0, 1); buffer_size_label = gtk_label_new("Buffer size (ms):"); gtk_box_pack_start(GTK_BOX(buffer_size_box), buffer_size_label, FALSE, FALSE, 0); buffer_size_adj = gtk_adjustment_new(dbmix_cfg.buffer_size, 200, 10000, 100, 100, 100); buffer_size_spin = gtk_spin_button_new(GTK_ADJUSTMENT(buffer_size_adj), 8, 0); gtk_widget_set_usize(buffer_size_spin, 60, -1); gtk_box_pack_start(GTK_BOX(buffer_size_box), buffer_size_spin, FALSE, FALSE, 0); /* Grey out the button if needed */ gtk_widget_set_sensitive(GTK_WIDGET(buffer_size_spin),dbmix_cfg.buffer_enable); #if 0 buffer_pre_box = gtk_hbox_new(FALSE, 5); gtk_table_attach_defaults(GTK_TABLE(buffer_table), buffer_pre_box, 1, 2, 0, 1); buffer_pre_label = gtk_label_new("Pre-buffer (percent):"); gtk_box_pack_start(GTK_BOX(buffer_pre_box), buffer_pre_label, FALSE, FALSE, 0); buffer_pre_adj = gtk_adjustment_new(dbmix_cfg.prebuffer, 0, 90, 1, 1, 1); buffer_pre_spin = gtk_spin_button_new(GTK_ADJUSTMENT(buffer_pre_adj), 1, 0); gtk_widget_set_usize(buffer_pre_spin, 60, -1); gtk_box_pack_start(GTK_BOX(buffer_pre_box), buffer_pre_spin, FALSE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (buffer_pre_adj), "value_changed", GTK_SIGNAL_FUNC (get_value_prebuffer), GINT_TO_POINTER (2)); #endif gtk_signal_connect (GTK_OBJECT (buffer_size_adj), "value_changed", GTK_SIGNAL_FUNC (get_value_buffer), GINT_TO_POINTER (1)); gtk_widget_show(buffer_frame); } /* add ok cancel buttons */ { button_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), GTK_BUTTONBOX_END); gtk_button_box_set_spacing(GTK_BUTTON_BOX(button_box), 10); ok = gtk_button_new_with_label("Ok"); gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(ok_button), NULL); GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(button_box), ok, TRUE, TRUE, 0); cancel = gtk_button_new_with_label("Cancel"); gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(configure_win)); GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(button_box), cancel, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); gtk_widget_show(ok); gtk_widget_grab_default(ok); gtk_widget_show(cancel); gtk_widget_show(button_box); } /* add components to window*/ gtk_box_pack_start(GTK_BOX(main_box),name_box,TRUE,TRUE,10); gtk_box_pack_start(GTK_BOX(main_box),ipc_frame,TRUE,TRUE,10); #ifdef CLOSE_FLAG gtk_box_pack_start(GTK_BOX(main_box),close_frame,TRUE,TRUE,10); #endif gtk_box_pack_start(GTK_BOX(main_box),buffer_frame,TRUE,TRUE,10); gtk_box_pack_start(GTK_BOX(main_box),button_box,TRUE,TRUE,10); gtk_container_add(GTK_CONTAINER(configure_win),main_box); gtk_widget_show_all(configure_win); } else { gdk_window_raise(configure_win->window); } } DBMix-0.9.8/xmms_plugin/audio.c0000644000076400007640000004421307436267324012014 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ /* DESIGN NOTES This plugin is based off of the OSS output plugin. There are two modes of operation: 1) "Realtime" where data is written directly to dbmix as soon as the plugin recieves it 2) "Buffered" mode where data is copied into a prebuffer, and a separate thread reads the data from the buffer in order to output it to dbmix If your system skips or crackles when the pitch is scaled up to 115%, you should use Buffered mode (selectable from the configuration dialog). The skipping/crackling occurs because dbmix is starved for data. Buffered mode writes much larger data chunks to dbmix at a single time. Becuase it is a separate thread of execution, by the time dbmix consumes the larger data chuck, xmms has already written new data to the buffer. Use of the buffer is enabled in the configuration dialog, and its state is stored in the dbmix_cfg.buffer_enable variable. This variable is only used in the dbmix_open function to start the buffer thread. Once the thread is started, the dbmix_thread_started flag is set, and cleared only when the dbmix_close function is called. Thus, once a song is started in Buffered mode or Realtime mode, it will continue to use that mode for the duration of its playback. Otherwise, it would be possible to change playback modes during playback causing memory leaks, seg faults etc. */ #include #include #include #include #include #include #include #include "dbmixout.h" #include #if 0 #define PRINT_FUNCTION_NAMES #endif #define DBMIX_REALTIME #define MIN_WRITE_AMOUNT (PIPE_BUF * 2) static gpointer buffer; static gboolean going = FALSE, msg_going = TRUE, prebuffer, paused = FALSE, unpause = FALSE, do_pause = FALSE, remove_prebuffer = FALSE; static gint device_buffer_used, buffer_size, prebuffer_size, blk_size; static gint rd_index = 0, wr_index = 0; static gint output_time_offset = 0; static guint64 written = 0, output_bytes = 0; static gint bps, ebps; static gint flush; static gint fragsize, dbmix_format, format, channels, frequency, efrequency, device_buffer_size; static gint input_bps, input_format, input_frequency, input_channels; static gchar *device_name; static pthread_t buffer_thread; static gint dbmix_thread_started = 0; pthread_t msg_thread; static gboolean realtime = FALSE; gint xmms_session_id = 0; /* dbaudiolib variables */ extern int errno; int loop_flag; int debug_level; float dbprebuffer_percentage; int dbbuffer_size; #ifdef CLOSE_FLAG int close_flag = FALSE; #endif #ifdef DBMIX_DYNAMIC_LIBRARY extern DBAudioLibFunctions * dbaudiofxns; extern void* dbaudiolib_handle; #endif extern char * backup_name; void dbmix_set_audio_params(void); int dbmix_message_handler_callback(gpointer data) { /* Debug("called %d\n",msg_going); */ #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Handle_Message_Queue(); #else DBAudio_Handle_Message_Queue(); #endif return msg_going; } void dbmix_message_handler(dbfsd_msg msg) { gint value; #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_message_handler "); #endif Debug("session id is %d\n",xmms_session_id); switch (msg.msg_type) { case DBMSG_PAUSE: Debug("Got pause message"); xmms_remote_pause(xmms_session_id); break; case DBMSG_UNPAUSE: Debug("Got unpause message"); if (!xmms_remote_is_playing(xmms_session_id) || xmms_remote_is_paused(xmms_session_id)) { xmms_remote_play(xmms_session_id); } break; case DBMSG_PLAY: if (!xmms_remote_is_playing(xmms_session_id) || xmms_remote_is_paused(xmms_session_id)) { xmms_remote_play(xmms_session_id); } break; case DBMSG_MUTE: Debug("Setting MUTE."); DBAudio_Set_Mute(1); break; case DBMSG_UNMUTE: Debug("Clearing MUTE"); DBAudio_Set_Mute(0); break; case DBMSG_STOP: xmms_remote_stop(xmms_session_id); break; case DBMSG_EJECT: xmms_remote_eject(xmms_session_id); break; case DBMSG_REWIND: value = xmms_remote_get_output_time(xmms_session_id); value -= msg.data * 1000; if (value < 0) value = 0; xmms_remote_jump_to_time(xmms_session_id,value); break; case DBMSG_FFORWARD: value = xmms_remote_get_output_time(xmms_session_id); value += msg.data * 1000; if (value < 0) value = 0; xmms_remote_jump_to_time(xmms_session_id,value); break; case DBMSG_NEXT: xmms_remote_playlist_next(xmms_session_id); break; case DBMSG_PREV: xmms_remote_playlist_prev(xmms_session_id); break; default: Error("dbmix_message_handler: unknown message %d\n ",msg); } return; } static void dbmix_calc_device_buffer_used(void) { device_buffer_used = 0; /* the problem with setting buffer_used to 1 is that it's value is used to change rd_index */ /* if(paused) */ /* device_buffer_used = 0; */ /* else */ /* device_buffer_used = 1; */ } static void dbmix_setup_format(AFormat fmt,gint rate, gint nch) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_setup_format "); #endif format = fmt; frequency = rate; channels = nch; switch (fmt) { case FMT_U8: dbmix_format = AFMT_U8; break; case FMT_S8: dbmix_format = AFMT_S8; break; case FMT_U16_LE: dbmix_format = AFMT_U16_LE; break; case FMT_U16_BE: dbmix_format = AFMT_U16_BE; break; case FMT_U16_NE: #ifdef AFMT_U16_NE dbmix_format = AFMT_U16_NE; #else #ifdef WORDS_BIGENDIAN dbmix_format = AFMT_U16_BE; #else dbmix_format = AFMT_U16_LE; #endif #endif break; case FMT_S16_LE: dbmix_format = AFMT_S16_LE; break; case FMT_S16_BE: dbmix_format = AFMT_S16_BE; break; case FMT_S16_NE: #ifdef AFMT_S16_NE dbmix_format = AFMT_S16_NE; #else #ifdef WORDS_BIGENDIAN dbmix_format = AFMT_S16_BE; #else dbmix_format = AFMT_S16_LE; #endif #endif break; default: Debug("UNKNOWN AUDIO FORMAT"); break; } bps = rate * nch; if (dbmix_format == AFMT_U16_BE || dbmix_format == AFMT_U16_LE || dbmix_format == AFMT_S16_BE || dbmix_format == AFMT_S16_LE) bps *= 2; fragsize = 0; while ((1L << fragsize) < bps / 25) fragsize++; fragsize--; device_buffer_size = DB_BUFSIZE_CHAR; } gint dbmix_get_written_time(void) { gint writtentime; if (!going) { return 0; } writtentime = (gint) ((written * 1000) / input_bps); #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_get_written_time %d",writtentime); #endif return writtentime; } gint dbmix_get_output_time(void) { guint64 bytes; guint64 tempoutput; if (!going) { return 0; } /* bytes = output_bytes < device_buffer_used ? 0 : output_bytes - device_buffer_used; */ bytes = output_bytes; tempoutput = output_time_offset + (gint) ((bytes * 1000) / ebps); #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_get_output_time time: %d",tempoutput); #endif return tempoutput; } gint dbmix_used(void) { gint value; if (dbmix_thread_started) { if (wr_index >= rd_index) value = wr_index - rd_index; else value = buffer_size - (rd_index - wr_index); } else { value = 0; } #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_used used: %d",value); #endif return value; } gint dbmix_playing(void) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_playing "); #endif if(!going) { return 0; } if(!dbmix_used()) return FALSE; return TRUE; } gint dbmix_free(void) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_free "); #endif /* if we are using a local buffer, return amount of free space in that buffer */ if (dbmix_thread_started) { if (remove_prebuffer && prebuffer) { prebuffer = FALSE; remove_prebuffer = FALSE; } if (prebuffer) remove_prebuffer = TRUE; if (rd_index > wr_index) return (rd_index - wr_index) - device_buffer_size - 1; return (buffer_size - (wr_index - rd_index)) - device_buffer_size - 1; } /* not using a buffer, so return 0 on pause, and big number otherwise */ if (paused) { return 0; } return 1000000; } static int dbmix_write_audio(gpointer data,gint length) { AFormat new_format; gint new_frequency,new_channels; EffectPlugin *ep; gint count = 0; gint original_length; #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_write_audio "); #endif original_length = length; new_format = input_format; new_frequency = input_frequency; new_channels = input_channels; ep = get_current_effect_plugin(); if(effects_enabled() && ep && ep->query_format) { ep->query_format(&new_format,&new_frequency,&new_channels); if(new_format != format || new_frequency != frequency || new_channels != channels) { output_time_offset += (gint) ((output_bytes * 1000) / ebps); output_bytes = 0; dbmix_setup_format(new_format, new_frequency, new_channels); frequency = new_frequency; channels = new_channels; dbmix_set_audio_params(); } if(effects_enabled() && ep && ep->mod_samples) { length = ep->mod_samples(&data,length, input_format, input_frequency, input_channels); } } #ifdef DBMIX_DYNAMIC_LIBRARY if((count = dbaudiofxns->DBAudio_Write(data,length)) == FAILURE) #else if((count = DBAudio_Write(data,length)) == FAILURE) #endif { switch(errno) { case ERROR_TOO_MUCH_DATA: blk_size -= 1024; if(blk_size < PIPE_BUF) {blk_size = MIN_WRITE_AMOUNT;} break; case ERROR_TOO_LITTLE_DATA: if(length < blk_size) break; blk_size+= 1024; if(blk_size > MIN_WRITE_AMOUNT) {blk_size = MIN_WRITE_AMOUNT;} break; default: perror("DBMix output plugin, failure on write: "); break; } /* error, so no data was written */ count = 0; } else { output_bytes += count; } return count; } #if 0 static void swap_words(guint16 *buffer, gint length) { guint16 *ptr = buffer; gint i; for(i = 0; i < length; i++, ptr++) *ptr = ((*ptr & 0x00FF) << 8) | (*ptr >> 8); } #endif /* function called by xmms to output data */ void dbmix_write(gpointer ptr, gint length) { gint cnt, off = 0; sampler_state sampstate; #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_write length: %d",length); #endif /* if we are using a prebuffer, add the data to that buffer */ if (dbmix_thread_started) { remove_prebuffer = FALSE; written += length; while (length > 0) { /* only add data to the buffer if we are not playing a sample */ #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->sampstate = DBAudio_Sampler_Get_State(); #else sampstate = DBAudio_Sampler_Get_State(); #endif if ((sampstate != SAMPLER_PLAY_SINGLE) && (sampstate != SAMPLER_PLAY_LOOP)) { cnt = MIN(length, buffer_size - wr_index); memcpy(buffer + wr_index, ptr + off, cnt); wr_index = (wr_index + cnt) % buffer_size; length -= cnt; off += cnt; } } } else { /* paused - output no data, this function should never be called if xmms is paused */ if (paused) { return; } cnt = output_bytes; /* write data until it is actually written - i.e. dbmix may be paused internally, do not return until dbmix accepts the data */ while (cnt == output_bytes) { dbmix_write_audio(ptr,length); } written += length; } } void dbmix_close(void) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_close "); #endif if (!going) return; going = 0; if (dbmix_thread_started) { pthread_join(buffer_thread, NULL); dbmix_thread_started = 0; } /* enable timeout for message handler to handle dbmix messages during downtime */ msg_going = TRUE; gtk_timeout_add(500,dbmix_message_handler_callback,NULL); if(dbmix_cfg.close_flag) { #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Close(); #else DBAudio_Close(); #endif } g_free(device_name); wr_index = 0; rd_index = 0; } void dbmix_flush(gint time) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_flush time is %d",time); #endif /* this is the code that resets the buffer when you move the position bar in xmms */ /* if we are using a prebuffer, wait for the buffer to empty */ if (dbmix_thread_started) { flush = time; while (flush != -1) xmms_usleep(10000); } else { /* not using prebuffer, therefore all data is considered written, update timers */ output_time_offset = time; written = ((guint64) time * input_bps) / 1000; output_bytes = 0; } } void dbmix_pause(short p) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_pause "); #endif #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Pause(p); #else DBAudio_Pause(p); #endif paused = p; } /* dbmix_loop is the function executed by the buffer read thread to output data to dbmix. */ void *dbmix_loop(void *arg) { gint length, cnt; #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_loop "); #endif while (going) { #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Handle_Message_Queue(); #else DBAudio_Handle_Message_Queue(); #endif if (dbmix_used() > prebuffer_size) { prebuffer = FALSE; } if (dbmix_used() > 0 && !paused && !prebuffer) { length = MIN(blk_size, dbmix_used()); while (length > 0) { cnt = MIN(length,buffer_size-rd_index); /* write data and update rd_index by amount of data written */ cnt = dbmix_write_audio(buffer + rd_index, cnt); rd_index = (rd_index+cnt) % buffer_size; length -= cnt; } } else { xmms_usleep(10000); } dbmix_calc_device_buffer_used(); if (flush != -1) { dbmix_set_audio_params(); output_time_offset = flush; written = (guint64)(flush / 10) * (guint64)(input_bps / 100); rd_index = wr_index = output_bytes = 0; flush = -1; prebuffer = TRUE; } } #ifdef CLOSE_FLAG if(dbmix_cfg.close_flag) { #ifdef DBMIX_DYNAMIC_LIBRARY dbaudiofxns->DBAudio_Close(); #else DBAudio_Close(); #endif } #endif g_free(buffer); buffer = NULL; pthread_exit(NULL); } void dbmix_set_audio_params(void) { gint stereo; #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_set_audio_params "); #endif stereo = channels - 1; efrequency = frequency; blk_size = PIPE_BUF + 2048; #ifdef DBMIX_DYNAMIC_LIBRARY if(dbaudiofxns->DBAudio_Set_Format(dbmix_format) == FAILURE) { perror("dbmix_set_audio_params: "); } if(dbaudiofxns->DBAudio_Set_Channels(channels) == FAILURE) { perror("dbmix_set_audio_params: "); } if(dbaudiofxns->DBAudio_Set_Rate(efrequency) == FAILURE) { perror("dbmix_set_audio_params: "); } #else if(DBAudio_Set_Format(dbmix_format) == FAILURE) { perror("dbmix_set_audio_params: "); } if(DBAudio_Set_Channels(channels) == FAILURE) { perror("dbmix_set_audio_params: "); } if(DBAudio_Set_Rate(efrequency) == FAILURE) { perror("dbmix_set_audio_params: "); } #endif ebps = efrequency * channels; if (dbmix_format == AFMT_U16_BE || dbmix_format == AFMT_U16_LE || dbmix_format == AFMT_S16_BE || dbmix_format == AFMT_S16_LE) ebps *= 2; } gint dbmix_open(AFormat fmt, gint rate, gint nch) { #ifdef PRINT_FUNCTION_NAMES Debug("dbmix_open "); #endif #ifdef DBMIX_DEBUG debug_level = 1; #else debug_level = 0; #endif dbmix_setup_format(fmt,rate,nch); input_format = format; input_channels = channels; input_frequency = frequency; input_bps = bps; realtime = xmms_check_realtime_priority(); #if 0 buffer_size = (dbmix_cfg.buffer_size * input_bps) / 1000; if (buffer_size < 8192) buffer_size = 8192; prebuffer_size = (buffer_size * dbmix_cfg.prebuffer) / 100; if (buffer_size - prebuffer_size < 4096) prebuffer_size = buffer_size - 4096; buffer_size += device_buffer_size; #endif buffer = NULL; /* if we are using a buffer, determine the buffer size and allocate the buffer */ if (dbmix_cfg.buffer_enable) { int tempi; buffer_size = (dbmix_cfg.buffer_size * input_bps) / 1000; tempi = buffer_size % MIN_WRITE_AMOUNT; buffer_size -= tempi; if (buffer_size < MIN_WRITE_AMOUNT) { buffer_size = MIN_WRITE_AMOUNT * 20; } buffer = g_malloc0(buffer_size); } flush = -1; prebuffer = 1; wr_index = rd_index = output_time_offset = written = output_bytes = 0; paused = FALSE; do_pause = FALSE; unpause = FALSE; remove_prebuffer = FALSE; paused = 0; #ifdef DBMIX_DYNAMIC_LIBRARY if(dbaudiofxns->DBAudio_Ready() == FAILURE) { strcpy(dbmix_cfg.channel_name,"Xmms"); if(dbaudiofxns->DBAudio_Init(dbmix_cfg.channel_name, dbmix_format,frequency,nch, PIPE_CHANNEL,0) == FAILURE) { return 0; } dbaudiofxns->DBAudio_Set_Message_Handler(dbmix_message_handler,DBMIX_MESSAGES); } else { dbmix_set_audio_params(); } /* this function is called at the start of a song, so clear pause */ dbaudiofxns->DBAudio_Pause(0); #else if(DBAudio_Ready() == FAILURE) { strcpy(dbmix_cfg.channel_name,"Xmms"); if(DBAudio_Init(dbmix_cfg.channel_name, dbmix_format,frequency,nch, PIPE_CHANNEL,0) == FAILURE) { return 0; } DBAudio_Set_Message_Handler(dbmix_message_handler,DBMIX_MESSAGES); } else { dbmix_set_audio_params(); } /* this function is called at the start of a song, so clear pause */ DBAudio_Pause(0); #endif going = 1; msg_going = FALSE; if (dbmix_cfg.buffer_enable) { Debug("dbmix_open: buffer enabled, launching buffer thread."); pthread_create(&buffer_thread, NULL, dbmix_loop, NULL); dbmix_thread_started = 1; } else { Debug("dbmix_open: buffer not enabled."); dbmix_thread_started = 0; } return 1; } DBMix-0.9.8/xmms_plugin/init.c0000644000076400007640000001275507434027467011664 /* xmms - DBMix output plugin Description: ============ This program is an output plugin for xmms v0.9 or greater. The plugin allows a data stream to be generated using xmms, an to be sent to the DBMix sound daemon for Fourier/Additive Synthesis. This allows a user may output multiple audio streams concurrently to the same audio device. Original Output Plugin code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include "dbmixout.h" #include /* define cuserid function if it is not defined by stdio.h */ #ifndef __USE_XOPEN extern char * cuserid (char *__s) __THROW; #endif extern int debug_level; extern gint xmms_session_id; extern pthread_t msg_thread; #ifdef DBMIX_DYNAMIC_LIBRARY DBAudioLibFunctions * dbaudiofxns; void* dbaudiolib_handle; #endif DBMixConfig dbmix_cfg; void dbmix_init(void) { ConfigFile *cfgfile; #ifdef DBMIX_DYNAMIC_LIBRARY void *(*get_fxns)(); #endif #ifdef DBMIX_DEBUG debug_level = 1; #else debug_level = 0; #endif /* determine xmms session id */ { struct stat file_stat; struct dirent *entry; DIR * dir; time_t best_time = 0; char scanfstr[128]; char * username; username = cuserid(NULL); if (username == NULL) perror("getlogin failed"); sprintf(scanfstr,"xmms_%s.",username); strcat(scanfstr,"%d"); if((dir = opendir("/tmp")) == NULL) { perror("DBMIX OUTPUT PLUGIN ERROR: Could not open /tmp directory. \nTo use dbmix IPC messaging, you must manually configure the xmms session id in the dbmix output plugin configuration dialog."); } else { chdir("/tmp"); while((entry = readdir(dir)) != NULL) { if(strstr(entry->d_name,"xmms_")) { stat(entry->d_name,&file_stat); if (file_stat.st_ctime > best_time) { sscanf(entry->d_name,scanfstr,&xmms_session_id); best_time = file_stat.st_ctime; } } } Debug("init: xmms session id is %d\n",xmms_session_id); closedir(dir); } } /* read options from xmms config file */ { dbmix_cfg.prebuffer = 25; dbmix_cfg.buffer_size = PIPE_BUF; dbmix_cfg.close_flag = FALSE; strcpy(dbmix_cfg.channel_name,"Xmms"); if ((cfgfile = xmms_cfg_open_default_file())) { gchar* tempstr; if (!xmms_cfg_read_int(cfgfile, "DBMIX", "buffer_size", &dbmix_cfg.buffer_size)) { Debug("reset buffer size"); dbmix_cfg.buffer_size = 1500; } #if CLOSE_FLAG if (!xmms_cfg_read_int(cfgfile, "DBMIX", "close_flag", &dbmix_cfg.close_flag)) { Debug("reset close flag"); dbmix_cfg.close_flag = 0; } #endif if (xmms_cfg_read_string(cfgfile, "DBMIX", "channel_name", &tempstr)) { strcpy(dbmix_cfg.channel_name,tempstr); } else { Debug("reset channel name"); } if (!xmms_cfg_read_int(cfgfile, "DBMIX", "buffer_enable", &dbmix_cfg.buffer_enable)) { Debug("enable buffer flag"); dbmix_cfg.buffer_enable = 1; } xmms_cfg_free(cfgfile); } } /* there is a hanging problem with close_flag. Turn off option for now. */ dbmix_cfg.close_flag = FALSE; #ifdef DBMIX_DYNAMIC_LIBRARY Debug("\nUSING SHARED LIBRARY\n"); dbaudiofxns = NULL; if ((dbaudiolib_handle = dlopen("libdbaudiolib.so",RTLD_NOW)) == NULL) { printf("Failed to open DBAudioLib:: %s\n",dlerror()); return; } if ((get_fxns = dlsym(dbaudiolib_handle,"DBAudio_Get_Functions")) == NULL) { printf("Failed to retrieve pointer to DBAudio_Get_Functions: %s\n",dlerror()); dlclose(dbaudiolib_handle); return; } else { dbaudiofxns = (DBAudioLibFunctions*)get_fxns(); } if (dbaudiofxns->DBAudio_Ready() == FAILURE) { if (dbaudiofxns->DBAudio_Init(dbmix_cfg.channel_name,0,0,2,PIPE_CHANNEL,0) == FAILURE) { dbaudiofxns->DBAudio_perror("plugin init.c: failed to init dbaudiolib. \nNON FATAL to xmms, but dbmix plugin will not work... \nxmms continuing... is dbfsd running?\n"); /* exit(-1); */ } dbaudiofxns->DBAudio_Set_Message_Handler(dbmix_message_handler,DBMIX_MESSAGES); } #else if (DBAudio_Ready() == FAILURE) { if (DBAudio_Init(dbmix_cfg.channel_name,0,0,2,PIPE_CHANNEL,0) == FAILURE) { DBAudio_perror("plugin init.c: failed to init dbaudiolib. \nNON FATAL to xmms, but dbmix plugin will not work... \nxmms continuing... is dbfsd running?\n"); /* exit(-1); */ } DBAudio_Set_Message_Handler(dbmix_message_handler,DBMIX_MESSAGES); } #endif /* start message handler thread */ #if 0 pthread_create(&msg_thread, NULL, dbmix_message_handler_loop, NULL); #else gtk_timeout_add(50,dbmix_message_handler_callback,NULL); #endif } DBMix-0.9.8/xmms_plugin/debug.c0000644000076400007640000000322307346372416011774 /* implementation of debug.h AUthor: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include int debug_level; static char tempstr[1024]; /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ void Error(const char*fmt, ...) { va_list args; va_start(args, fmt); vsprintf(tempstr,fmt,args); perror(tempstr); va_end(args); } void Debug ( const char *fmt, ...) { if(debug_level) { va_list args; va_start(args, fmt); fflush(stdout); /* fprintf(stdout,"dbfsd.c: "); */ vfprintf(stdout, fmt, args); fprintf(stdout,"\n"); fflush(stdout); va_end(args); } } int Check_Debug() { return debug_level; } #ifdef __cplusplus } #endif DBMix-0.9.8/dbmixer/0000777000076400007640000000000007436306703007712 5DBMix-0.9.8/dbmixer/Makefile.in0000664000076400007640000002745507436306703011712 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. #lib_LTLIBRARIES = libdbmixer.la #libdir = $(plugindir)/$(GENERAL_PLUGIN_DIR) #libdbmixer_la_LDFLAGS = -module -avoid-version SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ LIBS = @GTK_LIBS@ #@PTHREAD_LIBS@ @OPENGL_LIBS@ INCLUDES = -I../include COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -D_REENTRANT @GTK_CFLAGS@ @DBMIX_DEBUG@ @EXMIXER_FLAGS@ -DSTAND_ALONE COMMON_SRC = soundcard_control.c channel.c crossfader.c dbmixer.c about.c debug.c dbmixer.h preferences.c light.c exmixer.c save_prefs.c exmixer_prefs.c sample_editor.c save_prefs.h exmixer.h exmixer_prefs.h debug.h CFLAGS = $(COMMON_CFLAGS) $(EXTRA_CFLAGS) #libdbmixer_la_SOURCES = dbmixer_plugin.c $(COMMON_SRC) bin_PROGRAMS = dbmixer dbmsg_test dbmixer_SOURCES = dbmixer_standalone.c $(COMMON_SRC) dbmixer_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ -DSTAND_ALONE dbmsg_test_SOURCES = dbmsg_test.c $(COMMON_SRC) dbmsg_test_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ dbmixer_OBJECTS = dbmixer_standalone.o soundcard_control.o channel.o \ crossfader.o dbmixer.o about.o debug.o preferences.o light.o exmixer.o \ save_prefs.o exmixer_prefs.o sample_editor.o dbmixer_LDADD = $(LDADD) dbmixer_DEPENDENCIES = dbmsg_test_OBJECTS = dbmsg_test.o soundcard_control.o channel.o \ crossfader.o dbmixer.o about.o debug.o preferences.o light.o exmixer.o \ save_prefs.o exmixer_prefs.o sample_editor.o dbmsg_test_LDADD = $(LDADD) dbmsg_test_DEPENDENCIES = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(dbmixer_SOURCES) $(dbmsg_test_SOURCES) OBJECTS = $(dbmixer_OBJECTS) $(dbmsg_test_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps dbmixer/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: dbmixer: $(dbmixer_OBJECTS) $(dbmixer_DEPENDENCIES) @rm -f dbmixer $(LINK) $(dbmixer_LDFLAGS) $(dbmixer_OBJECTS) $(dbmixer_LDADD) $(LIBS) dbmsg_test: $(dbmsg_test_OBJECTS) $(dbmsg_test_DEPENDENCIES) @rm -f dbmsg_test $(LINK) $(dbmsg_test_LDFLAGS) $(dbmsg_test_OBJECTS) $(dbmsg_test_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = dbmixer distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done about.o: about.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h channel.o: channel.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h ../include/dbdebug.h dbmixer.h crossfader.o: crossfader.c ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbmixer.h dbmixer.o: dbmixer.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h ../include/dbdebug.h dbmixer.h \ exmixer.h save_prefs.h dbmixer_standalone.o: dbmixer_standalone.c dbmixer.h \ ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h ../include/dbdebug.h dbmsg_test.o: dbmsg_test.c dbmixer.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h debug.o: debug.c ../include/dbdebug.h exmixer.o: exmixer.c dbmixer.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h exmixer.h \ save_prefs.h exmixer_prefs.h ../include/dbdebug.h exmixer_prefs.o: exmixer_prefs.c ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h save_prefs.h \ exmixer.h exmixer_prefs.h ../include/dbdebug.h light.o: light.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h ../include/dbdebug.h dbmixer.h preferences.o: preferences.c ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbmixer.h save_prefs.h exmixer.h \ exmixer_prefs.h sample_editor.o: sample_editor.c ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbmixer.h save_prefs.o: save_prefs.c ../include/dbdebug.h dbmixer.h \ ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h exmixer.h save_prefs.h soundcard_control.o: soundcard_control.c ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h \ ../include/dbdebug.h dbmixer.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/dbmixer/Makefile.am0000644000076400007640000000164107361471434011665 #lib_LTLIBRARIES = libdbmixer.la #libdir = $(plugindir)/$(GENERAL_PLUGIN_DIR) #libdbmixer_la_LDFLAGS = -module -avoid-version LIBS = @GTK_LIBS@ #@PTHREAD_LIBS@ @OPENGL_LIBS@ INCLUDES = -I../include COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -D_REENTRANT @GTK_CFLAGS@ @DBMIX_DEBUG@ @EXMIXER_FLAGS@ -DSTAND_ALONE COMMON_SRC = soundcard_control.c \ channel.c \ crossfader.c \ dbmixer.c \ about.c \ debug.c \ dbmixer.h \ preferences.c \ light.c \ exmixer.c \ save_prefs.c \ exmixer_prefs.c \ sample_editor.c \ save_prefs.h \ exmixer.h \ exmixer_prefs.h \ debug.h CFLAGS = $(COMMON_CFLAGS) $(EXTRA_CFLAGS) #libdbmixer_la_SOURCES = dbmixer_plugin.c $(COMMON_SRC) bin_PROGRAMS = dbmixer dbmsg_test dbmixer_SOURCES = dbmixer_standalone.c $(COMMON_SRC) dbmixer_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ -DSTAND_ALONE dbmsg_test_SOURCES = dbmsg_test.c $(COMMON_SRC) dbmsg_test_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ DBMix-0.9.8/dbmixer/dbmixer_standalone.c0000644000076400007640000000334107346372415013640 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" #include extern int standalone_flag; extern int debug_level; extern GtkWidget* window; static gint standalone_cleanup(GtkWidget* window, GdkEventAny* e, gpointer data) { Debug("Got delete_event... calling cleanup()..."); cleanup(); return TRUE; } int main( int argc, char *argv[] ) { debug_level = 0; #ifdef DBMIX_DEBUG debug_level = 1; printf("Debugging is on.\n"); #else debug_level = 0; #endif gtk_init(&argc, &argv); init(); gtk_signal_connect(GTK_OBJECT(window),"delete_event", GTK_SIGNAL_FUNC(standalone_cleanup),NULL); standalone_flag = 1; gtk_main(); return(0); } DBMix-0.9.8/dbmixer/soundcard_control.c0000644000076400007640000002542407414201617013515 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" extern int debug_level; extern local_channel *local_channels; extern dbfsd_data * sysdata; GtkAdjustment * main_volume_adj, * cue_volume_adj, * balance_adj; int master_mixer_flag, cue_mixer_flag; int master_mixer_cmd, cue_mixer_cmd; int master_volume; int cue_volume; int Soundcard_Mixer_Init() { int fd1; int devs; master_mixer_flag = cue_mixer_flag = FALSE; master_mixer_cmd = cue_mixer_cmd = 0; /* verify the existence of primary mixer device */ fd1 = open(MASTER_MIXER,O_RDONLY); if(fd1 != -1) { if(ioctl(fd1,SOUND_MIXER_READ_DEVMASK, &devs) != SUCCESS) { Error("failed to open primary mixer. %s\n"); return FAILURE; } Debug("Master mixer is %s",MASTER_MIXER); if(devs & SOUND_MASK_PCM) { master_mixer_flag = TRUE; master_mixer_cmd = SOUND_MIXER_WRITE_VOLUME; } else { if (devs & SOUND_MASK_VOLUME) { master_mixer_flag = TRUE; master_mixer_cmd = SOUND_MIXER_WRITE_VOLUME; } else { master_mixer_flag = FALSE; } } } close(fd1); /* verify existence of secondary mixer */ /* if single output mode, don't need secondary mixer */ if (!sysdata->single_output && sysdata->cue_enabled) { fd1 = open(CUE_MIXER,O_RDONLY); if(fd1 != -1) { if(ioctl(fd1,SOUND_MIXER_READ_DEVMASK, &devs) != SUCCESS) { perror("failed to open cue mixer.\n"); } if(devs & SOUND_MASK_PCM) { cue_mixer_flag = TRUE; cue_mixer_cmd = SOUND_MIXER_WRITE_VOLUME; } else { if (devs & SOUND_MASK_VOLUME) { cue_mixer_flag = TRUE; cue_mixer_cmd = SOUND_MIXER_WRITE_VOLUME; } else { cue_mixer_flag = FALSE; } } } } close(fd1); return SUCCESS; } int update_soundcards(gpointer data) { int fd, v, i; if(master_mixer_flag == FALSE) {return FAILURE;} fd = open(MASTER_MIXER,O_RDONLY); if (fd != -1) { if(ioctl(fd, SOUND_MIXER_READ_VOLUME, &v) != 0) { Error("Could not set master volume."); } close(fd); i = 100 - (v & 0x000000ff); /* i = (v & 0x000000ff); */ Debug("setting main volume to be %d",i); gtk_adjustment_set_value(main_volume_adj,i); } if(Cue_Enabled((&local_channels[0])) && !sysdata->single_output) { fd = open(CUE_MIXER,O_RDONLY); if (fd != -1) { if(ioctl(fd, SOUND_MIXER_READ_VOLUME, &v) != 0) { Error("Could not set cue volume."); } close(fd); i = 100 - (v & 0x000000ff); Debug("setting cue volume to be %d",i); gtk_adjustment_set_value(cue_volume_adj,i); } } return SUCCESS; } int update_balance(gpointer data) { int value; if (sysdata->left_balance < 100) { value = 200 - sysdata->left_balance; } else { if (sysdata->right_balance < 100) { value = sysdata->right_balance; } else { value = 100; } } gtk_adjustment_set_value(balance_adj, value); Debug("balance set to be %d\n",value); return SUCCESS; } /***********************************************************************/ /* callback functions for soundcard widgets */ /***********************************************************************/ void main_level_scale_changed(GtkAdjustment * adj) { int fd, v, i; if(master_mixer_flag == FALSE) {return;} fd = open(MASTER_MIXER,O_WRONLY); if (fd != -1) { i = 100 - (gint) adj->value; master_volume = i; v = (i << 8) | i; if(ioctl(fd, master_mixer_cmd, &v) != 0) {Error("Could not set master volume.");} else {Debug("Set master volume to be %d",i);} close(fd); } } void cue_level_scale_changed(GtkAdjustment * adj) { int fd, v, i; if (sysdata->single_output) { cue_volume = 100 - (gint) adj->value; } if(cue_mixer_flag == FALSE) {return;} fd = open(CUE_MIXER,O_RDONLY); if (fd != -1) { i = 100 - (gint) adj->value; v = (i << 8) | i; cue_volume = i; if(ioctl(fd, cue_mixer_cmd, &v) != 0) {Error("Could not set cue volume.");} else {Debug("Set cue volume to be %d",i);} close(fd); } } void balance_scale_changed(GtkAdjustment * adj) { if (adj->value < 100) { sysdata->right_balance = adj->value; sysdata->left_balance = 100; return; } if (adj->value > 100) { sysdata->left_balance = 200 - adj->value; sysdata->right_balance = 100; return; } if (adj->value == 100) { sysdata->right_balance = 100; sysdata->left_balance = 100; return; } } void talkover_button_clicked(GtkWidget *w, gchar* data) { if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { sysdata->talkover_enabled = 1; } else { sysdata->talkover_enabled = 0; } } void cue_split_button_clicked(GtkWidget *w, gchar* data) { /* single output mode is on, cannot turn off cue split */ if (sysdata->single_output) return; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { sysdata->cue_split = 1; } else { sysdata->cue_split = 0; } } /***********************************************************************/ /* widget creation functions for soundcards */ /***********************************************************************/ GtkWidget* Create_Soundcard_Controls() { GtkWidget * soundcard_box; GtkWidget * label; GtkWidget * level_scale; GtkWidget * master_box; GtkWidget * cue_box; GtkWidget * balance_scale; GtkWidget * volume_box; GtkWidget * balance_box; GtkWidget * cue_split_button; GtkWidget * talkover_button; /* create master and cue main volume controls */ soundcard_box = gtk_vbox_new(FALSE,0); volume_box = gtk_hbox_new(FALSE,5); master_box = gtk_vbox_new(FALSE,5); cue_box = gtk_vbox_new(FALSE,5); gtk_container_set_border_width(GTK_CONTAINER(soundcard_box),0); /* add talkover button */ { talkover_button = (GtkWidget *)gtk_toggle_button_new(); label = gtk_label_new(TALKOVER_STR); gtk_container_add(GTK_CONTAINER(talkover_button),label); gtk_box_pack_start(GTK_BOX(soundcard_box),GTK_WIDGET(talkover_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(talkover_button), "clicked", GTK_SIGNAL_FUNC(talkover_button_clicked),0); gtk_widget_show(label); gtk_widget_show(talkover_button); if(!sysdata->cue_enabled) { gtk_widget_set_sensitive(GTK_WIDGET(talkover_button), FALSE); } gtk_toggle_button_set_active((GtkToggleButton*)talkover_button,sysdata->talkover_enabled); } /* add cue split button */ { cue_split_button = (GtkWidget *)gtk_toggle_button_new(); label = gtk_label_new(CUE_SPLIT_STR); gtk_container_add(GTK_CONTAINER(cue_split_button),label); gtk_box_pack_start(GTK_BOX(soundcard_box),GTK_WIDGET(cue_split_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(cue_split_button), "clicked", GTK_SIGNAL_FUNC(cue_split_button_clicked),0); gtk_widget_show(label); gtk_widget_show(cue_split_button); if(!sysdata->cue_enabled || sysdata->single_output) { gtk_widget_set_sensitive(GTK_WIDGET(cue_split_button), FALSE); } gtk_toggle_button_set_active((GtkToggleButton*)cue_split_button,sysdata->cue_split); } /* create master volume level */ { label = gtk_label_new(MASTER_LEVEL_STR); gtk_box_pack_start(GTK_BOX(master_box),label,FALSE,FALSE,0); gtk_widget_show(label); main_volume_adj = (GtkAdjustment*) gtk_adjustment_new(0.0,0.0,100.0,1.0,10.0,0.0); gtk_signal_connect (GTK_OBJECT(main_volume_adj), "value_changed", GTK_SIGNAL_FUNC(main_level_scale_changed),NULL); level_scale = gtk_vscale_new(GTK_ADJUSTMENT(main_volume_adj)); gtk_scale_set_digits((GtkScale*)level_scale,0); gtk_scale_set_value_pos((GtkScale*)level_scale,GTK_POS_TOP); gtk_box_pack_start(GTK_BOX(master_box),(GtkWidget*)level_scale,FALSE,FALSE,0); gtk_widget_set_usize(level_scale,10,100); gtk_widget_show((GtkWidget*)level_scale); } /* create cue volume level */ { label = gtk_label_new(CUE_LEVEL_STR); gtk_box_pack_start(GTK_BOX(cue_box),label,FALSE,FALSE,0); gtk_widget_show(label); cue_volume_adj = (GtkAdjustment*) gtk_adjustment_new(0.0,0.0,100.0,1.0,10.0,0.0); gtk_signal_connect (GTK_OBJECT(cue_volume_adj), "value_changed", GTK_SIGNAL_FUNC(cue_level_scale_changed),NULL); level_scale = gtk_vscale_new(GTK_ADJUSTMENT(cue_volume_adj)); gtk_scale_set_digits((GtkScale*)level_scale,0); gtk_scale_set_value_pos((GtkScale*)level_scale,GTK_POS_TOP); gtk_box_pack_start(GTK_BOX(cue_box),(GtkWidget*)level_scale,FALSE,FALSE,0); if(!sysdata->cue_enabled) { gtk_widget_set_sensitive(GTK_WIDGET(level_scale),FALSE); } gtk_widget_set_usize(level_scale,10,100); gtk_widget_show((GtkWidget*)level_scale); } update_soundcards(NULL); /* create balance scale */ { balance_box = gtk_vbox_new(FALSE,0); label = (GtkWidget *) gtk_label_new(BALANCE_STR); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(soundcard_box),label,FALSE,FALSE,0); balance_adj = (GtkAdjustment *) gtk_adjustment_new(100.0,0,200,1.0,10.0,0.0); balance_scale = (GtkWidget *) gtk_hscale_new(GTK_ADJUSTMENT(balance_adj)); gtk_scale_set_digits((GtkScale*)balance_scale,1); gtk_signal_connect (GTK_OBJECT(balance_adj), "value_changed", GTK_SIGNAL_FUNC(balance_scale_changed),NULL); update_balance(NULL); gtk_box_pack_start(GTK_BOX(balance_box),balance_scale,FALSE,FALSE,0); gtk_widget_show(balance_scale); gtk_widget_show(balance_box); } gtk_widget_show(master_box); gtk_widget_show(cue_box); gtk_widget_show(volume_box); gtk_box_pack_start(GTK_BOX(volume_box),master_box,FALSE,FALSE,5); gtk_box_pack_start(GTK_BOX(volume_box),cue_box,FALSE,FALSE,5); gtk_box_pack_start(GTK_BOX(soundcard_box),balance_box,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(soundcard_box),volume_box,FALSE,FALSE,0); return soundcard_box; } DBMix-0.9.8/dbmixer/channel.c0000644000076400007640000007035007436274612011412 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" extern int * channel_indexes; extern local_channel * local_channels; extern dbfsd_data * sysdata; extern channel_widgets * widgets; extern GtkAdjustment * fader_adj; void channel_menu_select(GtkWidget *w, gpointer * data); /* the following flag is used within the gui callback functions to prevent actions from being taken if we are processing a channel update request. For example, pausing a client would call a pause message to be sent during an update. */ int updating_channels_flag = 0; int update_counter = 0; float initial_pitch = 0; int initial_pause = FALSE; GtkWidget* make_channel_menu(int ch_id) { GtkWidget * menu; GtkWidget * item; gint i; channel_select_data * channeldata; menu = gtk_menu_new(); /* add options to channel selector */ for (i = 0; i < sysdata->num_channels;i++) { channeldata = (channel_select_data *) malloc(sizeof(channel_select_data)); /* remember pointers to channeldata for later deletion */ widgets[ch_id].datalist = g_slist_prepend(widgets[ch_id].datalist,channeldata); channeldata->channel = ch_id; channeldata->index = i; item = make_menu_item (local_channels[i].channel_name, GTK_SIGNAL_FUNC(channel_menu_select), channeldata); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu),(guint)ch_id); channel_indexes[ch_id] = ch_id; return menu; } /* update_channels - updates the gui to reflect the state of the channel structures in case another application changed the channel state. */ int update_channels(gpointer data) { gint i,a; GtkWidget* tempwidget; gint doall_flag = 0; GSList *templist; updating_channels_flag = 1; update_counter++; if (update_counter == 3) { update_counter = 0; doall_flag = 1; } for (i = 0; i < sysdata->num_channels; i++) { /* set state of cue and mute buttons */ gtk_toggle_button_set_active(widgets[i].mute_button,local_channels[i].mute); gtk_toggle_button_set_active(widgets[i].cue_button,local_channels[i].cue); gtk_toggle_button_set_active(widgets[i].pause_button,local_channels[i].pause); switch (local_channels[i].sampler_state) { case SAMPLER_OFF: /* disable playback buttons */ gtk_widget_set_sensitive(GTK_WIDGET(widgets[i].playloop_button), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(widgets[i].playsingle_button), FALSE); break; case SAMPLER_READY: /* enable plaback buttons */ gtk_widget_set_sensitive(GTK_WIDGET(widgets[i].playloop_button),TRUE); gtk_widget_set_sensitive(GTK_WIDGET(widgets[i].playsingle_button),TRUE); gtk_toggle_button_set_active(widgets[i].playloop_button,0); /* the single shot button is a pushbutton, and cannot be set active */ /* gtk_toggle_button_set_active(widgets[i].playsingle_button,0); */ break; case SAMPLER_PLAY_LOOP: case SAMPLER_PLAY_SINGLE: break; default: break; } if (doall_flag) { /* only update menu if it is not visible/ being used right now */ if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(gtk_option_menu_get_menu(GTK_OPTION_MENU(widgets[i].opt))))) { /* delete channel data */ templist = widgets[i].datalist; while (templist != NULL) { free(templist->data); templist = g_slist_next(templist); } g_slist_free(widgets[i].datalist); widgets[i].datalist = NULL; /* recreate menu in case channel names have changed */ a = channel_indexes[i]; tempwidget = gtk_option_menu_get_menu(GTK_OPTION_MENU(widgets[i].opt)); gtk_option_menu_remove_menu(GTK_OPTION_MENU(widgets[i].opt)); /* gtk_widget_destroy(tempwidget); */ tempwidget = make_channel_menu(i); channel_indexes[i] = a; gtk_menu_set_active(GTK_MENU(tempwidget),(guint)channel_indexes[i]); gtk_option_menu_set_menu(GTK_OPTION_MENU(widgets[i].opt),tempwidget); } /* Debug("Setting pitch."); */ gtk_adjustment_set_value(widgets[i].pitch_adj, local_channels[channel_indexes[i]].user_pitch); } } updating_channels_flag = 0; return TRUE; } /***********************************************************************/ /* callback functions for dbmix channel widgets */ /***********************************************************************/ void channel_menu_select(GtkWidget *w, gpointer * data) { channel_select_data * chdata; local_channel * ch; /* set channel index for this input selector */ chdata = (channel_select_data *)data; channel_indexes[chdata->channel] = chdata->index; ch = &(local_channels[channel_indexes[chdata->index]]); /* set the gain level for this mixer channel to be that of the dbfsd channel it refers to */ gtk_adjustment_set_value(widgets[chdata->channel].adj, normalize_scale(100 - ch->left_gain)); } void mute_button_clicked(GtkWidget *w, gint * data) { local_channel * ch; gint index = (gint)*data; #if 0 dbfsd_msg msg; #endif ch = &(local_channels[channel_indexes[index]]); /* Note on removal of use of MUTE messages: There is a conflict with using the update_channels function and the IPC messages in that the update can occur while the message is in transit. The side effect of this is once the channel is muted, it cannot be reliablly unmuted. */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { #if 0 Debug("dbmixer: sending MUTE message"); msg.msg_type = DBMSG_MUTE; #endif ch->mute = 1; } else { #if 0 Debug("dbmixer: sending UNMUTE message."); msg.msg_type = DBMSG_UNMUTE; #endif ch->mute = 0; } #if 0 if (msgsnd(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmixer: Message sent."); } else { Error("dbmixer: Message failure."); } #endif } void cue_button_clicked(GtkWidget *w, gchar * data) { local_channel * ch; gint index = (gint)*data; ch = &(local_channels[channel_indexes[index]]); ch->cue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); } void playsingle_button_clicked(GtkWidget *w, gint * data) { local_channel * ch; gint index = (gint)*data; volatile char write_flag; ch = &(local_channels[channel_indexes[index]]); /* if recording, stop and begin playback */ if (ch->sampler_state == SAMPLER_RECORD) { ch->sampler_state = SAMPLER_READY; /* spin on writing flag before changing state */ /* it is possible for DBAudio_Write to exit, and reenter without us catching the state change of the writing flag. So temporarially pause channel to prevent this. */ ch->pause = 1; write_flag = ch->writing; while (write_flag) { write_flag = ch->writing; } ch->pause = 0; } /* if currently playing, this will force the playback to stop at end of next loop iteration */ /* reset readoffset */ ch->sampler_readoffset = ch->sampler_startoffset; ch->sampler_state = SAMPLER_PLAY_SINGLE; Debug("dbmixer: single clicked"); } void playloop_button_clicked(GtkWidget *w, gint * data) { local_channel * ch; gint index = (gint)*data; volatile char write_flag; ch = &(local_channels[channel_indexes[index]]); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { /* if recording, stop and begin playback */ if (ch->sampler_state == SAMPLER_RECORD) { ch->sampler_state = SAMPLER_READY; /* spin on writing flag before changing state */ /* it is possible for DBAudio_Write to exit, and reenter without us catching the state change of the writing flag. So temporarially pause channel to prevent this. */ ch->pause = 1; write_flag = ch->writing; while (write_flag) { write_flag = ch->writing; } ch->pause = 0; } /* if we are not playing, reset to start of sample */ if (ch->sampler_state != SAMPLER_PLAY_SINGLE) { ch->sampler_readoffset = ch->sampler_startoffset; } ch->sampler_state = SAMPLER_PLAY_LOOP; } else { ch->sampler_state = SAMPLER_READY; } } void reset_pitch_button_clicked(GtkWidget *w, gchar * data) { local_channel * ch; gint index = (gint)*data; ch = &(local_channels[channel_indexes[index]]); ch->user_pitch = 100; gtk_adjustment_set_value(widgets[index].pitch_adj,100); } void pause_button_clicked(GtkWidget *w, gchar* data) { local_channel * ch; dbfsd_msg msg; gint index = (gint)*data; if (updating_channels_flag) return; ch = &(local_channels[channel_indexes[index]]); if (ch->msg_q_id == -1) return; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { Debug("dbmixer: sending PAUSE message"); msg.msg_type = DBMSG_PAUSE; /* ch->pause = TRUE; */ } else { Debug("dbmixer: sending UNPAUSE message."); msg.msg_type = DBMSG_UNPAUSE; /* ch->pause = FALSE; */ } if (msgsnd(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmixer: Message sent."); } else { Error("dbmixer: Message failure."); } } /* static void punch_button_pressed(GtkWidget *w, gchar* data) */ /* { */ /* local_channel * ch; */ /* dbfsd_msg msg; */ /* gint index = (gint)*data; */ /* ch = &(local_channels[channel_indexes[index]]); */ /* widgets[index].tempvol = ch->left_gain; */ /* ch->left_gain = ch->right_gain = */ /* normalize_scale(100 - widgets[index].adj->value); */ /* } */ /* static void punch_button_released(GtkWidget *w, gchar* data) */ /* { */ /* local_channel * ch; */ /* dbfsd_msg msg; */ /* gint index = (gint)*data; */ /* ch = &(local_channels[channel_indexes[index]]); */ /* ch->left_gain = ch->right_gain = widgets[index].tempvol; */ /* } */ void level_scale_changed(GtkAdjustment * adj) { int i; local_channel * ch; int value; for (i=0; i< sysdata->num_channels; i++) { if (widgets[i].adj == adj) { ch = &(local_channels[channel_indexes[i]]); value = normalize_scale(100 - adj->value); value = (value * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; ch->left_gain = ch->right_gain = value; ch->cue_left_gain = ch->cue_right_gain = value; } } if (fader_adj != NULL) { crossfader_scale_changed(fader_adj); } } void pitch_scale_changed(GtkAdjustment * adj) { int i; local_channel * ch; for (i=0; i< sysdata->num_channels; i++) { if (widgets[i].pitch_adj == adj) { ch = &(local_channels[channel_indexes[i]]); ch->user_pitch = adj->value; } } } void pitch_plus5_button_clicked(GtkWidget *w, gchar* data) { gint index = (gint)*data; float value; value = widgets[index].pitch_adj->value + 5.0; if (value > PITCH_HIGH_BOUND) value = PITCH_HIGH_BOUND; local_channels[channel_indexes[index]].user_pitch = value; gtk_adjustment_set_value(widgets[index].pitch_adj, local_channels[channel_indexes[index]].user_pitch); } void pitch_minus5_button_clicked(GtkWidget *w, gchar* data) { gint index = (gint)*data; float value; value = widgets[index].pitch_adj->value - 5.0; if (value < PITCH_LOW_BOUND) value = PITCH_LOW_BOUND; local_channels[channel_indexes[index]].user_pitch = value; gtk_adjustment_set_value(widgets[index].pitch_adj, local_channels[channel_indexes[index]].user_pitch); } void pitch_sync_minus_button_pressed(GtkWidget *w, gchar* data) { local_channel * ch; gint index = (gint)*data; Debug("pause pressed"); ch = &(local_channels[channel_indexes[index]]); initial_pitch = ch->user_pitch; ch->user_pitch -= PITCH_SYNC_VALUE; } void pitch_sync_minus_button_released(GtkWidget *w, gchar* data) { local_channel * ch; gint index = (gint)*data; ch = &(local_channels[channel_indexes[index]]); Debug("pause released"); ch->user_pitch = initial_pitch; } void pitch_sync_pause_button_pressed(GtkWidget *w, gchar* data) { local_channel * ch; dbfsd_msg msg; gint index = (gint)*data; if (updating_channels_flag) return; ch = &(local_channels[channel_indexes[index]]); if (ch->msg_q_id == -1) return; msg.msg_type = DBMSG_PAUSE; if (msgsnd(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmixer: Message sent."); } else { Error("dbmixer: Message failure."); } /* local_channel * ch; */ /* gint index = (gint)*data; */ /* ch = &(local_channels[channel_indexes[index]]); */ /* initial_pause = ch->pause; */ /* ch->pause = TRUE; */ } void pitch_sync_pause_button_released(GtkWidget *w, gchar* data) { local_channel * ch; dbfsd_msg msg; gint index = (gint)*data; if (updating_channels_flag) return; ch = &(local_channels[channel_indexes[index]]); if (ch->msg_q_id == -1) return; msg.msg_type = DBMSG_UNPAUSE; if (msgsnd(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmixer: Message sent."); } else { Error("dbmixer: Message failure."); } /* local_channel * ch; */ /* gint index = (gint)*data; */ /* ch = &(local_channels[channel_indexes[index]]); */ /* ch->pause = initial_pause; */ } void pitch_sync_plus_button_pressed(GtkWidget *w, gchar* data) { local_channel * ch; gint index = (gint)*data; ch = &(local_channels[channel_indexes[index]]); initial_pitch = ch->user_pitch; ch->user_pitch += PITCH_SYNC_VALUE; } void pitch_sync_plus_button_released(GtkWidget *w, gchar* data) { local_channel * ch; gint index = (gint)*data; ch = &(local_channels[channel_indexes[index]]); ch->user_pitch = initial_pitch; } /***********************************************************************/ /* widget creation functions for dbmix channels */ /***********************************************************************/ GtkWidget * create_channel_controls(int ch_id) { /* GtkWidget * window; */ GtkWidget * main_box; /* main box for the window */ GtkWidget * other_main_box; GtkWidget * channel_box; /* hbox to hold channel selector */ GtkWidget * top_button_box; /* hbox to hold mute pause cue buttons */ GtkWidget * sampler_box; /* hbox to hold sampler buttons */ GtkWidget * scale_box; /* vbox to hold gain scale and pitch scale box */ GtkWidget * pitch_box; /* hbox to hold pitch scale and reset */ GtkWidget * pitch_buttons_box; /* hbox to hold pitch buttons */ GtkWidget * pitch_sync_box; /* hbox to hold pitch sync buttons */ GtkWidget * menu; /* pointer to fill in channel selector*/ GtkWidget * label, * separator; Debug("create_channel_controls start. channel id: %d",ch_id); /* create main box for the window */ main_box = (GtkWidget*)gtk_vbox_new(FALSE,0); gtk_widget_show(main_box); other_main_box = (GtkWidget*)gtk_hbox_new(FALSE,0); gtk_widget_show(main_box); widgets[ch_id].ch_id = ch_id; widgets[ch_id].datalist = NULL; /* create channel selector */ { channel_box = gtk_hbox_new(TRUE,0); gtk_container_set_border_width(GTK_CONTAINER(channel_box),0); widgets[ch_id].opt = gtk_option_menu_new(); menu = make_channel_menu(ch_id); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (widgets[ch_id].opt), menu); gtk_box_pack_start (GTK_BOX (channel_box), widgets[ch_id].opt, FALSE, FALSE, 0); gtk_widget_show (widgets[ch_id].opt); } /* add channel selector to main box*/ gtk_box_pack_start (GTK_BOX (main_box), channel_box, FALSE, FALSE, 0); gtk_widget_show (channel_box); separator = gtk_hseparator_new(); gtk_box_pack_start (GTK_BOX (main_box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* create channel control buttons */ { top_button_box = gtk_hbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(top_button_box),0); /* create mute button */ widgets[ch_id].mute_button = (GtkToggleButton *)gtk_toggle_button_new(); label = gtk_label_new(MUTE_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].mute_button),label); gtk_box_pack_start(GTK_BOX(top_button_box),GTK_WIDGET(widgets[ch_id].mute_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].mute_button), "clicked", GTK_SIGNAL_FUNC(mute_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].mute_button)); gtk_toggle_button_set_active(widgets[ch_id].mute_button,local_channels[ch_id].mute); /* create pause button */ widgets[ch_id].pause_button = (GtkToggleButton *)gtk_toggle_button_new(); label = gtk_label_new(PAUSE_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pause_button),label); gtk_box_pack_start(GTK_BOX(top_button_box),GTK_WIDGET(widgets[ch_id].pause_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pause_button), "clicked", GTK_SIGNAL_FUNC(pause_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pause_button)); gtk_toggle_button_set_active(widgets[ch_id].pause_button,local_channels[ch_id].mute); /* create cue button */ widgets[ch_id].cue_button = (GtkToggleButton *)gtk_toggle_button_new(); label = gtk_label_new(CUE_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].cue_button),label); gtk_box_pack_start(GTK_BOX(top_button_box),(GtkWidget*)widgets[ch_id].cue_button,TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].cue_button), "clicked", GTK_SIGNAL_FUNC(cue_button_clicked),&(widgets[ch_id].ch_id)); gtk_toggle_button_set_active(widgets[ch_id].cue_button,local_channels[ch_id].cue); gtk_widget_show(label); if (!Cue_Enabled(&(local_channels[ch_id]))) { gtk_widget_set_sensitive(GTK_WIDGET(widgets[ch_id].cue_button), FALSE); } gtk_widget_show((GtkWidget*)widgets[ch_id].cue_button); } /* add button box to main box */ gtk_box_pack_start (GTK_BOX (main_box), top_button_box, FALSE, FALSE, 0); gtk_widget_show (top_button_box); separator = gtk_hseparator_new(); gtk_box_pack_start (GTK_BOX (main_box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* create sampler buttons */ { sampler_box = gtk_hbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(sampler_box),0); label = gtk_label_new("Samp:"); gtk_box_pack_start(GTK_BOX(sampler_box),label,TRUE,FALSE,0); gtk_widget_show(label); /* playsingle button */ widgets[ch_id].playsingle_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(PLAYSINGLE_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].playsingle_button),label); gtk_box_pack_start(GTK_BOX(sampler_box),GTK_WIDGET(widgets[ch_id].playsingle_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].playsingle_button), "clicked", GTK_SIGNAL_FUNC(playsingle_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].playsingle_button)); /* playloop button */ widgets[ch_id].playloop_button = (GtkToggleButton *)gtk_toggle_button_new(); label = gtk_label_new(PLAYLOOP_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].playloop_button),label); gtk_box_pack_start(GTK_BOX(sampler_box),GTK_WIDGET(widgets[ch_id].playloop_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].playloop_button), "clicked", GTK_SIGNAL_FUNC(playloop_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].playloop_button)); } /* add button box to main box */ gtk_box_pack_start (GTK_BOX (main_box), sampler_box, FALSE, FALSE, 0); gtk_widget_show (sampler_box); separator = gtk_hseparator_new(); gtk_box_pack_start (GTK_BOX (main_box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* create gain and pitch sliders */ { scale_box = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(scale_box),5); /* label = gtk_label_new(GAIN_STR); */ /* gtk_box_pack_start(GTK_BOX(scale_box),label,FALSE,FALSE,0); */ /* gtk_widget_show(label); */ /* create gain scale */ { widgets[ch_id].adj = (GtkAdjustment*) gtk_adjustment_new(0.0,0.0,101.0,1.0,10.0,1.0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].adj), "value_changed", GTK_SIGNAL_FUNC(level_scale_changed),NULL); widgets[ch_id].level_scale = (GtkVScale*)gtk_vscale_new(GTK_ADJUSTMENT(widgets[ch_id].adj)); gtk_scale_set_digits((GtkScale*)widgets[ch_id].level_scale,0); gtk_scale_set_value_pos((GtkScale*)widgets[ch_id].level_scale,GTK_POS_TOP); gtk_box_pack_start(GTK_BOX(scale_box),(GtkWidget*)widgets[ch_id].level_scale,FALSE,FALSE,0); gtk_widget_show((GtkWidget*)widgets[ch_id].level_scale); if (local_channels[channel_indexes[ch_id]].left_gain > 0) { gtk_adjustment_set_value(widgets[ch_id].adj, normalize_scale(100 - ((local_channels[channel_indexes[ch_id]].left_gain * DBAUDIO_MAX_VOLUME) / DBAUDIO_INTERNAL_MAX_VOLUME))); } else { gtk_adjustment_set_value(widgets[ch_id].adj,DEFAULT_GAIN); local_channels[channel_indexes[ch_id]].left_gain = DEFAULT_GAIN; local_channels[channel_indexes[ch_id]].right_gain = DEFAULT_GAIN; } gtk_widget_set_usize((GtkWidget*)widgets[ch_id].level_scale,10,110); } /* add pitch slider and buttons */ { pitch_box = (GtkWidget*) gtk_vbox_new(FALSE,0); pitch_buttons_box = (GtkWidget *) gtk_hbox_new(TRUE,0); /* create pitch scale */ widgets[ch_id].pitch_adj = (GtkAdjustment*) gtk_adjustment_new(0.0,PITCH_LOW_BOUND,PITCH_HIGH_BOUND,0.1,1.0,0.0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_adj), "value_changed", GTK_SIGNAL_FUNC(pitch_scale_changed),NULL); widgets[ch_id].pitch_scale = (GtkHScale*)gtk_hscale_new(GTK_ADJUSTMENT(widgets[ch_id].pitch_adj)); gtk_scale_set_digits((GtkScale*)widgets[ch_id].pitch_scale,1); gtk_box_pack_start(GTK_BOX(pitch_box),(GtkWidget*)widgets[ch_id].pitch_scale,TRUE,TRUE,5); gtk_widget_show((GtkWidget*)widgets[ch_id].pitch_scale); gtk_adjustment_set_value(widgets[ch_id].pitch_adj, local_channels[channel_indexes[ch_id]].user_pitch); /* create pitch buttons */ { /* create pitch -5% button */ widgets[ch_id].pitch_minus5_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(PITCH_MINUS5_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pitch_minus5_button),label); gtk_box_pack_start(GTK_BOX(pitch_buttons_box), GTK_WIDGET(widgets[ch_id].pitch_minus5_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_minus5_button), "clicked", GTK_SIGNAL_FUNC(pitch_minus5_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pitch_minus5_button)); /* create pitch center button */ widgets[ch_id].reset_pitch_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(RESET_PITCH_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].reset_pitch_button),label); gtk_box_pack_start(GTK_BOX(pitch_buttons_box), GTK_WIDGET(widgets[ch_id].reset_pitch_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].reset_pitch_button), "clicked", GTK_SIGNAL_FUNC(reset_pitch_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].reset_pitch_button)); /* create pitch +5% button */ widgets[ch_id].pitch_plus5_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(PITCH_PLUS5_STR); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pitch_plus5_button),label); gtk_box_pack_start(GTK_BOX(pitch_buttons_box), GTK_WIDGET(widgets[ch_id].pitch_plus5_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_plus5_button), "clicked", GTK_SIGNAL_FUNC(pitch_plus5_button_clicked),&(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pitch_plus5_button)); } /* create sync buttons */ { pitch_sync_box = (GtkWidget *) gtk_hbox_new(TRUE,0); /* create pitch sync minus button */ widgets[ch_id].pitch_sync_minus_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(SYNC_MINUS); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pitch_sync_minus_button),label); gtk_box_pack_start(GTK_BOX(pitch_sync_box), GTK_WIDGET(widgets[ch_id].pitch_sync_minus_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_minus_button), "pressed", GTK_SIGNAL_FUNC(pitch_sync_minus_button_pressed), &(widgets[ch_id].ch_id)); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_minus_button), "released", GTK_SIGNAL_FUNC(pitch_sync_minus_button_released), &(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pitch_sync_minus_button)); /* create pitch sync pause button */ widgets[ch_id].pitch_sync_pause_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(SYNC_PAUSE); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pitch_sync_pause_button),label); gtk_box_pack_start(GTK_BOX(pitch_sync_box), GTK_WIDGET(widgets[ch_id].pitch_sync_pause_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_pause_button), "pressed", GTK_SIGNAL_FUNC(pitch_sync_pause_button_pressed), &(widgets[ch_id].ch_id)); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_pause_button), "released", GTK_SIGNAL_FUNC(pitch_sync_pause_button_released), &(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pitch_sync_pause_button)); /* create pitch sync plus button */ widgets[ch_id].pitch_sync_plus_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(SYNC_PLUS); gtk_container_add(GTK_CONTAINER(widgets[ch_id].pitch_sync_plus_button),label); gtk_box_pack_start(GTK_BOX(pitch_sync_box), GTK_WIDGET(widgets[ch_id].pitch_sync_plus_button), FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_plus_button), "pressed", GTK_SIGNAL_FUNC(pitch_sync_plus_button_pressed), &(widgets[ch_id].ch_id)); gtk_signal_connect (GTK_OBJECT(widgets[ch_id].pitch_sync_plus_button), "released", GTK_SIGNAL_FUNC(pitch_sync_plus_button_released), &(widgets[ch_id].ch_id)); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(widgets[ch_id].pitch_sync_plus_button)); } /* add to scale box */ gtk_box_pack_start(GTK_BOX(pitch_box),pitch_buttons_box,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(scale_box),pitch_box,FALSE,FALSE,0); separator = gtk_hseparator_new(); gtk_box_pack_start (GTK_BOX (scale_box), separator, FALSE, FALSE, 2); gtk_widget_show (separator); gtk_box_pack_start(GTK_BOX(scale_box),pitch_sync_box,FALSE,FALSE,0); gtk_widget_show(pitch_sync_box); gtk_widget_show(pitch_box); gtk_widget_show(pitch_buttons_box); } } /* add scale box to main box */ gtk_box_pack_start (GTK_BOX (main_box), scale_box, FALSE, FALSE, 0); gtk_widget_show (scale_box); /* separator = gtk_hseparator_new(); */ /* gtk_box_pack_start (GTK_BOX (main_box), separator, FALSE, FALSE, 0); */ /* gtk_widget_show (separator); */ gtk_box_pack_start(GTK_BOX(other_main_box),main_box,FALSE,FALSE,0); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(other_main_box),separator,FALSE,FALSE,0); gtk_widget_show(separator); Debug("create_channel_controls end"); return other_main_box; } DBMix-0.9.8/dbmixer/crossfader.c0000644000076400007640000003774607414176635012153 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" local_channel * fader_ch1, * fader_ch2 = NULL; /*GtkAdjustment * fader_adj1 = NULL,* fader_adj2 = NULL;*/ int fader_index1 = 0,fader_index2 = 0; GtkAdjustment * fader_adj, * autofade_adj; extern int * channel_indexes; extern local_channel * local_channels; extern dbfsd_data * sysdata; extern channel_widgets * widgets; GtkButton *punch_button_left, * punch_button_right; int punch_button_left_id = 0, punch_button_right_id = 1; #if 0 static const char * fadeleft_data[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #0000FFFF0000", "................", ".X..............", ".XX.............", ".XXX............", ".XXXX...........", ".XXXXX..........", ".XXXXXX.........", ".XXXXXXX........", ".XXXXXXXX.......", ".XXXXXXXXX......", ".XXXXXXXXXX.....", ".XXXXXXXXXXX....", ".XXXXXXXXXXXX...", ".XXXXXXXXXXXXX..", ".XXXXXXXXXXXXXX.", "................"}; static const char * fadecenter_data[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #0000FFFF0000", "................", "..............X.", ".............XX.", "............XXX.", "...........XXXX.", "..........XXXXX.", ".........XXXXXX.", "........XXXXXXX.", ".......XXXXXXXX.", "......XXXXXXXXX.", ".....XXXXXXXXXX.", "....XXXXXXXXXXX.", "...XXXXXXXXXXXX.", "..XXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", "................"}; static const char * faderight_data[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #0000FFFF0000", "................", "..............X.", ".............XX.", "............XXX.", "...........XXXX.", "..........XXXXX.", ".........XXXXXX.", "........XXXXXXX.", ".......XXXXXXXX.", "......XXXXXXXXX.", ".....XXXXXXXXXX.", "....XXXXXXXXXXX.", "...XXXXXXXXXXXX.", "..XXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", "................"}; #endif /***********************************************************************/ /* autofade functions for crossfader */ /***********************************************************************/ gint fade_time_base; float fade_time; typedef struct autofade_s { struct timeval start_tv; int count; int last; int start; int end; int direction; } autofade; autofade af; /* The following three functions implement auto crossfading. This took about a week of banging my head against the wall before a friend (Ryan Bedwell) pointed out to me that linux is not a realtime OS. The problem was that all crossfades took either 0.001, 2 or 4 seconds, instead of being linearally mapped against the autofade spd. slider. (i.e. setting the slider to a value of 1.5 should have caused a fade of 3 seconds, but in reality took only 2.) So the algorithm now samples the time at every iteration and will adjust the loop counters and crossfade value appropriately if a timeout was missed. 11/12/00 - rewrote audofade callbacks so that they use gtk timeouts instead of the good ole' reliable select() call. Because gtk interrupts processing each time new input was recieved, there was some fade jumping occuring. For example, say you fade left to right(0 to 200). When the fader hits 20, you click the button for fade right to left. The fader in response, fades from 20 back to 0. Becuase the first fade was interrupted to accomplish the second fade, when the fader hits 0 and the right to left fade routine exits, the first routine starts where it was interrupted and fades from 20 to 200. I had solved this 95% with some loop flags and use of the volatile keyword on shared variables, but the gtk_timeout method is more elegant, and works 100% of the time. =) */ int autofade_callback(gpointer data) { static struct timeval tv; static struct timezone tz; int sleep_seconds; int sleep_usec; int i; int time; unsigned int elapsed; /* get current fade speed */ time = (int)((float)fade_time * (float)1000); sleep_seconds = (int)(time / 200) / 1000; sleep_usec = (int)(time/200) * 1000; if (sleep_usec == 0) { sleep_usec = 500; } if(af.count > 0) { /* get time */ gettimeofday(&tv,&tz); /* get time elapsed since fade began */ elapsed = ((tv.tv_sec - af.start_tv.tv_sec) * 1000 * 1000) + (tv.tv_usec - af.start_tv.tv_usec); i = elapsed / sleep_usec; /* update iterator */ af.count -= (i - af.last); af.last = i; /* calculate new value and make sure it is in range */ i = af.start + (af.direction * i); if(af.direction == 1) { if (i > af.end) i = af.end; } else { if(i < af.end) i = af.end; } /* set value */ gtk_adjustment_set_value(GTK_ADJUSTMENT(fader_adj),i); while (gtk_events_pending()) gtk_main_iteration(); return TRUE; } else { af.last = 0; return FALSE; } } void autofade_left_to_right(void * arg) { int faderpos = fader_adj->value; int sleep_usec; int time; static struct timezone start_tz; time = (int)((float)autofade_adj->value * (float) (fade_time_base * 1000)); sleep_usec = (time/200) % 1000; gettimeofday(&af.start_tv,&start_tz); af.count = 200 - faderpos; af.direction = 1; af.start = faderpos; af.last = 0; af.end = 200; send_msg(fader_ch2,DBMSG_UNMUTE,0); send_msg(fader_ch2,DBMSG_PLAY,0); gtk_timeout_add(sleep_usec,(GtkFunction)autofade_callback,&af); return; } void autofade_right_to_left(void * arg) { int faderpos = fader_adj->value; int sleep_usec; int time; static struct timezone start_tz; time = (int)((float)autofade_adj->value * (float) (fade_time_base * 1000)); sleep_usec = (time/200) % 1000; gettimeofday(&af.start_tv,&start_tz); af.count = faderpos; af.direction = -1; af.start = faderpos; af.last = 0; af.end = 0; send_msg(fader_ch1,DBMSG_UNMUTE,0); send_msg(fader_ch1,DBMSG_PLAY,0); gtk_timeout_add(sleep_usec,autofade_callback,&af); return; } void autofade_to_center (void * arg) { int faderpos = fader_adj->value; int sleep_usec; int time; static struct timezone start_tz; if(faderpos == 100) return; time = (int)((float)autofade_adj->value * (float) (fade_time_base * 1000)); sleep_usec = (time/200) % 1000; gettimeofday(&af.start_tv,&start_tz); af.end = 100; if (faderpos < 100) { af.count = 100 - faderpos; af.direction = 1; af.start = faderpos; af.last = 0; } else { af.count = faderpos - 100; af.direction = -1; af.start = faderpos; af.last = 0; } gtk_timeout_add(sleep_usec,autofade_callback,&af); } /***********************************************************************/ /* callback functions for crossfader */ /***********************************************************************/ void update_fader() { /* not implemented. */ } void crossfader_scale_changed(GtkAdjustment * adj) { int gain; if(adj->value < 100) { gain = ((float) (100 - widgets[fader_index2].adj->value) * (float)adj->value) / DBAUDIO_MAX_VOLUME; /* convert to 0-128 scale */ gain = (gain * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; fader_ch2->right_gain = fader_ch2->left_gain = gain; return; } if(adj->value == 100) { gain = ((float) (100 - widgets[fader_index1].adj->value) * (float)adj->value) / DBAUDIO_MAX_VOLUME; gain = (gain * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; fader_ch2->right_gain = fader_ch2->left_gain = gain; fader_ch1->right_gain = fader_ch1->left_gain = gain; return; } if(adj->value > 100) { gain = normalize_scale(((float)(100 - widgets[fader_index1].adj->value) * (float)(100 - (adj->value - 100))) / DBAUDIO_MAX_VOLUME); gain = (gain * DBAUDIO_INTERNAL_MAX_VOLUME) / DBAUDIO_MAX_VOLUME; fader_ch1->right_gain = fader_ch1->left_gain = gain; return; } } void fader_left_select(GtkWidget *w, gint * data) { gint index; index = (gint)*data; fader_ch1 = &(local_channels[index]); fader_index1 = index; crossfader_scale_changed(fader_adj); } void fader_right_select(GtkWidget *w, gint * data) { gint index; index = (gint)*data; fader_ch2 = &(local_channels[index]); fader_index2 = index; crossfader_scale_changed(fader_adj); } void punch_button_pressed(GtkWidget *w, gchar* data) { local_channel * ch; gint index; if(*data) { index = fader_index2; } else { index = fader_index1; } ch = &(local_channels[channel_indexes[index]]); widgets[index].tempvol = ch->left_gain; ch->left_gain = ch->right_gain = normalize_scale(100 - widgets[index].adj->value); } void punch_button_released(GtkWidget *w, gchar* data) { local_channel * ch; gint index; if(*data) { index = fader_index2; } else { index = fader_index1; } ch = &(local_channels[channel_indexes[index]]); ch->left_gain = ch->right_gain = widgets[index].tempvol; } void autofade_left_clicked(GtkWidget *w, gchar * data) { autofade_right_to_left(NULL); } void autofade_center_clicked(GtkWidget *w, gchar * data) { autofade_to_center(NULL); } void autofade_right_clicked(GtkWidget *w, gchar * data) { autofade_left_to_right(NULL); } void autofade_scale_changed(GtkAdjustment * adj) { fade_time = adj->value; } /***********************************************************************/ /* widget creation functions for crossfader */ /***********************************************************************/ void Create_Autofade_Scale(GtkBox * box) { GtkWidget * auto_scale; GtkWidget * label; label = (GtkWidget *) gtk_label_new(AUTOFADE_STR); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(box),label,FALSE,FALSE,0); autofade_adj = (GtkAdjustment *) gtk_adjustment_new(fade_time_base,0.1,FADE_TIME_MAX,0.1,1.0,0.0); auto_scale = (GtkWidget *) gtk_hscale_new(GTK_ADJUSTMENT(autofade_adj)); gtk_scale_set_digits((GtkScale*)auto_scale,1); gtk_signal_connect (GTK_OBJECT(autofade_adj), "value_changed", GTK_SIGNAL_FUNC(autofade_scale_changed),NULL); gtk_box_pack_start(GTK_BOX(box),auto_scale,FALSE,FALSE,0); gtk_widget_show(auto_scale); } GtkWidget* Create_Fader(GtkWindow* win) { GtkWidget * opt, * menu, * item; /* pointer to fill in channel selector*/ char str[20]; int i; GtkWidget * fader_scale; /* cross fader slider */ gint * index; GtkWidget * fader_box; GtkWidget * label; GtkWidget * separator; fade_time = DEFAULT_FADE_TIME_BASE; fader_box = gtk_hbox_new(FALSE,0); gtk_widget_show(fader_box); fader_adj = (GtkAdjustment *) gtk_adjustment_new(0.0,0.0,200.0,1.0,10.0,0.0); Debug("Creating crossfader left input selector..."); /* add left punch button */ { punch_button_left = (GtkButton *) gtk_button_new(); label = gtk_label_new(PUNCH_STR); gtk_container_add(GTK_CONTAINER(punch_button_left),label); gtk_box_pack_start(GTK_BOX(fader_box),(GtkWidget*)punch_button_left,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(punch_button_left), "pressed", GTK_SIGNAL_FUNC(punch_button_pressed),&(punch_button_left_id)); gtk_signal_connect (GTK_OBJECT(punch_button_left), "released", GTK_SIGNAL_FUNC(punch_button_released),&(punch_button_left_id)); gtk_widget_show(label); gtk_widget_show((GtkWidget*)punch_button_left); } /* crossfader left side input select */ { opt = gtk_option_menu_new(); menu = gtk_menu_new(); for(i = 0; i < sysdata->num_channels;i++) { index = (gint*) malloc(sizeof(gint)); *index = i; sprintf(str,"%d",local_channels[i].index + 1); item = make_menu_item (str,GTK_SIGNAL_FUNC(fader_left_select), index); gtk_menu_append(GTK_MENU (menu), item); } /* add option list to channel selector */ gtk_option_menu_set_menu(GTK_OPTION_MENU (opt), menu); gtk_box_pack_start(GTK_BOX (fader_box), opt, FALSE, FALSE, 10); gtk_widget_show(opt); } Debug("Creating crossfader..."); fader_scale = gtk_hscale_new(GTK_ADJUSTMENT(fader_adj)); gtk_scale_set_digits((GtkScale*)fader_scale,0); gtk_box_pack_start(GTK_BOX(fader_box),fader_scale,TRUE,TRUE,10); gtk_widget_show(fader_scale); Debug("Creating crossfader right input selector..."); /* crossfader right side input select */ { opt = gtk_option_menu_new(); menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { index = (gint*) malloc(sizeof(gint)); *index = i; sprintf(str,"%d",local_channels[i].index + 1); item = make_menu_item(str,GTK_SIGNAL_FUNC(fader_right_select), index); gtk_menu_append(GTK_MENU (menu), item); } /* add option list to channel selector */ gtk_menu_set_active(GTK_MENU(menu),1); gtk_option_menu_set_menu(GTK_OPTION_MENU (opt), menu); gtk_box_pack_start (GTK_BOX (fader_box), opt, FALSE, FALSE, 10); gtk_widget_show(opt); } /* add right punch button */ { punch_button_right = (GtkButton *) gtk_button_new(); label = gtk_label_new(PUNCH_STR); gtk_container_add(GTK_CONTAINER(punch_button_right),label); gtk_box_pack_start(GTK_BOX(fader_box),(GtkWidget*)punch_button_right,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(punch_button_right), "pressed", GTK_SIGNAL_FUNC(punch_button_pressed),&(punch_button_right_id)); gtk_signal_connect (GTK_OBJECT(punch_button_right), "released", GTK_SIGNAL_FUNC(punch_button_released),&(punch_button_right_id)); gtk_widget_show(label); gtk_widget_show((GtkWidget*)punch_button_right); } gtk_signal_connect (GTK_OBJECT(fader_adj), "value_changed", GTK_SIGNAL_FUNC(crossfader_scale_changed),NULL); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(fader_box),separator,FALSE,FALSE,5); gtk_widget_show(separator); /* add autofade buttons */ { GtkWidget * button; Debug("adding autofade buttons..."); /* add fade left button */ button = (GtkWidget *) gtk_button_new(); label = gtk_label_new(" < "); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(fader_box),button,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(autofade_left_clicked),NULL); /* add fade center button */ button = (GtkWidget *) gtk_button_new(); label = gtk_label_new(" /\\ "); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(fader_box),button,FALSE,FALSE,0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(autofade_center_clicked),NULL); /* add fade right button */ button = (GtkWidget *) gtk_button_new(); label = gtk_label_new(" > "); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(fader_box),button,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(autofade_right_clicked),NULL); } /* init fader to the first channel */ fader_ch1 = &(local_channels[0]); fader_ch2 = &(local_channels[1]); fader_index1 = 0; fader_index2 = 1; return fader_box; } DBMix-0.9.8/dbmixer/dbmixer.c0000644000076400007640000004273007434150200011415 /* DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.1 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" #ifdef EXT_MIXER #include "exmixer.h" #include "save_prefs.h" extern int exmixer_enabled; #endif gint mixer_flag = FALSE; gint monitor_loop_flag = TRUE; int standalone_flag = 0; extern gint fade_time_base; /******************************************************************/ /** Channel access functions **/ /******************************************************************/ void update_button_clicked(GtkWidget * w, gpointer data); void reset_button_clicked (GtkWidget * w, gpointer data); void record_session_clicked(GtkWidget * w, gpointer data); void dbmixer_about(void); void preferences_dialog(void); int shmid, sysshmid; dbfsd_data * sysdata; local_channel * local_channels; int * channel_indexes; channel_widgets * widgets; GtkWidget * window; GtkWidget * menu; GtkWidget * file_selector; GtkLabel * record_label; gint recording_flag; extern int debug_level; /* this function borrowed from GTK API reference on GtkDialog */ void db_message_box(gchar *message) { GtkWidget *dialog, *label, *okay_button; /* create the widgets */ dialog = gtk_dialog_new(); label = gtk_label_new (message); okay_button = gtk_button_new_with_label("OK"); /* ensure that the dialog box is destroyed when the user clicks ok. */ gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer)dialog); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), okay_button); /* add the label, and show everything we've added to the dialog. */ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show_all (dialog); } void send_msg(local_channel * lch,long int msg_type, float data) { dbfsd_msg msg; msg.msg_type = msg_type; msg.data = data; if(msgsnd(lch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmixer: Message sent to %s.",lch->channel_name); } else { Error("dbmixer: Message failure sending to %s.",lch->channel_name); } } int Cue_Enabled(local_channel * ch) { if((ch->channel_flags & CUE_FLAG) == CUE_FLAG) { return TRUE; } else { return FALSE; } } int Channel_Init() { /* Get system data */ sysshmid = shmget((key_t) DB_SYSTEM_SM_KEY, sizeof(dbfsd_data), 0666); if(sysshmid == -1) { Error("DBMixer ERROR: could not create shared memory for system data."); return FAILURE; } sysdata = shmat(sysshmid,(void *)0, 0); if((int)sysdata == -1) { Error("DBMixer ERROR: error attaching system data shared memory."); return FAILURE; } /* verify that there is a free channel into dbfsd */ if(sysdata->free_channel_index == -1) { /* ch = NULL; */ if(shmdt(sysdata) == -1) { Error("DBAudio_Init: could not detach system data memory segment."); return FAILURE; } errno = ERROR_NO_FREE_CHANNELS; return FAILURE; } /* retrieve the channel memory id */ shmid = shmget((key_t) DB_CHANNELS_SM_KEY, (sysdata->num_channels * sizeof(local_channel)), 0666); if(shmid == -1) { Error("DBMixer ERROR: error creating shared memory."); return FAILURE; } else { Debug("DBMixer: shmid is: %d ",shmid); } /* attach the channel memory segment*/ local_channels = (local_channel *) shmat(shmid,(void *)0, 0); if((int)local_channels == -1) { Error("DBMixer ERROR: error attaching shared memory."); return FAILURE; } if(sysdata->main_mixer_device[0] == '\0') strcpy(sysdata->main_mixer_device,MASTER_MIXER); if(sysdata->cue_mixer_device[0] == '\0') strcpy(sysdata->cue_mixer_device,CUE_MIXER); /* get channel id */ /* ch = &(local_channels[sysdata->free_channel_index]); */ /* Debug("DBMixer: opening comm pipe... %s",ch->comm_filename); */ /* if((ch->client_comm_fd = open(ch->comm_filename, O_WRONLY)) == -1) */ /* { */ /* perror("DBMixer: Error opening comm pipe."); */ /* return FAILURE; */ /* } */ /* Debug("DBMixer: opening signal pipe..."); */ /* if((ch->client_sig_fd = open(ch->signal_filename, O_RDONLY)) == -1) */ /* { */ /* perror("DBMixer: Error opening comm pipe."); */ /* return FAILURE; */ /* } */ Debug("DBMixer: dbaudio_init complete."); return SUCCESS; } int channel_exit() { if(shmdt(local_channels) == -1) { Error("DBMixer: could not detach memory segment."); return FAILURE; } /* detach system data memory segment */ if(shmdt(sysdata) == -1) { Error("DBMixer: could not detach system data memory segment."); return FAILURE; } if(standalone_flag) { Debug("calling gtk_main_quit()..."); gtk_main_quit(); } #ifdef EXT_MIXER exmixer_stop(); #endif return SUCCESS; } void create_menu() { GtkWidget * menu_item, * vbox; char str[256]; menu = gtk_menu_new(); /* create update option */ sprintf(str,UPDATE_STR); menu_item = gtk_menu_item_new_with_label(str); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (update_button_clicked), NULL); gtk_widget_show (menu_item); /* create reset option */ sprintf(str,RESET_STR); menu_item = gtk_menu_item_new_with_label(str); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (reset_button_clicked), NULL); gtk_widget_show (menu_item); /* add preferences string */ sprintf(str,PREFERENCES_STR); menu_item = gtk_menu_item_new_with_label(str); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (preferences_dialog), NULL); gtk_widget_show (menu_item); /* add record session option */ record_label = (GtkLabel*) gtk_label_new(RECORD_WAV_STR); vbox = gtk_vbox_new(FALSE,0); menu_item = gtk_menu_item_new(); gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(record_label),FALSE,FALSE,0); gtk_widget_show(GTK_WIDGET(record_label)); gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(menu_item),vbox); gtk_container_set_border_width(GTK_CONTAINER(menu_item),0); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (record_session_clicked), NULL); gtk_widget_show(menu_item); recording_flag = 0; /* add about string */ sprintf(str,ABOUT_STR); menu_item = gtk_menu_item_new_with_label(str); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (dbmixer_about), NULL); gtk_widget_show (menu_item); sprintf(str,QUIT_STR); menu_item = gtk_menu_item_new_with_label(str); gtk_menu_append(GTK_MENU(menu),menu_item); gtk_signal_connect_object (GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (cleanup), NULL); gtk_widget_show (menu_item); } /******************************************************************/ /** GTK Callback functions **/ /******************************************************************/ GtkWidget *channel_select,*mute_button, *cue_button, *gain_scale, *pitch_scale; gint normalize_scale(gint i) { if(i < 0) i = 0; if(i>100) i = 100; return i; } gint dbmixer_exit(GtkWidget * window, GdkEventAny * e, gpointer data) { channel_exit(); /* gtk_main_quit(); */ return SUCCESS; } /*makes a menu item. this function copied from example code found at www.gtk.org */ GtkWidget *make_menu_item(gchar *name, GtkSignalFunc callback,gpointer data ) { GtkWidget *item; item = gtk_menu_item_new_with_label (name); gtk_signal_connect (GTK_OBJECT (item), "activate", callback, data); gtk_widget_show (item); return(item); } void reset_button_clicked (GtkWidget * w, gpointer data) { Debug("sending SIGHUP"); kill(sysdata->pid,SIGHUP); } int update_recording(gpointer data) { if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(menu))) { if (sysdata->recording) { gtk_label_set_text(record_label,STOP_WAV_STR); } else { gtk_label_set_text(record_label,RECORD_WAV_STR); } } return TRUE; } void update_button_clicked(GtkWidget * w, gpointer data) { update_recording(NULL); update_channels(NULL); update_soundcards(NULL); update_balance(NULL); update_sampler(NULL); } gint option_button_clicked(GtkWidget* widget, GdkEvent * event) { if (event->type == GDK_BUTTON_PRESS) { GdkEventButton *bevent = (GdkEventButton *) event; gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, bevent->button, bevent->time); /* Tell calling code that we have handled this event; the buck * stops here. */ return TRUE; } /* Tell calling code that we have not handled this event; pass it on. */ return FALSE; } void got_record_filename(GtkWidget *w, gint * data) { gchar * filename; /* get filename */ filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); /* copy filename to sysdata buffer */ strcpy(sysdata->filename,filename); /* notify dbfsd to start recording */ kill(sysdata->pid,SIGUSR1); } void record_session_clicked(GtkWidget * w, gpointer data) { if (sysdata->recording) { Debug("stop recording"); gtk_label_set_text(record_label,RECORD_WAV_STR); kill(sysdata->pid,SIGUSR2); } else { Debug("start recording"); gtk_label_set_text(record_label,STOP_WAV_STR); /* get filename */ /* Create the selector */ file_selector = gtk_file_selection_new(SAMPLE_FILE_STR); gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (got_record_filename), NULL); /* Ensure that the dialog box is destroyed when the user clicks a button. */ gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); /* Display that dialog */ gtk_widget_show (file_selector); } } /******************************************************************/ /** Main Window Creation **/ /******************************************************************/ void Window_Init() { GtkWidget * tempwidget; GtkWidget * hbox; GtkWidget * main_box; GtkWidget * fader_box; GtkWidget * vbox; GtkWidget * channels_box; GtkWidget * clipbox; GtkWidget * soundcard_controls; GtkWidget * sample_editor_box; GtkWidget * option_button; GtkWidget * controls_box; GtkWidget * channels_v_box; GtkWidget * separator; int i; Debug("Indow_Init start."); channel_indexes = (int *) malloc(sysdata->num_channels * sizeof(int)); widgets = (channel_widgets *) malloc(sysdata->num_channels * sizeof(channel_widgets)); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC(dbmixer_exit), NULL); gtk_widget_realize(window); main_box = gtk_hbox_new(FALSE,0); gtk_widget_show(main_box); vbox = gtk_vbox_new(FALSE,0); gtk_widget_show(vbox); hbox = gtk_hbox_new(FALSE,0); gtk_widget_show(hbox); channels_box = gtk_hbox_new(FALSE,0); gtk_widget_show(channels_box); channels_v_box = gtk_vbox_new(FALSE,0); gtk_widget_show(channels_v_box); controls_box = gtk_vbox_new(FALSE,0); gtk_widget_show(controls_box); gtk_container_add(GTK_CONTAINER(vbox),hbox); gtk_window_set_title (GTK_WINDOW (window), DBMIXER_VERSION_STR); /* gtk_window_set_default_size(window,500,400); */ Debug("Creating channel controls..."); for(i = 0; i < sysdata->num_channels; i++) { Debug("control %d... ",i); channel_indexes[i] = 0; tempwidget = create_channel_controls(i); gtk_widget_show(tempwidget); gtk_container_add(GTK_CONTAINER(channels_box),tempwidget); Debug("\bdone."); } Debug("Adding channel update timeout..."); gtk_timeout_add(UPDATE_CHANNEL_TIMEOUT,update_channels,NULL); Debug("Adding sampler update timeout..."); gtk_timeout_add(UPDATE_CHANNEL_TIMEOUT,update_sampler,NULL); Debug("Adding recording update timeout..."); gtk_timeout_add(UPDATE_CHANNEL_TIMEOUT,update_recording,NULL); Debug("Creating clipping notifier..."); clipbox = Create_Clipping_Light(window); gtk_widget_show(clipbox); gtk_box_pack_start(GTK_BOX(controls_box),clipbox, TRUE,FALSE,0); Debug("Creating clipping notifier timer..."); { guint32 interval = CLIPPING_INTERVAL; gtk_timeout_add(interval,(GtkFunction)clipping_light_callback,NULL); } Debug("Creating master and cue volume controls..."); /* add soundcard controls to controls_box */ soundcard_controls = Create_Soundcard_Controls(); gtk_widget_show(soundcard_controls); gtk_box_pack_start(GTK_BOX(controls_box),soundcard_controls, TRUE,FALSE,0); /* add autofade speed control to controls_box */ Create_Autofade_Scale(GTK_BOX(controls_box)); /* create option button and associated menu */ create_menu(); option_button = gtk_button_new_with_label(OPTION_STR); gtk_signal_connect_object (GTK_OBJECT (option_button), "event", GTK_SIGNAL_FUNC (option_button_clicked), GTK_OBJECT (menu)); gtk_box_pack_start(GTK_BOX(controls_box),(GtkWidget*)option_button, TRUE,FALSE,0); gtk_widget_show(option_button); /* create crossfader */ fader_box = Create_Fader(window); /* create sample editor */ sample_editor_box = create_sample_editor(); Debug("packing main window..."); gtk_box_pack_start(GTK_BOX(channels_v_box),channels_box,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(hbox),channels_v_box,FALSE,FALSE,0); separator = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(vbox),separator,FALSE,FALSE,0); gtk_widget_show(separator); /* note: to make fader box to be larger than channels box, replace channels_v_box with vbox */ gtk_box_pack_start(GTK_BOX(vbox),fader_box,FALSE,FALSE,10); gtk_box_pack_start(GTK_BOX(main_box),vbox,FALSE,FALSE,10); gtk_box_pack_start(GTK_BOX(hbox),sample_editor_box,FALSE,FALSE,10); gtk_widget_show(sample_editor_box); separator = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(main_box),separator,FALSE,FALSE,0); gtk_widget_show(separator); gtk_box_pack_start(GTK_BOX(main_box),controls_box,FALSE,FALSE,10); gtk_widget_show(controls_box); gtk_container_add(GTK_CONTAINER(window),main_box); gtk_widget_show(window); Debug("Window_Init end."); } void init(void) { #ifdef DBMIX_DEBUG debug_level = 1; printf("Debugging is on.\n"); #else debug_level = 0; #endif fade_time_base = DEFAULT_FADE_TIME_BASE; /* do dbfsd init stuff */ Debug("INIT: initializing shared memory..."); if(Channel_Init() != SUCCESS) { Debug("INIT: Channel Init failed... Is dbfsd running?\nexiting..."); channel_exit(); return; } if(Soundcard_Mixer_Init() != SUCCESS) { Debug("INIT: could not initialize soundcard mixer... "); } else { Debug("INIT: soundcard mixer(s) has been initialized.\n"); } Debug("INIT: initailizing gui components..."); /* create gui conponents */ Window_Init(); /* update_button_clicked(NULL,NULL); */ #ifdef EXT_MIXER /* Create exmixer and clear values */ exmixer_clear(); read_settings(); /* */ /* Start the exmixer */ /* */ /* Is the preferences file present? */ if( exmixer_enabled ) { /* If no ~/.joystick file, must calibrate on the fly */ set_calibration( !read_js_settings() ); exmixer_start(); } #endif /* EXT_MIXER */ Debug("INIT: done."); } void cleanup(void) { gtk_widget_destroy(window); window = NULL; /* tell monitor loop to shutdown */ Debug("shutting down monitor flag.\n"); monitor_loop_flag = 0; /* free shared memory */ /* detach channel memory segment */ if(shmdt(local_channels) == -1) { Error("DBMixer: could not detach channel memory segment."); /* return FAILURE; */ } /* detach system data memory segment */ if(shmdt(sysdata) == -1) { Error("DBMixer: could not detach system data memory segment."); /* return FAILURE; */ } } DBMix-0.9.8/dbmixer/about.c0000644000076400007640000000477107346372415011120 /* Original code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include static GtkWidget *dialog, *button, *label; void dbmixer_about_close(GtkWidget * w, gpointer data) { gtk_widget_destroy(dialog); } void dbmixer_about(void) { char tempstr[1024]; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), "About DBMixer"); gtk_container_border_width(GTK_CONTAINER(dialog), 5); sprintf(tempstr, "DBMixer %s\n\n \ All Components of DBMix %s\n\n This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation; either version 2 of the License, or\n\ (at your option) any later version.\n\ \n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n\ USA.",DBMIX_VERSION,DBMIX_COPYRIGHT); label = gtk_label_new(tempstr); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); gtk_widget_show(label); button = gtk_button_new_with_label(" Close "); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(dbmixer_about_close), NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show(dialog); gtk_widget_grab_focus(button); } DBMix-0.9.8/dbmixer/debug.c0000644000076400007640000000311607346372415011064 /* implementation of debug.h AUthor: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include int debug_level; static char tempstr[1024]; /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ void Error(const char*fmt, ...) { va_list args; va_start(args, fmt); vsprintf(tempstr,fmt,args); perror(tempstr); va_end(args); } void Debug ( const char *fmt, ...) { if(debug_level) { va_list args; va_start(args, fmt); fflush(stdout); /* fprintf(stdout,"dbfsd.c: "); */ vfprintf(stdout, fmt, args); fprintf(stdout,"\n"); fflush(stdout); va_end(args); } } int Check_Debug() { return debug_level; } DBMix-0.9.8/dbmixer/dbmixer.h0000644000076400007640000001164407436275000011432 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #define DBMIXER_VERSION_STR "DBMixer v 0.9.8" #ifdef DBMIX_DEBUG #define MASTER_MIXER "/dev/mixer0" #define CUE_MIXER "/dev/mixer1" #else #define MASTER_MIXER "/dev/mixer" #define CUE_MIXER "/dev/mixer1" #endif #define CHANNEL_STR "Input:" #define MUTE_STR "Mute" #define CUE_STR "CUE" #define PAUSE_STR "Pause" #define GAIN_STR "Level" #define PITCH_STR "Pitch" #define UPDATE_STR "Update Settings" #define RESET_STR "Reset Soundcard" #define PUNCH_STR "Punch" #define PREFERENCES_STR "Preferences" #define OPTION_STR "Options" #define ABOUT_STR "About" #define QUIT_STR "Quit" #define RESET_PITCH_STR "-|-" #define PITCH_PLUS5_STR "5>" #define PITCH_MINUS5_STR "<5" #define AUTOFADE_STR "Autofade Spd." #define MASTER_LEVEL_STR "Main" #define CUE_LEVEL_STR "Cue" #define BALANCE_STR "L - Balance - R" #define CUE_SPLIT_STR "Cue Split" #define TALKOVER_STR "Mic Talkover" #define SOUNDCARD_FRAME_STR "Soundcard Settings" #define TUNE_STR "DBMix Tuning" #define RECORD_STR "Record Sample" #define PLAYSINGLE_STR "Once" #define PLAYLOOP_STR "Loop" #define SAMPLER_STR "Sample Editor" #define SYNC_PLUS "S+" #define SYNC_MINUS "-S" #define SYNC_PAUSE ".]S[." #define COPY_SAMPLE_STR "Copy Sample To:" #define LOAD_SAMPLE_STR " Load " #define SAVE_SAMPLE_STR " Save " #define RECORD_WAV_STR "Record Session" #define STOP_WAV_STR "Stop Recording Session" #define NO_CLIENT_STR "\n\tNo client for selected channel.\t\n" #define SAMPLE_FILE_STR "Please select a dbmix sample file:" #define CLIPPING_INTERVAL 200 #define UPDATE_CHANNEL_TIMEOUT 1000 #define PITCH_LOW_BOUND 85.0 #define PITCH_HIGH_BOUND 115.0 #define DEFAULT_FADE_TIME_BASE 6 #define FADE_TIME_MAX 15 #define PITCH_SYNC_VALUE 8 #define USLEEP_TIME 30 /* define minimum loop size to be a little over the length of 2 * PIPE_BUF */ #define MIN_LOOP_SECONDS (0.05) void init(void); void cleanup(void); void db_message_box(gchar *message); void send_msg(local_channel * lch,long int msg_type, float data); void dbmixer_about(void); gint dbmixer_exit(GtkWidget * window, GdkEventAny * e, gpointer data); gint normalize_scale(gint i); GtkWidget* make_channel_menu(int ch_id); GtkWidget *make_menu_item(gchar *name, GtkSignalFunc callback,gpointer data ); int Channel_Init(); GtkWidget * create_channel_controls(int ch_id); GtkWidget* Create_Soundcard_Controls(); /* Used to update the channel volume correctly */ void crossfader_scale_changed( GtkAdjustment *); int Soundcard_Mixer_Init(); GtkWidget* make_channel_menu(int ch_id); int update_channels(gpointer data); int update_soundcards(gpointer data); void update_fader1(); void update_fader2(); int update_balance(gpointer data); GtkWidget* Create_Fader(); void * monitor_loop(void * arg); GtkWidget * Create_Clipping_Light(GtkWidget * w); void Clipping_Light_Toggle(gint flag); int clipping_light_callback(gpointer * data); void Create_Autofade_Scale(GtkBox * box); int Cue_Enabled(local_channel * ch); GtkWidget * create_sample_editor(); int update_sampler(gpointer data); typedef struct channel_select_data_s { int index; int channel; } channel_select_data; /* structure to hold pointers to all widgets */ typedef struct channel_widgets_s { GtkAdjustment * adj; GtkAdjustment * pitch_adj; GtkVScale * level_scale; GtkHScale * pitch_scale; GtkToggleButton * mute_button; GtkToggleButton * cue_button; GtkButton * playsingle_button; GtkToggleButton * playloop_button; GtkToggleButton * pause_button; GtkButton * punch_button; GtkButton * reset_pitch_button; GtkButton * pitch_plus5_button; GtkButton * pitch_minus5_button; GtkButton * pitch_sync_plus_button; GtkButton * pitch_sync_pause_button; GtkButton * pitch_sync_minus_button; GtkWidget * opt; GSList * datalist; gint ch_id; gint tempvol; } channel_widgets; DBMix-0.9.8/dbmixer/preferences.c0000644000076400007640000003573507414177262012312 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include "dbmixer.h" #include "save_prefs.h" #ifdef EXT_MIXER #include "exmixer.h" #include "exmixer_prefs.h" extern int exmixer_enabled; #endif static GtkWidget *dialog, *label; static gint main_device_index, cue_device_index, main_mixer_index, cue_mixer_index; static GtkSpinButton * clip_spin_button, * numbuffs_spin_button, * skip_spin_button; extern dbfsd_data *sysdata; extern gint fade_time_base; GtkWidget *exmixer_toggle_button; GtkWidget *exmixer_config_button; void dbmixer_prefs_save(GtkWidget * w, gpointer data) { sprintf(sysdata->main_audio_device,"/dev/dsp%d",main_device_index); sprintf(sysdata->cue_audio_device,"/dev/dsp%d",cue_device_index); sprintf(sysdata->main_mixer_device,"/dev/mixer%d",main_mixer_index); sprintf(sysdata->cue_mixer_device,"/dev/mixer%d",cue_mixer_index); Debug("%s",sysdata->main_audio_device); Debug("%s",sysdata->cue_audio_device); Debug("%s",sysdata->main_mixer_device); Debug("%s",sysdata->cue_mixer_device); sysdata->num_main_buffs = gtk_spin_button_get_value_as_int(numbuffs_spin_button); sysdata->num_cue_buffs = gtk_spin_button_get_value_as_int(numbuffs_spin_button); sysdata->skip_max = gtk_spin_button_get_value_as_int(skip_spin_button); if (sysdata->num_main_buffs < DB_MIN_AUDIO_BUFFS) { sysdata->num_main_buffs = DB_MIN_AUDIO_BUFFS; sysdata->num_cue_buffs = DB_MIN_AUDIO_BUFFS; } Debug("num main buffs: %d num cue buffs: %d", sysdata->num_main_buffs, sysdata->num_cue_buffs); sysdata->clipping_threshold = (gtk_spin_button_get_value_as_float(clip_spin_button) * DB_BUFSIZE_SHORT * DB_CHANNEL_NUM_CHANNELS) / 100 ; Debug("clipping threshold %d",sysdata->clipping_threshold); /* fade_time_base = gtk_spin_button_get_value_as_int(fade_time_spin_button); */ /* #ifdef EXT_MIXER */ write_settings(); /* #endif */ gtk_widget_destroy(dialog); } void dbmixer_prefs_cancel(GtkWidget * w, gpointer data) { gtk_widget_destroy(dialog); } void main_audio_selected(GtkWidget* widget, gint device) { Debug("main audio device is: %d\n",device); main_device_index = device; } void main_mixer_selected(GtkWidget* widget, gint device) { Debug("main mixer device is: %d\n",device); main_mixer_index = device; } void cue_audio_selected(GtkWidget* widget, gint device) { Debug("cue audio device is: %d\n",device); cue_device_index = device; } void cue_mixer_selected(GtkWidget* widget, gint device) { Debug("cue mixer device is: %d\n",device); cue_mixer_index = device; } void clipping_changed(GtkAdjustment * adj) { sysdata->clipping_threshold = (gtk_spin_button_get_value_as_float(clip_spin_button) * DB_BUFSIZE_SHORT * DB_CHANNEL_NUM_CHANNELS) / 100 ; Debug("clipping threshold %d",sysdata->clipping_threshold); } void skip_changed(GtkAdjustment * adj) { sysdata->skip_max = gtk_spin_button_get_value_as_int(skip_spin_button); Debug("skip setting %d",sysdata->skip_max); } #ifdef EXT_MIXER void exmixer_toggle_clicked(GtkWidget *widget) { if (GTK_TOGGLE_BUTTON (widget)->active) { exmixer_enabled = TRUE; exmixer_start(); } else { exmixer_enabled = FALSE; exmixer_stop(); } /* Grey out the button if needed */ gtk_widget_set_sensitive( GTK_WIDGET(exmixer_config_button), exmixer_enabled); } #endif /* The following functions are shamelessly borrowed from xmms =) */ static void scan_devices(gchar * type, GtkWidget * option_menu, GtkSignalFunc sigfunc) { GtkWidget *menu, *item; FILE *file; gchar buffer[256], *temp, *tmp2; gboolean found = FALSE; gint index = 0; menu = gtk_menu_new(); if ((file = fopen("/dev/sndstat", "r"))) { while (fgets(buffer, 255, file)) { if (found && buffer[0] == '\n') break; if (buffer[strlen(buffer) - 1] == '\n') buffer[strlen(buffer) - 1] = '\0'; if (found) { if (index == 0) { tmp2 = strchr(buffer, ':'); if (tmp2) { tmp2++; while (*tmp2 == ' ') { tmp2++; } } else { tmp2 = buffer; } temp = g_strdup_printf("Default (%s)", tmp2); if (strstr(temp,"Open by") == NULL) { item = gtk_menu_item_new_with_label(temp); } else { item = NULL; } g_free(temp); } else { if (strstr(buffer,"Open by") == NULL) { item = gtk_menu_item_new_with_label(buffer); } else { item = NULL; } } if (item) { gtk_signal_connect(GTK_OBJECT(item), "activate", sigfunc, (gpointer) index++); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); } } if (!strcasecmp(buffer, type)) found = 1; } fclose(file); } else { item = gtk_menu_item_new_with_label("Default"); gtk_signal_connect(GTK_OBJECT(item), "activate", sigfunc, (gpointer) 0); gtk_widget_show(item); gtk_menu_append(GTK_MENU(menu), item); } gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); } /* end shameless borrowing =) */ void preferences_dialog(void) { GtkWidget * main_box, *hbox, *vbox; GtkWidget * master_device_menu, * cue_device_menu; GtkWidget * main_mixer_menu, * cue_mixer_menu; GtkWidget * button; GtkWidget * soundcard_frame; GtkWidget * tune_frame; GtkAdjustment * adj; /* char *buf = (char *)malloc(30); */ dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), "DBMix Preferences"); gtk_container_border_width(GTK_CONTAINER(dialog), 5); main_box = gtk_vbox_new(FALSE,10); sscanf(sysdata->main_audio_device,"/dev/dsp%d",&main_device_index); sscanf(sysdata->cue_audio_device,"/dev/dsp%d",&cue_device_index); sscanf(sysdata->main_mixer_device,"/dev/mixer%d",&main_mixer_index); sscanf(sysdata->cue_mixer_device,"/dev/mixer%d",&cue_mixer_index); /* add frame for audio devices */ { soundcard_frame = gtk_frame_new(SOUNDCARD_FRAME_STR); vbox = gtk_vbox_new(TRUE,0); label = gtk_label_new("Any change made here will not take effect until the soundcards are reset.\n To do this, choose \"Reset Soundcard\" from the Options menu."); gtk_label_set_justify((GtkLabel*)label,GTK_JUSTIFY_LEFT); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox),label,FALSE,FALSE,0); /* add master audio device selector */ { hbox = gtk_hbox_new(TRUE,10); label = gtk_label_new("Main Audio Device:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,10); gtk_widget_show(label); master_device_menu = gtk_option_menu_new(); scan_devices("Audio devices:", master_device_menu, main_audio_selected); gtk_option_menu_set_history(GTK_OPTION_MENU(master_device_menu),main_device_index); gtk_box_pack_start(GTK_BOX(hbox),master_device_menu,FALSE,FALSE,10); gtk_widget_show(master_device_menu); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } /* add main mixer device selector */ { hbox = gtk_hbox_new(TRUE,10); label = gtk_label_new("Main Mixer Device:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,10); gtk_widget_show(label); main_mixer_menu = gtk_option_menu_new(); scan_devices("Mixers:", main_mixer_menu, main_mixer_selected); gtk_option_menu_set_history(GTK_OPTION_MENU(main_mixer_menu),main_mixer_index); gtk_box_pack_start(GTK_BOX(hbox),main_mixer_menu,FALSE,FALSE,10); gtk_widget_show(main_mixer_menu); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } /* add cue audio device selector */ { hbox = gtk_hbox_new(TRUE,10); label = gtk_label_new("Cue Audio Device:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,10); gtk_widget_show(label); cue_device_menu = gtk_option_menu_new(); scan_devices("Audio devices:", cue_device_menu, cue_audio_selected); gtk_option_menu_set_history(GTK_OPTION_MENU(cue_device_menu),cue_device_index); gtk_box_pack_start(GTK_BOX(hbox),cue_device_menu,FALSE,FALSE,10); gtk_widget_show(cue_device_menu); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } /* add main mixer device selector */ { hbox = gtk_hbox_new(TRUE,10); label = gtk_label_new("Cue Mixer Device:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,10); gtk_widget_show(label); cue_mixer_menu = gtk_option_menu_new(); scan_devices("Mixers:", cue_mixer_menu, cue_mixer_selected); gtk_option_menu_set_history(GTK_OPTION_MENU(cue_mixer_menu),cue_mixer_index); gtk_box_pack_start(GTK_BOX(hbox),cue_mixer_menu,FALSE,FALSE,10); gtk_widget_show(cue_mixer_menu); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(soundcard_frame),vbox); gtk_widget_show(soundcard_frame); gtk_box_pack_start(GTK_BOX(main_box),soundcard_frame,FALSE,FALSE,0); } /* add dbmix tuning options */ { float clip_value; tune_frame = gtk_frame_new(TUNE_STR); vbox = gtk_vbox_new(FALSE,10); /* add description string */ label = gtk_label_new("Tuning Directions: Adjust the following variables to tune dbmix to your tastes.\n\n \ Clipping Threshold is the percentage of samples that are allowed to be clipped \n \ before triggering the Clipping Light\n\n \ Number of Audio Buffers has to do with the lag between performing an action on \n \ an audio stream, and the results of that action being heard. Reducing the number \n \ of buffers will reduce the lag. This is the same as the -r option for dbfsd, and the \n \ soundcard must be reset with dbmixer->Options->Reset Soundcard for changes to take effect.\n\n \ Skip Value: If your audio output skips like a CD with multiple audio streams at pitches other \n \ than 100%, increase this value. If not, decrease it. For example, my PC is fast and uses a \n \ skip value of 10."); gtk_label_set_justify((GtkLabel*)label,GTK_JUSTIFY_LEFT); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox),label,FALSE,FALSE,0); /* add clipping threshold spin button */ clip_value = ((float) (sysdata->clipping_threshold * 100)) / DB_BUFSIZE_SHORT / DB_CHANNEL_NUM_CHANNELS; hbox = gtk_hbox_new(FALSE,10); adj = (GtkAdjustment*) gtk_adjustment_new(clip_value,0.0,100,0.5,1.0,1.0); label = gtk_label_new("Clipping Threshold"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); gtk_widget_show(label); clip_spin_button = (GtkSpinButton*) gtk_spin_button_new(adj,0.5,1); gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget*)clip_spin_button,FALSE,FALSE,10); gtk_signal_connect (GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(clipping_changed),NULL); /* add num audio buffs spin button */ adj = (GtkAdjustment*) gtk_adjustment_new( sysdata->num_main_buffs,0.0,DB_NUM_FRAGMENTS,1.0,1.0,1.0); label = gtk_label_new("Number of Audio Buffers:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); gtk_widget_show(label); numbuffs_spin_button = (GtkSpinButton*) gtk_spin_button_new(adj,1.0,0); gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget*)numbuffs_spin_button,FALSE,FALSE,10); /* gtk_widget_show(hbox); */ /* gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); */ /* hbox = gtk_hbox_new(TRUE,10); */ /* add default audiofade speed button */ #if 0 adj = (GtkAdjustment*) gtk_adjustment_new( fade_time_base,0.0,fade_time_base*4,1.0,1.0,1.0); label = gtk_label_new("Base Autofade Spd.:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); gtk_widget_show(label); fade_time_spin_button = (GtkSpinButton*) gtk_spin_button_new(adj,1.0,0); gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget*)fade_time_spin_button,FALSE,FALSE,10); #endif /* add skip value button */ adj = (GtkAdjustment*) gtk_adjustment_new( sysdata->skip_max,0.0,MAX_SKIP_MAX,1.0,1.0,1.0); label = gtk_label_new("Skip Value:"); gtk_box_pack_start(GTK_BOX(hbox),label,FALSE,FALSE,0); gtk_widget_show(label); skip_spin_button = (GtkSpinButton*) gtk_spin_button_new(adj,1.0,0); gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget*)skip_spin_button,FALSE,FALSE,10); gtk_signal_connect (GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(skip_changed),NULL); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(tune_frame),vbox); gtk_widget_show(vbox); gtk_widget_show(tune_frame); gtk_box_pack_start(GTK_BOX(main_box),tune_frame,FALSE,FALSE,0); } #ifdef EXT_MIXER /* add external mixer toggle button and device text entries*/ { hbox = gtk_hbox_new(FALSE,10); exmixer_toggle_button = gtk_check_button_new_with_label ("Enable external mixer"); gtk_widget_show (exmixer_toggle_button); gtk_signal_connect(GTK_OBJECT(exmixer_toggle_button), "clicked", GTK_SIGNAL_FUNC(exmixer_toggle_clicked), NULL); gtk_box_pack_start(GTK_BOX(hbox),exmixer_toggle_button,FALSE,FALSE,0); exmixer_config_button = gtk_button_new_with_label(" Config exmixer ... "); gtk_widget_show(GTK_WIDGET(exmixer_config_button)); gtk_box_pack_start(GTK_BOX(hbox), exmixer_config_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(main_box), hbox, FALSE, FALSE, 0); /* Grey out the button if needed */ gtk_widget_set_sensitive( GTK_WIDGET(exmixer_config_button), exmixer_enabled); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(exmixer_toggle_button), exmixer_enabled); gtk_signal_connect (GTK_OBJECT (exmixer_config_button), "clicked", GTK_SIGNAL_FUNC (start_exmixer_config), NULL); } #endif gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), main_box, FALSE, FALSE, 0); gtk_widget_show(label); button = gtk_button_new_with_label(" SAVE "); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(dbmixer_prefs_save), NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); button = gtk_button_new_with_label(" CANCEL "); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(dbmixer_prefs_cancel), NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show_all(dialog); gtk_widget_grab_focus(button); /* free(buf); */ } DBMix-0.9.8/dbmixer/light.c0000644000076400007640000001264607346372415011115 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" static const char * red_data[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #FFFF00000000", "................", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", "................"}; static const char * green_data[] = { "16 16 3 1", " c None", ". c #000000000000", "X c #0000FFFF0000", "................", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXX.", "................"}; #define CLIPPING_LIGHT_WIDTH 16 #define CLIPPING_LIGHT_HEIGHT 16 #define CLIPPING_CLEANUP_COUNT 1000 / CLIPPING_INTERVAL static GtkWidget * clipping_drawing_area; static GdkPixmap * red_light = NULL; static GdkPixmap * green_light = NULL; static GdkPixmap * clipping_light = NULL; GdkBitmap * mask; extern dbfsd_data *sysdata; int clip_count = 0; int clipping_light_callback(gpointer * data) { if (sysdata->clipping >= sysdata->clipping_threshold) { Clipping_Light_Toggle(1); sysdata->clipping = 0; } else { Clipping_Light_Toggle(0); } return TRUE; } /* Create a new backing pixmap of the appropriate size */ static gint clipping_configure_event(GtkWidget *widget, GdkEventConfigure *event) { GtkStyle* style; if (red_light) gdk_pixmap_unref(red_light); if (green_light) gdk_pixmap_unref(green_light); style = gtk_widget_get_style(widget); red_light = gdk_pixmap_create_from_xpm_d(widget->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **)red_data); green_light = gdk_pixmap_create_from_xpm_d(widget->window, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **)green_data); clipping_light = green_light; return TRUE; } /* Redraw the screen from the backing pixmap */ static gint clipping_expose_event(GtkWidget *widget, GdkEventExpose *event) { gdk_draw_pixmap(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], clipping_light, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return FALSE; } void Clipping_Light_Toggle(gint draw_red) { GdkRectangle update_rect; GDK_THREADS_ENTER(); if (draw_red) { clipping_light = red_light; } else { clipping_light = green_light; } update_rect.x = 0; update_rect.y = 0; update_rect.width = CLIPPING_LIGHT_WIDTH; update_rect.height = CLIPPING_LIGHT_HEIGHT; /* gdk_draw_pixmap(clipping_drawing_area->window, */ /* clipping_drawing_area->style->fg_gc[GTK_WIDGET_STATE (clipping_drawing_area)], */ /* clipping_light, */ /* 0, 0, */ /* 0, 0, */ /* CLIPPING_LIGHT_WIDTH, CLIPPING_LIGHT_HEIGHT); */ gtk_widget_draw(clipping_drawing_area,&update_rect); while (gtk_events_pending()) gtk_main_iteration(); /* gdk_flush(); */ GDK_THREADS_LEAVE(); } GtkWidget * Create_Clipping_Light(GtkWidget * w) { GtkWidget * label; GtkWidget * box; box = gtk_hbox_new(FALSE,0); gtk_widget_show(box); /* create clipping label */ label = (GtkWidget *)gtk_label_new("Clipping:"); gtk_widget_show(GTK_WIDGET(label)); gtk_box_pack_start(GTK_BOX(box),label, FALSE,FALSE,0); /* create clipping drawing aread */ clipping_drawing_area = gtk_drawing_area_new(); gtk_drawing_area_size(GTK_DRAWING_AREA(clipping_drawing_area),16,16); gtk_box_pack_start(GTK_BOX(box),clipping_drawing_area,FALSE,FALSE,5); gtk_widget_show(clipping_drawing_area); /* setup drawing area signals */ gtk_signal_connect (GTK_OBJECT (clipping_drawing_area), "expose_event", (GtkSignalFunc) clipping_expose_event, NULL); gtk_signal_connect (GTK_OBJECT(clipping_drawing_area),"configure_event", (GtkSignalFunc) clipping_configure_event, NULL); gtk_widget_set_events (clipping_drawing_area, GDK_EXPOSURE_MASK); return box; } DBMix-0.9.8/dbmixer/exmixer.c0000644000076400007640000004315207346372415011463 /* DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 2000, 2001 Simon Mark Werner DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* required for js device */ #include #include #include #include #include "dbmixer.h" #include #include "exmixer.h" #include "save_prefs.h" #include "exmixer_prefs.h" #include extern GtkAdjustment *main_volume_adj, *cue_volume_adj; extern GtkAdjustment *fader_adj, *autofade_adj, *balance_adj; extern GtkButton *punch_button_left, *punch_button_right; extern channel_widgets *widgets; extern dbfsd_data *sysdata; extern local_channel *local_channels; extern int *channel_indexes; extern int errno; extern int edit_prefs; //GtkWidget *exmixer_menu; int calibration = TRUE; /* do we use on-the-fly calibration? */ int exmixer_enabled = FALSE; /* Enable the exmixer */ int num_channels; /* number of channels available, derived from sysdata->num_channels */ /* Last VALue of the axis, used for axis movement detection */ float *axis_pitch_lval[MAX_DEV], *axis_vol_lval[MAX_DEV]; float cue_lval, main_volume_lval; float fade_speed_lval, cross_fader_lval, balance_lval; int first_time_round[MAX_DEV]; /* First time round don't accept any button presses */ /* Normalize to a number between 0.0 and 1.0 */ float normalize(float min, float cen, float max, float val, int flip) { float tmp_val; /* this will detect if the .joystick or /etc/joystick.cal files were not found or were in the wrong format */ if (min == cen == max == 0.0) { min = -32767; cen = 0.0; max = 32767; } if (flip) { tmp_val = min; min = max; max = tmp_val; } if (val > cen) val = 0.5 * ((val-cen)/(max-cen) + 1); else val = 0.5 * ((val-cen)/(cen-min) + 1); if (val > 1.0) val = 1.0; if (val < 0.0) val = 0.0; return val; } /* checks if a - b < radius */ int is_near( float a, float b, float r ) { if (a>b) { if ((a - b) < r) return TRUE; else return FALSE; } else { if ((b - a) < r) return TRUE; else return FALSE; } } /* Recalibrates the mixer on-the-fly */ void calibrate(int dev_id, int axis_id) { if (!calibration) return; if (A_FLIP) { if (A_MIN > A_VAL) A_MIN = A_VAL; if (A_MAX < A_VAL) A_MAX = A_VAL; } else { if (A_MIN < A_VAL) A_MIN = A_VAL; if (A_MAX > A_VAL) A_MAX = A_VAL; } A_CEN = (A_MAX + A_MIN) / 2; } /* Change the given adjustment if necessary */ void em_set_adj(float *prev_value, float new_value, float inc_value, GtkAdjustment *wid) { /* Has the adjustment moved enough to care about it? */ if( !is_near(*prev_value, new_value, inc_value) ) { /* Set the new previous value */ *prev_value = new_value; /* Set the new adjustment value */ gtk_adjustment_set_value(wid, new_value); } } /* Applies the movement of an axis to a GtkAdjustment */ void em_axis_moved( int dev_id, int axis_id ) { float value; int ch_id = A_CHAN; calibrate(dev_id, axis_id); value = normalize((float)A_MIN, (float)A_CEN, (float)A_MAX, (float)A_VAL, A_FLIP); switch (A_ASSIGN) { case EM_A_PITCH: value *= PITCH_HIGH_BOUND - PITCH_LOW_BOUND; value += PITCH_LOW_BOUND; em_set_adj(&axis_pitch_lval[dev_id][axis_id], value, 0.1, widgets[ch_id].pitch_adj); break; case EM_A_VOLUME: value *= 100.0; em_set_adj(&axis_vol_lval[dev_id][axis_id], value, 1.0, widgets[ch_id].adj); break; case EM_A_CUE_VOLUME: value *= 100.0; em_set_adj(&cue_lval, value, 1.0, cue_volume_adj); break; case EM_A_MAIN_VOLUME: value *= 100.0; em_set_adj(&main_volume_lval, value, 1.0, main_volume_adj); break; case EM_A_CROSS_FADE: value *= 200.0; em_set_adj(&cross_fader_lval, value, 2.0, fader_adj); break; case EM_A_FADE_SPEED: value *= 2.0; em_set_adj(&fade_speed_lval, value, 0.02, autofade_adj); break; case EM_A_BALANCE: value *= 200.0; em_set_adj(&balance_lval, value, 2.0, balance_adj); break; case EM_A_NULL: default: break; } /* Switch */ } /* Applies a button press event to an action */ void em_button_pressed(int dev_id, int but_id) { dbfsd_msg msg; local_channel * ch; int ch_id = B_CHAN; int pressed_flag = 0; pressed_flag = B_PRESSED; /* Ignore a released button */ if (B_PRESSED) { printf("button released\n"); B_PRESSED = FALSE; if ((B_ASSIGN != EM_B_MUTE) && (B_ASSIGN != EM_B_CUE) && (B_ASSIGN != EM_B_PAUSE)) return; } else { printf("button pressed\n"); B_PRESSED = TRUE; } switch (B_ASSIGN) { case EM_B_NULL: msg.msg_type = DBMSG_NONE; Debug("em_read_device(): BUTTON NOT ASSIGNED"); break; case EM_B_MUTE: msg.msg_type = DBMSG_NONE; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets[ch_id].mute_button))) { if (pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].mute_button) ); } } else { if (!pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].mute_button) ); } } break; case EM_B_CUE: msg.msg_type = DBMSG_NONE; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets[ch_id].cue_button))) { if (pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].cue_button) ); } } else { if (!pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].cue_button) ); } } break; case EM_B_STOP: msg.msg_type = DBMSG_STOP; break; case EM_B_PLAY: msg.msg_type = DBMSG_PLAY; break; case EM_B_PAUSE: msg.msg_type = DBMSG_NONE; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets[ch_id].pause_button))) { if (pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].pause_button) ); } } else { if (!pressed_flag) { gtk_button_clicked( GTK_BUTTON(widgets[ch_id].pause_button) ); } } break; case EM_B_PUNCH_LEFT: msg.msg_type = DBMSG_NONE; gtk_button_clicked( GTK_BUTTON(punch_button_left) ); break; case EM_B_PUNCH_RIGHT: msg.msg_type = DBMSG_NONE; gtk_button_clicked( GTK_BUTTON(punch_button_right) ); break; case EM_B_FAST_FORWARD: msg.msg_type = DBMSG_FFORWARD; msg.data = 5; break; case EM_B_REWIND: msg.msg_type = DBMSG_REWIND; msg.data = 5; break; case EM_B_EJECT: msg.msg_type = DBMSG_EJECT; break; case EM_B_NEXT: msg.msg_type = DBMSG_NEXT; break; case EM_B_PREV: msg.msg_type = DBMSG_PREV; break; } /* switch */ if (msg.msg_type != DBMSG_NONE) { ch = &(local_channels[channel_indexes[ch_id]]); Debug("ch->msg_q_id = %d", ch->msg_q_id); if(msgsnd(ch->msg_q_id, &msg, sizeof(dbfsd_msg) - sizeof(long int), IPC_NOWAIT) == 0) Debug("dbmixer: Message sent."); else Error("dbmixer: Message failure."); } } /* Read from the joystick device and set the corresponding adjustments */ void em_read_device( gpointer d_id, gint source_fd, GdkInputCondition condition ) { struct js_event em_event; int dev_id = GPOINTER_TO_INT(d_id); int axis_id, but_id; if (read(D_FD, &em_event, sizeof(struct js_event)) != sizeof(struct js_event)) { Error("\nDBmix - em_read_device(): error reading device %d", dev_id); exmixer_disable_device(dev_id); Error("You have found a bug! :-)"); exit(-1); // return; } /* Check if button or axis event */ switch(em_event.type & ~JS_EVENT_INIT) { case JS_EVENT_AXIS: /* Was an axis event */ axis_id = em_event.number; A_VAL = em_event.value; if (N_AXES) em_axis_moved( dev_id, axis_id ); break; case JS_EVENT_BUTTON: /* Was a button event */ but_id = em_event.number; B_VAL = em_event.value; /* when in edit preferences mode remove button press detection */ if (edit_prefs) gtk_widget_grab_focus(GTK_WIDGET(B_ASSIGN_ENT)); else if (N_BUT && (first_time_round[dev_id] > N_BUT)) /* Forget the first N_BUT button presses */ em_button_pressed( dev_id, but_id); break; } if (first_time_round[dev_id]<8) first_time_round[dev_id]++; } /* Detect the device */ gint exmixer_init_device(js_device *em_dev, char *device_filename) { ioctl(em_dev->fd, JSIOCGVERSION, &em_dev->version); ioctl(em_dev->fd, JSIOCGAXES, &em_dev->num_axes); ioctl(em_dev->fd, JSIOCGBUTTONS, &em_dev->num_buttons); ioctl(em_dev->fd, JSIOCGNAME(NAME_LENGTH), em_dev->name); strncpy(em_dev->filename, device_filename, FILENAME_LENGTH); /* Did we find a joystick device? */ if ((em_dev->num_axes > 0) && (em_dev->num_buttons > 0)) { Debug("exmixer %s (%s) has %d sliders and %d buttons. Driver version is %d.%d.%d.", em_dev->filename, em_dev->name, em_dev->num_axes, em_dev->num_buttons, em_dev->version >> 16, (em_dev->version >> 8) & 0xff, em_dev->version & 0xff); return TRUE; } else { Error("Unable to open device %s.", device_filename); return FALSE; } } /* Tries to open the given device and initialize it * returns TRUE if sucessful */ int exmixer_detect( int dev_id ) { Debug("Detecting exmixer."); /* Try to open the device */ if ( (D_FD = open(D_FILENAME, O_RDONLY) ) < 0 ) { Error("No external mixer found at %s.", D_FILENAME); exmixer_disable_device(dev_id); return FALSE; } /* Try to detect the device */ if (!exmixer_init_device(emix[dev_id].dev, D_FILENAME)) { exmixer_disable_device(dev_id); return FALSE; } first_time_round[dev_id] = 0; return TRUE; } void print_js_settings( int dev_id ) { int axis_id, but_id; char *s_assign = (char *)malloc(30); if (!emix[dev_id].dev->enabled) return; Debug("\ndevice_id = %d", dev_id); Debug("device_fd = %d", D_FD); Debug("device_name = %s", D_NAME); Debug("device_filename = %s", D_FILENAME); Debug(" enabled = %d", D_ENABLED); Debug(" num_axes = %d", N_AXES); Debug(" num_buttons = %d\n", N_BUT); for(axis_id=0; axis_id < N_AXES; axis_id++) { switch (A_ASSIGN) { case EM_A_NULL: sprintf(s_assign, "nothing"); break; case EM_A_PITCH: sprintf(s_assign, "pitch"); break; case EM_A_VOLUME: sprintf(s_assign, "volume"); break; case EM_A_MAIN_VOLUME: sprintf(s_assign, "main_volume"); break; case EM_A_CUE_VOLUME: sprintf(s_assign, "cue_volume"); break; case EM_A_CROSS_FADE: sprintf(s_assign, "cross_fade"); break; case EM_A_FADE_SPEED: sprintf(s_assign, "fade_speed"); break; case EM_A_BALANCE: sprintf(s_assign, "balance"); break; default: sprintf(s_assign, "unknown, A_ASSIGN = %d", A_ASSIGN); break; } Debug(" axis = %d", axis_id); Debug(" axis_min = %d", A_MIN); Debug(" axis_center = %d", A_CEN); Debug(" axis_max = %d", A_MAX); Debug(" axis_flip = %d", A_FLIP); Debug(" axis_channel = %d", A_CHAN); Debug(" axis_assigned = %s", s_assign); } for(but_id=0; but_id < N_BUT; but_id++) { switch (B_ASSIGN) { case EM_B_NULL: sprintf(s_assign, "nothing"); break; case EM_B_MUTE: sprintf(s_assign, "mute"); break; case EM_B_CUE: sprintf(s_assign, "cue"); break; case EM_B_PLAY: sprintf(s_assign, "play"); break; case EM_B_PAUSE: sprintf(s_assign, "pause"); break; case EM_B_STOP: sprintf(s_assign, "stop"); break; case EM_B_PUNCH_LEFT: sprintf(s_assign, "punch left"); break; case EM_B_PUNCH_RIGHT: sprintf(s_assign, "punch right"); break; case EM_B_FAST_FORWARD: sprintf(s_assign, "fast forward"); break; case EM_B_REWIND: sprintf(s_assign, "rewind"); break; case EM_B_EJECT: sprintf(s_assign, "eject"); break; case EM_B_NEXT: sprintf(s_assign, "next track"); break; case EM_B_PREV: sprintf(s_assign, "previous track"); break; default: sprintf(s_assign, "unknown, B_ASSIGN = %d", B_ASSIGN); break; } Debug(" button = %d", but_id); Debug(" button_channel = %d", B_CHAN); Debug(" button_assigned = %s", s_assign); } free(s_assign); } void set_calibration( int c ) { calibration = c; } void exmixer_clear( void ) { int dev_id, axis_id, but_id; Debug("Clearing exmixer."); /* Set the mixer to none as default */ for (dev_id=0; dev_idnum_channels; /* Start the device reading thread whenever the input is ready */ for (dev_id=0; dev_id #include #include #include #include #include #include #include #include #include #include "dbmixer.h" #include "exmixer.h" #include "save_prefs.h" extern int errno; extern int exmixer_enabled; extern dbfsd_data * sysdata; extern gint fade_time_base; /* Shamelessly pillaged from gIDE */ gchar *SK_CutLeadingBlanks( gchar *source ) { gint i; gchar *dest = ""; if( !source ) { printf( "SK_CutLeadingBlanks: NULL-Pointer uebergeben\n" ); return( "" ); } if( strlen( source ) == 0 ) { printf( "SK_CutLeadingBlanks: Leerer String uebergeben\n" ); return( "" ); } for(i=0;i<=(strlen( source ));i++) if( source[i] != ' ' ) { dest = &source[i]; break; } return( dest ); } gint iscomment( gchar *arg ) { if( arg[0] == '#' || arg[0] == ';' ) return( 1 ); else return( 0 ); } gint __isblank( gchar *arg ) { if( strlen( arg ) == 0 ) return( 1 ); else return( 0 ); } int read_js_settings( void ) { gchar *buf = (gchar *) malloc(STR_LEN); gchar *key = (gchar *) malloc(STR_LEN); gchar *arg = (gchar *) malloc(STR_LEN); FILE *fHandle; char *js_file; int dev_id = -1, axis_id = 0; /* Read preferences */ js_file = g_get_home_dir(); if ( !js_file ) { Debug( "Home directory not found!\n" ); return FALSE; } /* Needs to be incorperated with dbmixer to have a universal file */ js_file = g_strconcat(js_file, "/.joystick", NULL); Debug("Opening file %s \n", js_file); fHandle = fopen(js_file, "r"); if ( !fHandle ) { /* Try "/etc/joystick.cal" */ fHandle = fopen("/etc/joystick.cal", "r"); if ( !fHandle ) { printf("Unable to find joystick calibration file needed to calibrate the exmixer."); return FALSE; } } while ( fgets( buf, STR_LEN, fHandle ) ) { strcpy( buf, SK_CutLeadingBlanks( buf ) ); if ( !iscomment( buf ) && !__isblank( buf ) ) { if ( sscanf( buf, "%s = %s", key, arg ) == 2 ) { if ( !strcmp( key, "BeginJoystick" ) ) { dev_id++; sscanf( arg, "%s", D_FILENAME); continue; } if ( !strcmp( key, "BeginAxis" ) ) { axis_id = atoi( arg ); continue; } if ( !strcmp( key, "Minimum" ) ) { A_MIN = atoi( arg ); continue; } if ( !strcmp( key, "Center" ) ) { A_CEN = atoi( arg ); continue; } if ( !strcmp( key, "Maximum" ) ) { A_MAX = atoi( arg ); continue; } } if ( sscanf( buf, "%s", key ) == 1 ) { if ( !strcmp( key, "Flip" ) ) { A_FLIP = TRUE; continue; } } } } fclose( fHandle ); free(buf); free(key); free(arg); return TRUE; } /* Read ~/.dbmix to get the saved settings */ int read_settings( void ) { gchar *buf = (gchar *) malloc(STR_LEN); gchar *key = (gchar *) malloc(STR_LEN); gchar *arg = (gchar *) malloc(STR_LEN); FILE *fHandle; gchar *pref_file; int dev_id = -1; int axis_id=0, but_id=0; /* Read preferences */ pref_file = g_get_home_dir(); if( !pref_file ) { printf( "Home directory not found! Unable to read preferences file.\n" ); return FALSE; } /* Needs to be incorperated with dbmixer to have a universal file */ pref_file = g_strconcat(pref_file, PREF_FILENAME, NULL); Debug("Opening file %s\n", pref_file); fHandle = fopen(pref_file, "r"); if ( !fHandle ) { printf("%s not found, using default preferences.\n", pref_file); return FALSE; } while( fgets( buf, STR_LEN, fHandle ) ) { strcpy( buf, SK_CutLeadingBlanks( buf ) ); if( !iscomment( buf ) && !__isblank( buf ) ) { if( sscanf( buf, "%s = %s", key, arg ) == 2 ) { #ifdef EXT_MIXER if( !strcmp( key, "exmixer_enabled" ) ) { exmixer_enabled = atoi( arg ); continue; } if( !strcmp( key, "device_filename" ) ) { dev_id++; continue; } if( !strcmp( key, "enabled" ) ) { /* Make sure the device opened OK */ D_ENABLED = atoi( arg ); continue; } if( !strcmp( key, "slider" ) ) { axis_id = atoi(arg); if (axis_id > MAX_AXES || (axis_id < 0)) { /* Error checking */ printf("Error in %s\n", pref_file); axis_id = 0; } continue; } if( !strcmp( key, "slider_channel" ) ) { A_CHAN = atoi(arg); if ((A_CHAN > sysdata->num_channels) || (A_CHAN < 0)) { /* Error checking */ printf("Error in %s\n", pref_file); A_CHAN = 0; } continue; } if( !strcmp( key, "slider_assigned" ) ) { A_ASSIGN = atoi( arg ); continue; } if( !strcmp( key, "button" ) ) { but_id = atoi(arg); if (but_id > MAX_BUT || (but_id < 0)) { /* Error checking */ printf("Error in %s\n", pref_file); but_id = 0; } continue; } if( !strcmp( key, "button_channel" ) ) { B_CHAN = atoi(arg); if ((B_CHAN > sysdata->num_channels) || (B_CHAN < 0)) { /* Error checking */ printf("Error in %s\n", pref_file); B_CHAN = 0; } continue; } if( !strcmp( key, "button_assigned" ) ) { B_ASSIGN = atoi( arg ); continue; } #endif if( !strcmp( key, "main_audio_device" ) ) { sprintf(sysdata->main_audio_device, arg); continue; } if( !strcmp( key, "main_audio_device" ) ) { sprintf(sysdata->main_audio_device, arg); continue; } if( !strcmp( key, "cue_audio_device" ) ) { sprintf(sysdata->cue_audio_device, arg); continue; } if( !strcmp( key, "main_mixer_device" ) ) { sprintf(sysdata->main_mixer_device, arg); continue; } if( !strcmp( key, "cue_mixer_device" ) ) { sprintf(sysdata->cue_mixer_device, arg); continue; } if( !strcmp( key, "num_main_buffs" ) ) { sysdata->num_main_buffs = atoi( arg ); continue; } if( !strcmp( key, "num_cue_buffs" ) ) { sysdata->num_cue_buffs = atoi( arg ); continue; } if( !strcmp( key, "clipping_threshold" ) ) { sysdata->clipping_threshold = atoi( arg ); continue; } if( !strcmp( key, "skip_value" ) ) { sysdata->skip_max = atoi( arg ); continue; } #if 0 if ( !strcmp( key, "fade_time_base" ) ) { fade_time_base = atoi( arg ); continue; } #endif } /* if sscanf() */ } /* if */ } /* While */ fclose( fHandle ); free(buf); free(key); free(arg); return TRUE; } /* Write the settings to disk */ void write_settings( void ) { FILE *fHandle; gchar *pref_file;//= (gchar *)malloc(STR_LEN); gchar *label = (gchar *)malloc(STR_LEN); int dev_id = 0; int axis_id, but_id; /* Read preferences */ pref_file = g_get_home_dir(); if( !pref_file ) { printf( "Home directory not found! Unable to save preferences.\n" ); return; } /* Needs to be incorperated with dbmixer to have a universal file */ pref_file = g_strconcat(pref_file, PREF_FILENAME, NULL); Debug("Saving settings to %s\n", pref_file); fHandle = fopen(pref_file, "w"); if ( !fHandle ) { perror("Error while saving preferences:\n"); return; } fputs("# File automaticaly created by DBmix.\n", fHandle); fputs("# Do not edit this file.\n\n", fHandle); #ifdef EXT_MIXER sprintf(label, "exmixer_enabled = %d\n", exmixer_enabled); fputs(label, fHandle); for (dev_id=0; dev_idmain_audio_device); fputs(label, fHandle); sprintf(label, "cue_audio_device = %s\n", sysdata->cue_audio_device); fputs(label, fHandle); sprintf(label, "main_mixer_device = %s\n", sysdata->main_mixer_device); fputs(label, fHandle); sprintf(label, "cue_mixer_device = %s\n", sysdata->cue_mixer_device); fputs(label, fHandle); /* DBMix settings buffs settings */ sprintf(label, "num_main_buffs = %d\n", sysdata->num_main_buffs); fputs(label, fHandle); sprintf(label, "num_cue_buffs = %d\n", sysdata->num_cue_buffs); fputs(label, fHandle); sprintf(label, "clipping_threshold = %d\n", sysdata->clipping_threshold); fputs(label, fHandle); sprintf(label, "skip_value = %d\n", sysdata->skip_max); fputs(label, fHandle); /* DBMix settings autofade settings */ #if 0 sprintf(label, "fade_time_base = %d\n", fade_time_base); fputs(label, fHandle); #endif fclose(fHandle); free(pref_file); free(label); } DBMix-0.9.8/dbmixer/exmixer_prefs.c0000644000076400007640000006257607346372415012675 /* + DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 2000, 2001 Simon Mark Werner DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include /* required for js device */ #include #include #include #include #include #include "save_prefs.h" #include "exmixer.h" #include "exmixer_prefs.h" #include typedef struct channel_widget_id_s { int dev_id; int type_id; } channel_widget_id; extern dbfsd_data * sysdata; GtkWidget *dev_frame_container; GtkWidget *External_Mixer_Settings; channel_widget_id but_ch_wid[MAX_BUT * MAX_DEV]; channel_widget_id axes_ch_wid[MAX_AXES * MAX_DEV]; int but_num, axes_num; int edit_prefs; /* Flag to see if the preferences window is here */ int device_combo_changed_escape; GtkWidget* create_External_Mixer_Settings (void); void frame_widget( int ); void set_all_combos( int ); /* Create/Redisplay the widgets in each device frame */ void create_frame_widgets( void ) { int dev_id; Debug("create_frame_widgets()..."); /* Create the individual Device frames */ for (dev_id=0; dev_id < MAX_DEV; dev_id++) { /* Only create the widgets when D_DEV_FRAME has not been created */ if (D_DEV_FRAME == NULL) { /* Create the frame */ frame_widget( dev_id ); gtk_widget_show( D_DEV_FRAME ); gtk_box_pack_start (GTK_BOX( dev_frame_container ), D_DEV_FRAME, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (D_DEV_FRAME), 10); } else { set_all_combos( dev_id ); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(D_CB_ENABLED), D_ENABLED); } } /* dev_id */ edit_prefs = TRUE; } void exit_prefs (GtkObject *object) { int dev_id; edit_prefs = FALSE; for (dev_id=0; dev_idnum_channels]; gchar *dev_label[4]; /* Frame and Label */ sprintf( label, "Device %d", dev_id ); D_DEV_FRAME = gtk_frame_new ( label ); gtk_container_set_border_width (GTK_CONTAINER (D_DEV_FRAME), 10); /* Main table inside frame */ i = MAX_BUT + MAX_AXES + 2; D_TABLE = gtk_table_new (i, 3, FALSE); gtk_widget_show (D_TABLE); gtk_container_add (GTK_CONTAINER (D_DEV_FRAME), D_TABLE); /* Enabled button */ D_CB_ENABLED = gtk_check_button_new_with_label ("Enabled"); gtk_widget_show (D_CB_ENABLED); gtk_table_attach (GTK_TABLE (D_TABLE), D_CB_ENABLED, 0, 1, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (D_CB_ENABLED), 4); /* Device label */ g_label = gtk_label_new ("Device"); gtk_widget_show (g_label); gtk_table_attach (GTK_TABLE (D_TABLE), g_label, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_misc_set_padding (GTK_MISC (g_label), 0, 20); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(D_CB_ENABLED), D_ENABLED); gtk_signal_connect (GTK_OBJECT (D_CB_ENABLED), "toggled", GTK_SIGNAL_FUNC (enable_js), GINT_TO_POINTER(dev_id)); /* Device entry field */ /* avialable device combo box selection*/ for (i=0; i < 4; i++) { /* Create "1", "2", "3" ... */ dev_label[i] = (gchar *)malloc(30); sprintf(dev_label[i], "/dev/js%d", i); device_combo_items = g_list_append (device_combo_items, dev_label[i]); } /* Device combo box */ D_COMBO = gtk_combo_new (); gtk_widget_show (D_COMBO); gtk_table_attach (GTK_TABLE (D_TABLE), D_COMBO, 2, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 8, 0); gtk_widget_set_usize (D_COMBO, 143, -2); gtk_combo_set_popdown_strings (GTK_COMBO (D_COMBO), device_combo_items); /* the entry box for the device combo */ D_ENTRY = GTK_COMBO (D_COMBO)->entry; gtk_widget_show (D_ENTRY); sprintf(label, D_FILENAME); gtk_entry_set_text(GTK_ENTRY (D_ENTRY), label); gtk_entry_set_editable (GTK_ENTRY (D_ENTRY), FALSE); gtk_signal_connect (GTK_OBJECT (D_ENTRY), "changed", GTK_SIGNAL_FUNC (device_combo_changed), GINT_TO_POINTER(dev_id)); /* Assignment and channel labels */ g_label = gtk_label_new ("Assignment"); gtk_widget_show (g_label); gtk_table_attach (GTK_TABLE (D_TABLE), g_label, 1, 2, 1, 2, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); g_label = gtk_label_new ("Channel"); gtk_widget_show (g_label); gtk_table_attach (GTK_TABLE (D_TABLE), g_label, 2, 3, 1, 2, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); /* Combo box selections */ for (ch_id=0; ch_id < sysdata->num_channels; ch_id++) { /* Create "1", "2", "3" ... */ ch_label[ch_id] = (gchar *)malloc(4); sprintf(ch_label[ch_id], " %d ", ch_id + 1); channel_combo_items = g_list_append (channel_combo_items, ch_label[ch_id]); } /* axes assignments */ axes_combo_items = g_list_append (axes_combo_items, " "); axes_combo_items = g_list_append (axes_combo_items, "Pitch"); axes_combo_items = g_list_append (axes_combo_items, "Volume"); axes_combo_items = g_list_append (axes_combo_items, "Main Volume"); axes_combo_items = g_list_append (axes_combo_items, "Cue Volume"); axes_combo_items = g_list_append (axes_combo_items, "Cross Fade"); axes_combo_items = g_list_append (axes_combo_items, "Fade Speed"); axes_combo_items = g_list_append (axes_combo_items, "Balance"); /* button combo items */ button_combo_items = g_list_append (button_combo_items, " "); button_combo_items = g_list_append (button_combo_items, "Play"); button_combo_items = g_list_append (button_combo_items, "Pause"); button_combo_items = g_list_append (button_combo_items, "Stop"); button_combo_items = g_list_append (button_combo_items, "Mute"); button_combo_items = g_list_append (button_combo_items, "Cue"); button_combo_items = g_list_append (button_combo_items, "Fast Forward"); button_combo_items = g_list_append (button_combo_items, "Rewind"); button_combo_items = g_list_append (button_combo_items, "Next Track"); button_combo_items = g_list_append (button_combo_items, "Previous Track"); button_combo_items = g_list_append (button_combo_items, "Eject"); button_combo_items = g_list_append (button_combo_items, "Punch Left"); button_combo_items = g_list_append (button_combo_items, "Punch Right"); /* Create the axis rows */ for (axis_id=0; axis_id < MAX_AXES; axis_id++) { /* The Axis label */ sprintf(label, "Slider %d", axis_id + 1); g_label = gtk_label_new ( label ); gtk_widget_show (g_label); gtk_table_attach (GTK_TABLE (D_TABLE), g_label, 0, 1, axis_id + 2, axis_id + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 0, 0); /* the axis assignment combo */ A_ASSIGN_CMB = gtk_combo_new (); gtk_widget_show (A_ASSIGN_CMB); gtk_table_attach (GTK_TABLE (D_TABLE), A_ASSIGN_CMB, 1, 2, axis_id + 2, axis_id + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 0, 2); gtk_widget_set_usize (A_ASSIGN_CMB, 143, -2); gtk_combo_set_popdown_strings (GTK_COMBO (A_ASSIGN_CMB), axes_combo_items); /* the entry box for the axis assignment combo */ A_ASSIGN_ENT = GTK_COMBO (A_ASSIGN_CMB)->entry; gtk_widget_show (A_ASSIGN_ENT); gtk_entry_set_editable (GTK_ENTRY (A_ASSIGN_ENT), FALSE); /* Channel combo Box */ A_CHAN_CMB = gtk_combo_new (); gtk_widget_show (A_CHAN_CMB); gtk_table_attach (GTK_TABLE (D_TABLE), A_CHAN_CMB, 2, 3, axis_id + 2, axis_id + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) 0, 0, 0); gtk_widget_set_usize (A_CHAN_CMB, 64, -2); gtk_combo_set_popdown_strings (GTK_COMBO (A_CHAN_CMB), channel_combo_items); /* the entry box for the channel */ A_CHAN_ENT = GTK_COMBO (A_CHAN_CMB)->entry; gtk_widget_show (A_CHAN_ENT); gtk_entry_set_editable (GTK_ENTRY (A_CHAN_ENT), FALSE); /* Signal handlers for combo boxes */ set_axis_assign_combos( dev_id, axis_id ); gtk_signal_connect (GTK_OBJECT (A_CHAN_ENT), "changed", GTK_SIGNAL_FUNC (chan_combo_changed), &A_CHAN); axes_ch_wid[axes_num].dev_id = dev_id; axes_ch_wid[axes_num].type_id = axis_id; gtk_signal_connect (GTK_OBJECT (A_ASSIGN_ENT), "changed", GTK_SIGNAL_FUNC (axes_assign_combo_changed), GINT_TO_POINTER(axes_num)); axes_num++; } for (but_id=0; but_id < MAX_BUT; but_id++) { /* Button Labels */ sprintf(label, "Button %d", but_id + 1); g_label = gtk_label_new (label); gtk_widget_show (g_label); gtk_table_attach (GTK_TABLE (D_TABLE), g_label, 0, 1, but_id + MAX_AXES + 2, but_id + MAX_AXES + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 0, 0); /* Button assignment combo */ B_ASSIGN_CMB = gtk_combo_new (); gtk_widget_show (B_ASSIGN_CMB); gtk_table_attach (GTK_TABLE (D_TABLE), B_ASSIGN_CMB, 1, 2, but_id + MAX_AXES + 2, but_id + MAX_AXES + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) (GTK_EXPAND), 0, 2); gtk_widget_set_usize (B_ASSIGN_CMB, 143, -2); gtk_combo_set_popdown_strings (GTK_COMBO (B_ASSIGN_CMB), button_combo_items); /* the entry box for the combo */ B_ASSIGN_ENT = GTK_COMBO (B_ASSIGN_CMB)->entry; gtk_widget_ref (B_ASSIGN_ENT); gtk_widget_show (B_ASSIGN_ENT); gtk_entry_set_editable (GTK_ENTRY (B_ASSIGN_ENT), FALSE); /* Button channel combo Box */ B_CHAN_CMB = gtk_combo_new (); gtk_widget_show (B_CHAN_CMB); gtk_table_attach (GTK_TABLE (D_TABLE), B_CHAN_CMB, 2, 3, but_id + MAX_AXES + 2, but_id + MAX_AXES + 3, (GtkAttachOptions) (GTK_EXPAND), (GtkAttachOptions) 0, 0, 0); gtk_widget_set_usize (B_CHAN_CMB, 64, -2); gtk_combo_set_popdown_strings (GTK_COMBO (B_CHAN_CMB), channel_combo_items); /* Button channel combo label */ B_CHAN_ENT = GTK_COMBO (B_CHAN_CMB)->entry; gtk_widget_show (B_CHAN_ENT); gtk_entry_set_editable (GTK_ENTRY (B_CHAN_ENT), FALSE); /* Signal handlers for combo boxes */ set_button_assign_combos( dev_id, but_id ); gtk_signal_connect (GTK_OBJECT (B_CHAN_ENT), "changed", GTK_SIGNAL_FUNC (chan_combo_changed), &B_CHAN); but_ch_wid[but_num].dev_id = dev_id; but_ch_wid[but_num].type_id = but_id; gtk_signal_connect (GTK_OBJECT (B_ASSIGN_ENT), "changed", GTK_SIGNAL_FUNC (button_assign_combo_changed), GINT_TO_POINTER(but_num)); but_num++; } /* Clean up */ g_list_free (device_combo_items); g_list_free (channel_combo_items); g_list_free (axes_combo_items); g_list_free (button_combo_items); free(label); for (i=0; i<4; i++) free(dev_label[i]); for (i=0; inum_channels; i++) free(ch_label[i]); } GtkWidget* create_External_Mixer_Settings (void) { GtkWidget *Wid_External_Mixer_Settings; GtkWidget *dialog_vbox1; GtkWidget *upper_dialog_area; GtkWidget *lower_dialog_area; GtkWidget *bottom_button_box; GtkWidget *b_close; Wid_External_Mixer_Settings = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (Wid_External_Mixer_Settings), "Exmixer settings"); gtk_window_set_policy (GTK_WINDOW (Wid_External_Mixer_Settings), TRUE, TRUE, FALSE); dialog_vbox1 = GTK_DIALOG (Wid_External_Mixer_Settings)->vbox; gtk_object_set_data (GTK_OBJECT (Wid_External_Mixer_Settings), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); upper_dialog_area = gtk_vbox_new (FALSE, 0); gtk_widget_show (upper_dialog_area); gtk_box_pack_start (GTK_BOX (dialog_vbox1), upper_dialog_area, TRUE, TRUE, 0); dev_frame_container = gtk_hbox_new (FALSE, 0); gtk_widget_show (dev_frame_container); gtk_box_pack_start (GTK_BOX (upper_dialog_area), dev_frame_container, TRUE, TRUE, 0); create_frame_widgets(); lower_dialog_area = GTK_DIALOG (Wid_External_Mixer_Settings)->action_area; gtk_object_set_data (GTK_OBJECT (Wid_External_Mixer_Settings), "lower_dialog_area", lower_dialog_area); gtk_widget_show (lower_dialog_area); gtk_container_set_border_width (GTK_CONTAINER (lower_dialog_area), 10); bottom_button_box = gtk_hbox_new (FALSE, 0); gtk_widget_show (bottom_button_box); gtk_box_pack_start (GTK_BOX (lower_dialog_area), bottom_button_box, TRUE, TRUE, 0); b_close = gtk_button_new_with_label(" Ok "); gtk_widget_show (b_close); gtk_box_pack_start (GTK_BOX (bottom_button_box), b_close, TRUE, FALSE, 0); gtk_signal_connect (GTK_OBJECT (Wid_External_Mixer_Settings), "destroy", GTK_SIGNAL_FUNC (exit_prefs), NULL); gtk_signal_connect (GTK_OBJECT (b_close), "clicked", GTK_SIGNAL_FUNC (exit_prefs), NULL); return Wid_External_Mixer_Settings; } /* Main part of exmixer prefrences dialog */ void start_exmixer_config (GtkWidget *w) { int dev_id; /* Initializations */ for (dev_id=0; dev_id < MAX_DEV; dev_id++) D_DEV_FRAME = NULL; but_num = 0; axes_num = 0; edit_prefs = FALSE; device_combo_changed_escape = FALSE; /* Create the window */ External_Mixer_Settings = create_External_Mixer_Settings (); gtk_widget_show (External_Mixer_Settings); } DBMix-0.9.8/dbmixer/sample_editor.c0000664000076400007640000004313107436275536012636 /* DB Mixer ======== Description: Interface for handling sample editing within dbmixer. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" extern int * channel_indexes; extern local_channel * local_channels; extern dbfsd_data * sysdata; extern channel_widgets * widgets; static GtkToggleButton * record_button; static int sample_channel, copy_channel; static GtkWidget * start_scale, * end_scale; static float start_value, end_value; static float buftime; static GtkWidget * sampler_option_menu; static GtkWidget * copy_option_menu; static GtkAdjustment * start_adj, * end_adj; static GtkButton * copy_button, * load_button, * save_button; GtkWidget *file_selector; static int copy_count; #define SAMPLES_PER_SECOND (DB_SAMPLE_RATE * DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS) GtkWidget* make_sampler_channel_menu(); int update_sample_sliders(gpointer data) { int modvalue; volatile char write_flag; local_channel * ch; int startoffset, endoffset; startoffset = 0; endoffset = 0; modvalue = 0; ch = &(local_channels[channel_indexes[sample_channel]]); /* pause output */ /* send_msg(ch,DBMSG_PAUSE,0); */ /* if we are playing a sample right now, reset the sample to the begining */ if ((ch->sampler_state == SAMPLER_PLAY_LOOP) || (ch->sampler_state == SAMPLER_PLAY_SINGLE)) { ch->pause = 1; write_flag = ch->writing; while (write_flag) { write_flag = ch->writing; } } startoffset = (int)((float)start_value * (float)SAMPLES_PER_SECOND); endoffset = (int)((float)end_value * (float)SAMPLES_PER_SECOND); /* make sure offsets sit on boundry of a sample */ /* if we have a portion of a sample, include that sample */ /* get offset into buffer: time * samples/second */ modvalue = startoffset % (DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS); /* adjust startoffset to sit on a sample boundry */ if (modvalue) { startoffset += ((DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS) - modvalue); } modvalue = endoffset % (DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS); if (modvalue) { endoffset += ((DB_SAMPLE_SIZE * DB_CHANNEL_NUM_CHANNELS) - modvalue); } ch->sampler_startoffset = startoffset; ch->sampler_endoffset = endoffset; /* if we are playing a sample right now, reset the sample to the begining */ if ((ch->sampler_state == SAMPLER_PLAY_LOOP) || (ch->sampler_state == SAMPLER_PLAY_SINGLE)) { ch->sampler_readoffset = startoffset; ch->pause = 0; } /* unpause output */ /* send_msg(ch,DBMSG_UNPAUSE,0); */ return SUCCESS; } void sampler_channel_menu_select(GtkWidget *w, gpointer * data) { sample_channel = (int)data; update_sampler(NULL); } void copy_channel_menu_select(GtkWidget *w, gpointer * data) { copy_channel = (int)data; } int update_sampler(gpointer data) { GtkWidget * tempwidget; local_channel * ch; ch = &(local_channels[channel_indexes[sample_channel]]); switch (ch->sampler_state) { case SAMPLER_OFF: /* disable playback buttons */ gtk_widget_set_sensitive(GTK_WIDGET(widgets[sample_channel].playloop_button), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(widgets[sample_channel].playsingle_button), FALSE); gtk_toggle_button_set_active(record_button,0); /* disable sliders */ gtk_widget_set_sensitive(GTK_WIDGET(start_scale), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(end_scale), FALSE); break; case SAMPLER_READY: /* calculate time of sample, and set slider values */ buftime = (float)ch->sampler_size / (float)SAMPLES_PER_SECOND; ch->sampler_time = buftime; gtk_adjustment_set_value(start_adj, (float)ch->sampler_startoffset / (float)SAMPLES_PER_SECOND); gtk_adjustment_set_value(end_adj, (float)ch->sampler_endoffset / (float)SAMPLES_PER_SECOND); /* enable plaback buttons */ gtk_widget_set_sensitive(GTK_WIDGET(widgets[sample_channel].playloop_button),TRUE); gtk_widget_set_sensitive(GTK_WIDGET(widgets[sample_channel].playsingle_button),TRUE); gtk_toggle_button_set_active(record_button,0); gtk_toggle_button_set_active(widgets[sample_channel].playloop_button,0); /* turn on loop control sliders */ gtk_widget_set_sensitive(GTK_WIDGET(start_scale), TRUE); gtk_widget_set_sensitive(GTK_WIDGET(end_scale), TRUE); break; case SAMPLER_RECORD: case SAMPLER_PLAY_LOOP: case SAMPLER_PLAY_SINGLE: break; default: break; } if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(gtk_option_menu_get_menu (GTK_OPTION_MENU(sampler_option_menu))))) { tempwidget = gtk_option_menu_get_menu(GTK_OPTION_MENU(sampler_option_menu)); gtk_option_menu_remove_menu(GTK_OPTION_MENU(sampler_option_menu)); /* gtk_widget_destroy(tempwidget); */ tempwidget = make_sampler_channel_menu(sampler_channel_menu_select); gtk_menu_set_active(GTK_MENU(tempwidget),sample_channel); gtk_option_menu_set_menu(GTK_OPTION_MENU(sampler_option_menu),tempwidget); } if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(gtk_option_menu_get_menu (GTK_OPTION_MENU(copy_option_menu))))) { tempwidget = gtk_option_menu_get_menu(GTK_OPTION_MENU(copy_option_menu)); gtk_option_menu_remove_menu(GTK_OPTION_MENU(copy_option_menu)); /* gtk_widget_destroy(tempwidget); */ tempwidget = make_sampler_channel_menu(copy_channel_menu_select); gtk_menu_set_active(GTK_MENU(tempwidget),copy_channel); gtk_option_menu_set_menu(GTK_OPTION_MENU(copy_option_menu),tempwidget); } return TRUE; } void start_changed(GtkAdjustment * adj) { start_value = adj->value; /* make sure change is within range */ if (start_value >= end_value) { start_value = end_value - (MIN_LOOP_SECONDS); if (start_value < 0.0) { start_value = 0.0; } gtk_adjustment_set_value(end_adj,end_value); } update_sample_sliders(NULL); } void end_changed(GtkAdjustment * adj) { end_value = adj->value; if (end_value > buftime) { end_value = buftime; gtk_adjustment_set_value(end_adj,end_value); } if (end_value <= start_value) { end_value = start_value + (MIN_LOOP_SECONDS); gtk_adjustment_set_value(end_adj,end_value); } update_sample_sliders(NULL); } GtkWidget* make_sampler_channel_menu(GtkSignalFunc sigfxn) { GtkWidget * menu; GtkWidget * item; gint i; gint channeldata; menu = gtk_menu_new(); /* add options to channel selector */ for (i = 0; i < sysdata->num_channels;i++) { channeldata = i; item = make_menu_item (local_channels[i].channel_name, GTK_SIGNAL_FUNC(sigfxn), (gpointer)channeldata); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu),(guint) sample_channel); return menu; } void sampler_record_button_clicked(GtkWidget *w, gint * data) { local_channel * ch; gint index = sample_channel; ch = &(local_channels[channel_indexes[index]]); if (ch->free_channel) { db_message_box(NO_CLIENT_STR); return; } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { /* if currently playing, stop playback */ if ((ch->sampler_state == SAMPLER_PLAY_LOOP) || (ch->sampler_state == SAMPLER_PLAY_SINGLE)) { /* disable playback */ ch->sampler_state = SAMPLER_READY; /* give time to stop */ usleep(100000); } ch->sampler_size = 0; ch->sampler_readoffset = 0; ch->sampler_startoffset = 0; /* turn off play buttons while recording */ gtk_widget_set_sensitive(GTK_WIDGET(widgets[index].playsingle_button), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(widgets[index].playloop_button), FALSE); /* turn off loop control sliders while recording */ gtk_widget_set_sensitive(GTK_WIDGET(start_scale), FALSE); gtk_widget_set_sensitive(GTK_WIDGET(end_scale), FALSE); /* set record */ ch->sampler_state = SAMPLER_RECORD; } else { /* stop record */ if (ch->sampler_buf != NULL) { ch->sampler_state = SAMPLER_READY; } } } void sampler_copy_button_clicked(GtkWidget *w, gint * data) { volatile int local_flag; if (local_channels[sample_channel].free_channel) { db_message_box(NO_CLIENT_STR); return; } if (local_channels[copy_channel].free_channel) { db_message_box(NO_CLIENT_STR); return; } if (copy_count > 20000) copy_count = 1; sprintf(sysdata->filename,"/tmp/dbmixtempfile%d",copy_count); copy_count++; sysdata->sampler_op_flag = 1; send_msg(&(local_channels[sample_channel]),DBMSG_SAMPLERSAVE,0); local_flag = sysdata->sampler_op_flag; while (local_flag) { local_flag = sysdata->sampler_op_flag; usleep(50); } sysdata->sampler_op_flag = 1; send_msg(&(local_channels[copy_channel]),DBMSG_SAMPLERLOAD,0); local_flag = sysdata->sampler_op_flag; while (local_flag) { local_flag = sysdata->sampler_op_flag; usleep(USLEEP_TIME); } unlink(sysdata->filename); sysdata->filename[0] = '\0'; } void sampler_load(GtkWidget *w, gint * data) { volatile int local_flag; gchar * filename; /* get filename */ filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); /* copy filename to sysdata buffer */ strcpy(sysdata->filename,filename); sysdata->sampler_op_flag = 1; send_msg(&(local_channels[sample_channel]),DBMSG_SAMPLERLOAD,0); local_flag = sysdata->sampler_op_flag; while (local_flag) { local_flag = sysdata->sampler_op_flag; usleep(USLEEP_TIME); } update_sample_sliders(NULL); } void sampler_load_button_clicked(GtkWidget *w, gint * data) { if (local_channels[sample_channel].free_channel) { db_message_box(NO_CLIENT_STR); return; } /* Create the selector */ file_selector = gtk_file_selection_new(SAMPLE_FILE_STR); gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (sampler_load), NULL); /* Ensure that the dialog box is destroyed when the user clicks a button. */ gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); /* Display that dialog */ gtk_widget_show (file_selector); } void sampler_save(GtkFileSelection *selector, gpointer user_data) { volatile int local_flag; gchar * filename; /* get filename */ filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); /* copy filename to sysdata buffer */ strcpy(sysdata->filename,filename); /* send message to channel */ sysdata->sampler_op_flag = 1; send_msg(&(local_channels[sample_channel]),DBMSG_SAMPLERSAVE,0); local_flag = sysdata->sampler_op_flag; /* wait for save to complete */ while (local_flag) { local_flag = sysdata->sampler_op_flag; usleep(USLEEP_TIME); } } void sampler_save_button_clicked(GtkWidget *w, gint * data) { if (local_channels[sample_channel].free_channel) { db_message_box(NO_CLIENT_STR); return; } /* Create the selector */ file_selector = gtk_file_selection_new(SAMPLE_FILE_STR); gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (sampler_save), NULL); /* Ensure that the dialog box is destroyed when the user clicks a button. */ gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); gtk_signal_connect_object(GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); /* Display that dialog */ gtk_widget_show (file_selector); } /************************************************************************/ GtkWidget * create_sample_editor() { GtkWidget * vbox; /* main box for the window */ GtkWidget * hbox; GtkWidget * vbox2; GtkWidget * hbox2; GtkWidget * label; GtkWidget * menu; copy_count = 1; sample_channel = 0; start_value = 0.0; end_value = DB_SAMPLER_DEFAULT_TIME; /* create main box for the window */ vbox = (GtkWidget*)gtk_vbox_new(FALSE,0); gtk_widget_show(vbox); /* make sampler editor title */ label = gtk_label_new(SAMPLER_STR); gtk_box_pack_start(GTK_BOX(vbox),label,FALSE,FALSE,10); /* gtk_widget_show(label); */ /* make label for channel selection */ sampler_option_menu = gtk_option_menu_new(); menu = make_sampler_channel_menu(sampler_channel_menu_select); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (sampler_option_menu), menu); gtk_box_pack_start (GTK_BOX (vbox), sampler_option_menu, FALSE, FALSE, 0); gtk_widget_show (sampler_option_menu); /* load/save button box */ { hbox2 = (GtkWidget*)gtk_hbox_new(TRUE,0); gtk_widget_show(hbox2); load_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(LOAD_SAMPLE_STR); gtk_container_add(GTK_CONTAINER(load_button),label); gtk_box_pack_start(GTK_BOX(hbox2),GTK_WIDGET(load_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(load_button), "clicked", GTK_SIGNAL_FUNC(sampler_load_button_clicked),NULL); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(load_button)); save_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(SAVE_SAMPLE_STR); gtk_container_add(GTK_CONTAINER(save_button),label); gtk_box_pack_start(GTK_BOX(hbox2),GTK_WIDGET(save_button), TRUE,FALSE,0); gtk_signal_connect (GTK_OBJECT(save_button), "clicked", GTK_SIGNAL_FUNC(sampler_save_button_clicked),NULL); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(save_button)); gtk_box_pack_start(GTK_BOX(vbox),hbox2,FALSE,FALSE,5); } /* record button */ { record_button = (GtkToggleButton *)gtk_toggle_button_new(); label = gtk_label_new(RECORD_STR); gtk_container_add(GTK_CONTAINER(record_button),label); gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(record_button), FALSE,FALSE,5); gtk_signal_connect (GTK_OBJECT(record_button), "clicked", GTK_SIGNAL_FUNC(sampler_record_button_clicked),NULL); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(record_button)); } /* sample start offset */ { hbox = (GtkWidget*)gtk_hbox_new(TRUE,0); gtk_widget_show(hbox); vbox2 = (GtkWidget*)gtk_vbox_new(FALSE,0); gtk_widget_show(vbox2); start_adj = (GtkAdjustment*) gtk_adjustment_new(0.0,0.0,DB_SAMPLER_DEFAULT_TIME,0.01,0.1,0.0); label = gtk_label_new("Start:"); gtk_box_pack_start(GTK_BOX(vbox2),label,FALSE,FALSE,5); gtk_widget_show(label); start_scale = (GtkWidget*) gtk_vscale_new(start_adj); gtk_scale_set_digits((GtkScale*)start_scale,2); gtk_box_pack_start(GTK_BOX(vbox2),(GtkWidget*)start_scale,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(start_adj), "value_changed", GTK_SIGNAL_FUNC(start_changed),NULL); gtk_widget_show(start_scale); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(vbox2),FALSE,FALSE,0); gtk_widget_set_usize(start_scale,30,100); } /* sample end offset */ { vbox2 = (GtkWidget*)gtk_vbox_new(FALSE,0); gtk_widget_show(vbox2); end_adj = (GtkAdjustment*) gtk_adjustment_new(DB_SAMPLER_DEFAULT_TIME,0.0,DB_SAMPLER_DEFAULT_TIME,0.01,0.1,0.0); label = gtk_label_new("End:"); gtk_box_pack_start(GTK_BOX(vbox2),label,FALSE,FALSE,5); gtk_widget_show(label); end_scale = (GtkWidget*) gtk_vscale_new(end_adj); gtk_scale_set_digits((GtkScale*)end_scale,2); gtk_box_pack_start(GTK_BOX(vbox2),(GtkWidget*)end_scale,FALSE,FALSE,0); gtk_signal_connect (GTK_OBJECT(end_adj), "value_changed", GTK_SIGNAL_FUNC(end_changed),NULL); gtk_widget_show(end_scale); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(vbox2),FALSE,FALSE,0); gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(hbox),FALSE,FALSE,0); gtk_widget_set_usize(end_scale,30,100); } /* add channel selector for copy functionality */ { /* copy button */ { copy_button = (GtkButton *)gtk_button_new(); label = gtk_label_new(COPY_SAMPLE_STR); gtk_container_add(GTK_CONTAINER(copy_button),label); gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(copy_button), FALSE,FALSE,5); gtk_signal_connect (GTK_OBJECT(copy_button), "clicked", GTK_SIGNAL_FUNC(sampler_copy_button_clicked),NULL); gtk_widget_show(label); gtk_widget_show(GTK_WIDGET(copy_button)); } /* add channel selector */ { /* make label for channel selection */ copy_option_menu = gtk_option_menu_new(); menu = make_sampler_channel_menu(copy_channel_menu_select); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (copy_option_menu), menu); gtk_box_pack_start (GTK_BOX (vbox), copy_option_menu, FALSE, FALSE, 0); gtk_widget_show (copy_option_menu); } } update_sampler(NULL); update_sample_sliders(NULL); return vbox; } DBMix-0.9.8/dbmixer/save_prefs.h0000644000076400007640000000237107346372415012142 /* DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 2000, 2001 Simon Mark Werner DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NAME_LENGTH 128 #define FILENAME_LENGTH 128 #define STR_LEN 128 #define PREF_FILENAME "/.dbmixer" int read_js_settings( void ); int read_settings( void ); void write_settings( void ); int read_js_settings( void ); /* Read ~./joystick settings */ DBMix-0.9.8/dbmixer/exmixer.h0000644000076400007640000001333007346372415011463 /* DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 2000, 2001 Simon Mark Werner DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define MAX_DEV 2 /* Change MAX_DEV to the number of devices to use */ #define MAX_AXES 4 /* Maximum number of axis to use per device */ #define MAX_BUT 4 /* Maximum number of buttons to use per device */ #define NAME_LENGTH 128 #define FILENAME_LENGTH 128 #define STR_LEN 128 #define PRN(i) printf("%d. Got here!\n",i); /* Aliases to make things a look tidier */ #define N_AXES emix[dev_id].dev->num_axes #define N_BUT emix[dev_id].dev->num_buttons #define D_NAME emix[dev_id].dev->name #define D_FILENAME emix[dev_id].dev->filename #define D_ENABLED emix[dev_id].dev->enabled #define D_FD emix[dev_id].dev->fd #define D_GTAG emix[dev_id].dev->g_tag #define D_DEV_FRAME emix[dev_id].dev->device_frame #define D_TABLE emix[dev_id].dev->table #define D_CB_ENABLED emix[dev_id].dev->cb_enabled #define D_ENTRY emix[dev_id].dev->dev_entry #define D_COMBO emix[dev_id].dev->dev_combo #define A_VAL emix[dev_id].axis[axis_id].val #define A_MIN emix[dev_id].axis[axis_id].min #define A_CEN emix[dev_id].axis[axis_id].center #define A_MAX emix[dev_id].axis[axis_id].max #define A_FLIP emix[dev_id].axis[axis_id].flip #define A_ASSIGN emix[dev_id].axis[axis_id].assigned #define A_CHAN emix[dev_id].axis[axis_id].channel #define A_ASSIGN_ENT emix[dev_id].axis[axis_id].assign_entry #define A_ASSIGN_CMB emix[dev_id].axis[axis_id].assign_combo #define A_CHAN_ENT emix[dev_id].axis[axis_id].chan_entry #define A_CHAN_CMB emix[dev_id].axis[axis_id].chan_combo #define B_ASSIGN emix[dev_id].button[but_id].assigned #define B_CHAN emix[dev_id].button[but_id].channel #define B_VAL emix[dev_id].button[but_id].val #define B_PRESSED emix[dev_id].button[but_id].pressed #define B_ASSIGN_ENT emix[dev_id].button[but_id].assign_entry #define B_ASSIGN_CMB emix[dev_id].button[but_id].assign_combo #define B_CHAN_ENT emix[dev_id].button[but_id].chan_entry #define B_CHAN_CMB emix[dev_id].button[but_id].chan_combo /* Axis controls */ #define EM_A_NULL 0 #define EM_A_PITCH 1 #define EM_A_VOLUME 2 #define EM_A_CUE_VOLUME 3 #define EM_A_MAIN_VOLUME 4 #define EM_A_CROSS_FADE 5 #define EM_A_FADE_SPEED 6 #define EM_A_BALANCE 7 /* Button controls */ #define EM_B_NULL 0 #define EM_B_PAUSE 1 #define EM_B_UNPAUSE 2 #define EM_B_PLAY 3 #define EM_B_STOP 4 #define EM_B_EJECT 5 #define EM_B_REWIND 6 #define EM_B_FAST_FORWARD 7 #define EM_B_NEXT 8 #define EM_B_PREV 9 #define EM_B_PUNCH_LEFT 10 #define EM_B_PUNCH_RIGHT 11 #define EM_B_CUE 12 #define EM_B_MUTE 13 typedef struct js_device_s { int fd; /* not initialized */ char num_axes; char num_buttons; int version; char name[NAME_LENGTH]; char filename[FILENAME_LENGTH]; int enabled; /* Flag to enable the current exmixer */ gint g_tag; /* Descriptor returned by gtk_input_add() */ /* Widgets used for preferences window */ GtkWidget *device_frame; GtkWidget *table; GtkWidget *cb_enabled; GtkWidget *dev_combo; GtkWidget *dev_entry; } js_device; typedef struct js_axis_s { int min; /* Minimum axis value */ int center; /* Center axis value */ int max; /* Maximum axis value */ int flip; /* Is the axis reversed? */ int assigned; /* To which Adjustment is this axis assigned? */ int channel; /* To which channel is it assigned? */ int val; /* is the button currently pressed */ /* Widgets used for preferences window */ GtkWidget *assign_combo; GtkWidget *assign_entry; GtkWidget *chan_combo; GtkWidget *chan_entry; } js_axis; typedef struct js_button_s { // int __bufa[3]; /* Just to remove a bug :-) */ int assigned; /* To which scroll type is this axis assigned? */ int channel; /* To which channel is it assigned? */ int val; /* The current value of the axis */ int pressed; /* Used to check the state of the button */ // int __bufb[3]; /* Just to remove a bug :-) */ /* Widgets used for preferences window */ GtkWidget *assign_combo; GtkWidget *assign_entry; GtkWidget *chan_combo; GtkWidget *chan_entry; } js_button; struct ext_mixer { js_device *dev; js_axis *axis; js_button *button; } emix[MAX_DEV]; void exmixer_start( void ); /* Start the exmixer */ void exmixer_stop( void ); /* Stop the exmixer */ void exmixer_clear( void ); /* Create and clear all the exmixer settings */ void exmixer_start_device( int ); /* Start an exmixer device */ void exmixer_disable_device( int ); /* Disable an exmixer device */ void set_calibration( int ); /* True passed if we use on-the-fly calibration */ void print_js_settings( int ); /* Print out the joystick details to screen (only works in DBMIX_DEBUG mode) */ DBMix-0.9.8/dbmixer/exmixer_prefs.h0000644000076400007640000000203307346372415012660 /* DB Mixer ======== Description: interface controller for an external mixer to work with the DBMix system. Copyright (c) 2000, 2001 Simon Mark Werner DBMix Author: Robert Michael S Dean exmixer Author: Simon Mark Werner Version: 1.0 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. */ void start_exmixer_config (GtkWidget *); DBMix-0.9.8/dbmixer/debug.h0000644000076400007640000000222207346372415011066 /* Debug functions. Author: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ #ifdef __cplusplus extern "C" { #endif void Error(const char* fmt, ...); void Debug(const char *fmt, ...); int Check_Debug(); #ifdef __cplusplus } #endif DBMix-0.9.8/dbmixer/dbmsg_test.c0000644000076400007640000001364707346372415012143 /* DB Mixer ======== Description: a DJ Mixer style GUI interface to the DBMix system. Copyright (c) 1999, 2000 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbmixer.h" #include int debug_level; GtkWidget* window; int shmid, sysshmid; dbfsd_data * sysdata; local_channel * local_channels; int channel_index; int msg_q_id; extern int standalone_flag; GtkWidget * opt; void test_channel_menu_select(GtkWidget *w, gpointer * data) { Debug("bonk %d",data); channel_index = (int)data; msg_q_id = local_channels[channel_index].msg_q_id; } GtkWidget* test_make_channel_menu() { GtkWidget * menu; GtkWidget * item; gint i; menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { item = make_menu_item (local_channels[i].channel_name, GTK_SIGNAL_FUNC(test_channel_menu_select), (gpointer *)i); gtk_menu_append (GTK_MENU (menu), item); } return menu; } void refresh_menu() { GtkWidget * tempwidget; tempwidget = gtk_option_menu_get_menu(GTK_OPTION_MENU(opt)); gtk_option_menu_remove_menu(GTK_OPTION_MENU(opt)); tempwidget = test_make_channel_menu(); gtk_menu_set_active(GTK_MENU(tempwidget), channel_index); gtk_option_menu_set_menu(GTK_OPTION_MENU(opt),tempwidget); } void button_clicked(GtkWidget *w, gint * data) { dbfsd_msg msg; Debug("button clicked %d",data); if ((int)data == DBMSG_NONE) { refresh_menu(); return; } msg.msg_type = (int)data; switch ((int)data) { case DBMSG_REWIND: case DBMSG_FFORWARD: msg.data = 5; break; default: break; } if(msgsnd(msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { Debug("dbmsg_text: Message sent."); } else { Error("dbmsg_test: Message failure."); } } void test_make_button(int value, char * str, GtkWidget * box) { GtkWidget * button; GtkWidget * label; button = (GtkWidget *)gtk_button_new(); label = gtk_label_new(str); gtk_container_add(GTK_CONTAINER(button),label); gtk_box_pack_start(GTK_BOX(box),GTK_WIDGET(button),TRUE,TRUE,5); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(button_clicked),(gpointer *)value); gtk_widget_show(label); gtk_widget_show(button); } void dbmsg_test_init() { GtkWidget * main_box; GtkWidget * menu; GtkWidget * vbox; GtkWidget * selector_box; GtkWidget * row_box1; GtkWidget * row_box2; GtkWidget * label; GtkWidget * separator; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC(dbmixer_exit), NULL); gtk_widget_realize(window); main_box = gtk_hbox_new(FALSE,5); gtk_widget_show(main_box); vbox = gtk_vbox_new(FALSE,5); gtk_widget_show(vbox); selector_box = gtk_hbox_new(FALSE,5); gtk_widget_show(selector_box); row_box1 = gtk_hbox_new(FALSE,5); gtk_widget_show(row_box1); row_box2 = gtk_hbox_new(FALSE,5); gtk_widget_show(row_box2); gtk_window_set_title (GTK_WINDOW (window), "DBMix IPC Message Test Program"); label = (GtkWidget *) gtk_label_new("Channel:"); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(selector_box),label,FALSE,FALSE,10); opt = gtk_option_menu_new(); menu = test_make_channel_menu(); gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu); gtk_box_pack_start (GTK_BOX (selector_box), opt, FALSE, FALSE, 5); gtk_widget_show (opt); test_make_button(DBMSG_NONE,"Update Channels",selector_box); test_make_button(DBMSG_PAUSE,"PAUSE",row_box1); test_make_button(DBMSG_UNPAUSE,"UNPAUSE",row_box1); test_make_button(DBMSG_PLAY,"PLAY",row_box1); test_make_button(DBMSG_STOP,"STOP",row_box1); test_make_button(DBMSG_EJECT,"EJECT",row_box1); test_make_button(DBMSG_REWIND,"REW",row_box2); test_make_button(DBMSG_FFORWARD,"FFWD",row_box2); test_make_button(DBMSG_PREV,"PREV",row_box2); test_make_button(DBMSG_NEXT,"NEXT",row_box2); gtk_box_pack_start(GTK_BOX(vbox),selector_box,FALSE,FALSE,0); separator = gtk_hseparator_new(); gtk_widget_show(separator); gtk_box_pack_start(GTK_BOX(vbox),separator,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),row_box1,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),row_box2,FALSE,FALSE,0); gtk_box_pack_start(GTK_BOX(main_box),vbox,FALSE,FALSE,0); /* gtk_box_pack_start (GTK_BOX (main_box), label, FALSE, FALSE, 10); */ gtk_container_add(GTK_CONTAINER(window),main_box); gtk_widget_show(window); } static gint standalone_cleanup(GtkWidget* window, GdkEventAny* e, gpointer data) { Debug("Got delete_event... calling cleanup()..."); cleanup(); return TRUE; } int main( int argc, char *argv[] ) { debug_level = 0; channel_index = 0; standalone_flag = 1; #ifdef DBMIX_DEBUG debug_level = 1; printf("Debugging is on.\n"); #else debug_level = 0; #endif gtk_init(&argc, &argv); Channel_Init(); msg_q_id = local_channels[0].msg_q_id; dbmsg_test_init(); gtk_signal_connect(GTK_OBJECT(window),"delete_event", GTK_SIGNAL_FUNC(standalone_cleanup),NULL); gtk_main(); return(0); } DBMix-0.9.8/dbplaylist/0000777000076400007640000000000007436306703010427 5DBMix-0.9.8/dbplaylist/Makefile.in0000664000076400007640000002240107436306703012411 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ AWK = @AWK@ CC = @CC@ DBMIX_DEBUG = @DBMIX_DEBUG@ DLLTOOL = @DLLTOOL@ EXMIXER_FLAGS = @EXMIXER_FLAGS@ GENERAL_PLUGIN_DIR = @GENERAL_PLUGIN_DIR@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_CONFIG = @GLIB_CONFIG@ GLIB_LIBS = @GLIB_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ VISUALIZATION_PLUGIN_DIR = @VISUALIZATION_PLUGIN_DIR@ XMMS_CFLAGS = @XMMS_CFLAGS@ XMMS_CONFIG = @XMMS_CONFIG@ XMMS_DATA_DIR = @XMMS_DATA_DIR@ XMMS_EFFECT_PLUGIN_DIR = @XMMS_EFFECT_PLUGIN_DIR@ XMMS_GENERAL_PLUGIN_DIR = @XMMS_GENERAL_PLUGIN_DIR@ XMMS_INPUT_PLUGIN_DIR = @XMMS_INPUT_PLUGIN_DIR@ XMMS_LIBS = @XMMS_LIBS@ XMMS_OUTPUT_PLUGIN_DIR = @XMMS_OUTPUT_PLUGIN_DIR@ XMMS_PLUGIN_DIR = @XMMS_PLUGIN_DIR@ XMMS_VERSION = @XMMS_VERSION@ XMMS_VISUALIZATION_PLUGIN_DIR = @XMMS_VISUALIZATION_PLUGIN_DIR@ LIBS = @GTK_LIBS@ -lxmms COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -I../include -D_REENTRANT @GTK_CFLAGS@ @DBMIX_DEBUG@ COMMON_SRC = dbplaylist.c debug.c playerctrl.c dbplaylist.h about.c CFLAGS = $(COMMON_CFLAGS) $(EXTRA_CFLAGS) bin_PROGRAMS = dbplaylist dbplaylist_SOURCES = $(COMMON_SRC) dbplaylist_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ dbplaylist_OBJECTS = dbplaylist.o debug.o playerctrl.o about.o dbplaylist_LDADD = $(LDADD) dbplaylist_DEPENDENCIES = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(dbplaylist_SOURCES) OBJECTS = $(dbplaylist_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps dbplaylist/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: dbplaylist: $(dbplaylist_OBJECTS) $(dbplaylist_DEPENDENCIES) @rm -f dbplaylist $(LINK) $(dbplaylist_LDFLAGS) $(dbplaylist_OBJECTS) $(dbplaylist_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = dbplaylist distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done about.o: about.c ../include/dbchannel.h ../include/dbsoundcard.h \ ../include/dbaudiolib.h dbplaylist.o: dbplaylist.c ../include/dbdebug.h ../include/dbchannel.h \ ../include/dbsoundcard.h ../include/dbaudiolib.h dbplaylist.h debug.o: debug.c ../include/dbdebug.h playerctrl.o: playerctrl.c ../include/dbdebug.h ../include/dbaudiolib.h \ ../include/dbchannel.h ../include/dbsoundcard.h dbplaylist.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: DBMix-0.9.8/dbplaylist/Makefile.am0000644000076400007640000000054107346372416012403 LIBS = @GTK_LIBS@ -lxmms COMMON_CFLAGS = -O2 -I$(top_builddir) -I$(top_srcdir) -I../include -D_REENTRANT @GTK_CFLAGS@ @DBMIX_DEBUG@ COMMON_SRC = dbplaylist.c debug.c playerctrl.c dbplaylist.h about.c CFLAGS = $(COMMON_CFLAGS) $(EXTRA_CFLAGS) bin_PROGRAMS = dbplaylist dbplaylist_SOURCES = $(COMMON_SRC) dbplaylist_LDFLAGS = @GTK_LIBS@ @DBMIX_DEBUG@ DBMix-0.9.8/dbplaylist/dbplaylist.c0000644000076400007640000011032307434057013012651 /* DB Playlist =========== Description: a independant playlist program used to cue songs on multiple xmms sessions. Copyright (c) 1999, 2000, 2001 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbplaylist.h" int debug_level; GtkWidget* window; int full_cue_flag = 0; int shmid, sysshmid; dbfsd_data * sysdata; local_channel * local_channels; int channel_index; int msg_q_id; GtkWidget * songlistbox; GtkWidget * file_selector; GtkWidget * player1_label, * player2_label; char * songlist_titles[] = {SONG_TITLE,PLAYER_TITLE}; gint drag_flag = 0; gint drag_row_src, drag_row_dest, drag_motion_last_row; gint cue_index = 0; gint selected_row = -1; GdkColor white,red,blue,green,black,orange,pink; GdkColormap * colormap; int shmid, sysshmid; dbfsd_data * sysdata; local_channel * local_channels; GtkTargetEntry drop_types[] = { {"text/plain", 0, DROP_PLAINTEXT}, {"text/uri-list", 0, DROP_URLENCODED}, {"STRING", 0, DROP_STRING} }; char * playlist_filename_extensions[] = { ".m3u", ".M3U", NULL }; player_id player1_id, player2_id, * last_player = NULL; int update_ok_flag = 1; unsigned int cue_must_be = 0; /***************************************************************/ /*************** Utility functions ********************/ /***************************************************************/ void print_data(gpointer data) { song_data * sd; sd = (song_data *) data; Debug("Song Data"); Debug("==================="); Debug("name: %s",sd->name); Debug("path: %s",sd->path); Debug("xmms: %d",sd->xmms_session_id); } static gint cleanup(GtkWidget* window, GdkEventAny* e, gpointer data) { Debug("Got delete_event... calling cleanup()..."); /* free shared memory */ /* detach channel memory segment */ if(shmdt(local_channels) == -1) { Error("DBMixer: could not detach channel memory segment."); /* return FAILURE; */ } /* detach system data memory segment */ if(shmdt(sysdata) == -1) { Error("DBMixer: could not detach system data memory segment."); /* return FAILURE; */ } gtk_widget_destroy(window); window = NULL; gtk_main_quit(); return TRUE; } /* cleanup function for when a row is removed from the list */ void destroy_data (gpointer data) { song_data * sd; if (data == NULL) return; sd = (song_data *) data; g_free(sd->name); g_free(sd->path); g_free(sd); } /* when dragging within the list, set_drag_highlight changes the backgournd color of the row the mouse is currently over, this way you can optically determine which row will recieve the drop */ void set_drag_highlight(GtkWidget * w, gint row) { GtkCList * list; list = (GtkCList *) w; gtk_clist_set_background(list,row,&green); gtk_clist_set_foreground(list,row,&black); } /* set_cue_highlight sets the colors for the row associted with the next song to be cued/played. */ void set_cue_highlight(GtkWidget * w) { GtkCList * list; list = (GtkCList *) w; gtk_clist_set_background(list,cue_index,&pink); gtk_clist_set_foreground(list,cue_index,&black); } /* clear_highlight restores a row to its original color scheme */ void clear_highlight(GtkWidget *w, gint row) { GtkCList * list; song_data * sd; list = (GtkCList *) w; gtk_clist_set_background(list,row,&white); sd = (song_data *) gtk_clist_get_row_data(list,row); if (sd == NULL) { return; } if (sd->played) { gtk_clist_set_foreground(list,row,&red); } else { gtk_clist_set_foreground(list,row,&black); } } /* swap_players - maintains alternating player sequnence from row */ void swap_players(GtkCList * list, int row) { gint player_toggle; song_data * sd, * sd2; FREEZE_LIST(list); /* change player for rest of list */ if (row == (list->rows - 1)) { if (row != 0) { sd = (song_data *) gtk_clist_get_row_data(list,row-1); sd2 = (song_data *) gtk_clist_get_row_data(list,row); if (sd->player) { sd2->player = 0; gtk_clist_set_text(list,row,1,PLAYER1_STR); } else { sd2->player = 1; gtk_clist_set_text(list,row,1,PLAYER2_STR); } } } else { if (row < 0) row = 0; sd2 = (song_data *) gtk_clist_get_row_data(list,row); if (sd2->player) { player_toggle = 0; } else { player_toggle = 1; } while (row < (list->rows -1)) { row++; sd = (song_data *) gtk_clist_get_row_data(list,row); /* determine which player to use */ if (player_toggle) { gtk_clist_set_text(list,row,1,PLAYER2_STR); sd->player = 1; player_toggle = 0; } else { gtk_clist_set_text(list,row,1,PLAYER1_STR); sd->player = 0; player_toggle = 1; } } } THAW_LIST(list); } /* set_cue_player - makes sure that the next cue player always stays the same */ void set_cue_player() { GtkCList * list; song_data * sd; list = (GtkCList *) songlistbox; if (list->rows == 0) return; sd = (song_data *) gtk_clist_get_row_data(list,cue_index); sd->player = cue_must_be; if (cue_must_be) { gtk_clist_set_text(list,cue_index,1,PLAYER2_STR); } else { gtk_clist_set_text(list,cue_index,1,PLAYER1_STR); } swap_players(list,cue_index); } /***************************************************************/ /*************** callback functions ********************/ /***************************************************************/ /* called when gtk detects the begining of a drag */ void drag_data_begin(GtkWidget * widget, GdkDragContext *dc, gpointer data) { GtkCList * list; list = (GtkCList *) widget; /* if there are no rows, there's no reason to drag */ if (list->rows == 0) return; /* set drag_flag so that other functions will know that we are dragging */ drag_flag = 1; /* remember row where the drag started */ drag_row_src = list->click_cell.row; drag_motion_last_row = drag_row_src -1; set_drag_highlight(widget,drag_motion_last_row); } /* called when the drag is over */ void drag_data_end(GtkWidget * widget, GdkDragContext *dc, gpointer data) { GtkCList * list; list = (GtkCList *) widget; if (list->rows == 0) return; /* clear the drag highlight bar since it is no longer needed */ if (drag_motion_last_row != -1) { clear_highlight(widget,drag_motion_last_row); } } /* drag_data_motion - the mouse moved during a drag */ void drag_data_motion(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint t, gpointer data) { GtkCList * list; gint row, column; /* if we are dragging */ if (drag_flag) { list = (GtkCList *) widget; if (list->rows == 0) return; /* freeze list to prevent flickering while clearing/setting highlights */ FREEZE_LIST(list); /* find row the mouse is currently over */ gtk_clist_get_selection_info(GTK_CLIST(songlistbox),x,y,&row,&column); row--; /* make sure the row is within range */ if (row == -1) row = 0; if ((row < 0) || (row > list->rows)) row = list->rows-1; /* remove last drag highlight */ clear_highlight(widget,drag_motion_last_row); /* restore the cue highlight if it was overdrawn by the drag bar */ if (drag_motion_last_row == cue_index) set_cue_highlight(widget); /* set location of new drag row */ set_drag_highlight(widget,row); /* remember this row */ drag_motion_last_row = row; THAW_LIST(list); } } /* drag_data_drop - a drag that began within the list widget has ended. As opposed to a drag from another application. */ gboolean drag_data_drop (GtkWidget *widget, GdkDragContext *dc, gint x, gint y, guint t, gpointer data) { gint row, column; GtkCList * list; /* if we are dragging */ if (drag_flag) { list = (GtkCList *) widget; /* if the aren't any rows in the list there's nothing to do */ if (list->rows == 0) return TRUE; /* freeze list as many list operations are going to occur */ FREEZE_LIST(list); drag_flag = 0; /* find out row where drop occured */ gtk_clist_get_selection_info(GTK_CLIST(songlistbox),x,y,&row,&column); clear_highlight(widget,drag_motion_last_row); clear_highlight(widget,cue_index); drag_motion_last_row = -1; /* make sure row is within range */ if (row > list->rows) { row = list->rows; } if (row > 0) { row--; } /* dragging is over, clear drag bar */ clear_highlight(widget,row); /* print_data(gtk_clist_get_row_data(list,drag_row_src)); */ /* print_data(gtk_clist_get_row_data(list,row)); */ /* move start row to drop location */ gtk_clist_row_move(GTK_CLIST(songlistbox),drag_row_src,row); /* if a song is moved from below the cue location to above it, move cue_index down one so that it's player does not change */ if ((row < cue_index) && (drag_row_src > cue_index) && (cue_index < (list->rows-1))) { cue_index++; } /* if a song is moved from above the cue location to below it, move the cue up one to keep it on the same song */ if ((row > cue_index) && (cue_index) && (drag_row_src < cue_index)) { cue_index--; } /* maintain cue order based on the cue_index */ set_cue_player(); set_cue_highlight(widget); THAW_LIST(list); /* return FALSE; */ } else { /* printf("drag is from OTHER window\n"); */ } return TRUE; } /* drag_stat_received - a drag that started in another application has been dropped in this application. */ void drag_data_received(GtkWidget * widget, GdkDragContext * context, gint x, gint y, GtkSelectionData * selection_data, guint info, guint time, gpointer user_data) { char * srcstr, * songname; gint row,column,append_flag,player_toggle; char * list_labels[2], * tempstr; GtkCList * list; song_data * sd; static gchar linkstr[1024]; static gchar templink[1024]; gint count; row = 0; column = 0; append_flag = 0; list = (GtkCList *) widget; gtk_clist_get_selection_info(GTK_CLIST(list),x,y,&row,&column); /* if a drag was in process within this application, exit */ if (drag_flag) { /* printf("**** same window\n"); */ drag_flag = 0; return; } FREEZE_LIST(list); clear_highlight(songlistbox,cue_index); /* clear drag highlight */ clear_highlight(widget,drag_motion_last_row); drag_motion_last_row = -1; if (row == 0) { append_flag = 1; } else { append_flag = 0; row--; } /* if the drop contained data, process it */ if (selection_data->data) { srcstr = strtok(selection_data->data,"\n\r"); /* step over "file" URL if it exists */ if (strncmp(srcstr,"file:",5) == 0) srcstr+=5; Debug("%s",srcstr); /* determine if file is a link */ if ((count = readlink(srcstr,linkstr,1024)) == -1) { /* file is not a link */ if (errno != EINVAL) { perror("error code on readlink: "); } /* get songname from link */ songname = srcstr + strlen(srcstr); while ((*songname != '/') && (songname > srcstr)) { songname--; } songname++; } else { /* process first file in drop list */ linkstr[count] = '\0'; tempstr = linkstr; /* find song name */ songname = linkstr + strlen(linkstr); while ((*songname != '/') && (songname > linkstr)) { songname--; } /* find path to link file */ tempstr = srcstr + strlen(srcstr); while ((*tempstr != '/') && (tempstr > linkstr)) { tempstr--; } /* is the path absolute? */ if (linkstr[0] != '/') { gchar c; /* remember value in tempstr */ c = *tempstr; *tempstr = '\0'; /* absolute path is path to link file + the path returned by readlink */ sprintf(templink,"%s/%s",srcstr,linkstr); /* replace stored byte */ srcstr = templink; *tempstr = c; } /* increment songname if necessary */ if (*songname == '/') { songname++; } } list_labels[0] = songname; /* create song data structure */ sd = (song_data *) g_malloc0(sizeof(song_data)); sd->name = g_strdup(songname); sd->path = g_strdup(srcstr); sd->xmms_session_id = -1; /* is this the first drop in an empty list? */ if (row == 0) { list_labels[1] = PLAYER1_STR; player_toggle = 1; sd->player = 0; } else { /* list has data, determine state based on drop row */ gtk_clist_get_text((GtkCList *)list,row-1,1,&tempstr); if (strcmp(tempstr,PLAYER1_STR) == 0) { list_labels[1] = PLAYER2_STR; player_toggle = 0; sd->player = 1; } else { list_labels[1] = PLAYER1_STR; player_toggle = 1; sd->player = 0; } } /* clear cue highlight if the drop occurred there */ if (row == cue_index) clear_highlight(widget,cue_index); /* if the drop is at the end of the list, append it */ if (append_flag) { row = gtk_clist_append((GtkCList *)list,list_labels); if ((cue_index == 0) && (list->rows == 1)) { set_cue_highlight(widget); } } else { /* drop is not at end of list, insert it */ gtk_clist_insert((GtkCList *)list,row,list_labels); if (row < cue_index) { cue_index++; } } gtk_clist_set_row_data_full((GtkCList *)list,row,sd,destroy_data); /* loop through remainder of list and add songs to playlist */ while ((srcstr = strtok(NULL,"\r\n")) != NULL) { row++; /* extract the songname from the full path */ songname = srcstr + strlen(srcstr); while ((*songname != '/') && (songname > srcstr)) { songname--; } songname++; /* step over "file" URL */ if (strncmp(srcstr,"file:",5) == 0) srcstr+=5; /* allocate song data strucutre */ sd = (song_data *) g_malloc0(sizeof(song_data)); sd->name = g_strdup(songname); sd->path = g_strdup(srcstr); sd->xmms_session_id = -1; list_labels[0] = songname; /* determine which player to use */ if (player_toggle) { list_labels[1] = PLAYER2_STR; sd->player = 1; player_toggle = 0; } else { list_labels[1] = PLAYER1_STR; sd->player = 0; player_toggle = 1; } if (row == cue_index) clear_highlight(widget,cue_index); if (row < cue_index) { cue_index++; } /* add song to list */ if (append_flag) { row = gtk_clist_append((GtkCList *)list,list_labels); } else { gtk_clist_insert((GtkCList *)list,row,list_labels); } gtk_clist_set_row_data_full((GtkCList *)list,row,sd,destroy_data); } /* end while */ /* reorder players */ set_cue_player(); } set_cue_highlight(widget); THAW_LIST(list); } void select_row_callback(GtkWidget *widget, gint row,gint column, gpointer data) { Debug("select row callback"); } /* user selected the cue next song button */ void cue_next_song_clicked (GtkWidget *w, gchar *data) { setup_next_song(); } /* user selected a row, remember it */ void selection_made( GtkWidget *list, gint row, gint column, GdkEventButton *event, gpointer data ) { selected_row = row; return; } /* selection callback from selection menu for player 1 */ void player1_select(GtkWidget *w, gpointer * data) { player1_id.index = (gint) data; } /* callback from selection menu for player 2 */ void player2_select(GtkWidget *w, gpointer * data) { player2_id.index = (gint) data; } /* user wishes to use full cue mode */ void full_cue_button_clicked(GtkWidget *w, gchar * data) { full_cue_flag = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); } /* delete button was clicked, remove selected row from list */ void delete_button_clicked(GtkWidget *w, gchar * data) { if (selected_row == -1) return; clear_highlight(songlistbox,cue_index); if (selected_row < cue_index) { cue_index--; } if (selected_row >= cue_index) set_cue_player(); if (cue_index < 0) cue_index = 0; gtk_clist_remove((GtkCList *)songlistbox,selected_row); set_cue_player(); set_cue_highlight(songlistbox); } /* swaps the players of all songs beneath the currently selected row */ void cue_swap_button_clicked(GtkWidget *w, gchar * data) { gint row, player_toggle; song_data * sd; GtkCList * list; /* verify that a selection occured */ if (selected_row == -1) return; list = (GtkCList *) songlistbox; row = selected_row; sd = (song_data *) gtk_clist_get_row_data(list,row); /* determine what the new player should be */ if (sd->player) { player_toggle = 0; } else { player_toggle = 1; } if (row == cue_index) cue_must_be = player_toggle; /* step through list and swap players */ while (row < (list->rows)) { sd = (song_data *) gtk_clist_get_row_data(list,row); /* determine which player to use */ if (player_toggle) { gtk_clist_set_text(list,row,1,PLAYER2_STR); sd->player = 1; player_toggle = 0; } else { gtk_clist_set_text(list,row,1,PLAYER1_STR); sd->player = 0; player_toggle = 1; } row++; } set_cue_player(); } /* moves the cue hightlight bar up one row */ void cue_up_button_clicked(GtkWidget *w, gchar * data) { if (cue_index == 0) return; clear_highlight(songlistbox,cue_index); cue_index--; set_cue_player(); set_cue_highlight(songlistbox); } /* moves the cue highlight bar down one row */ void cue_down_button_clicked(GtkWidget *w, gchar * data) { GtkCList * list; list = (GtkCList *) songlistbox; if ((list->rows -1) > cue_index) { clear_highlight(songlistbox,cue_index); cue_index++; set_cue_player(); set_cue_highlight(songlistbox); } } /* load a playlist from a file */ void load_playlist(GtkFileSelection *selector, gpointer user_data) { char * path; int fid; int i; int playlist_flag; char filename[1024]; char * songname, * temppntr, * temppntr2; int loop_flag; int read_string_flag; int error; int len; int row; song_data * sd; GtkCList * list; char * list_labels[2]; gint player_toggle; loop_flag = 1; row = 0; fid = 0; list = (GtkCList *) songlistbox; playlist_flag = 0; path = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); /* check filename to see if it is a playlist or a file */ /* is it a directory? */ i = 0; while ((temppntr = playlist_filename_extensions[i]) != NULL) { /* check extension */ if ((temppntr2 = strstr(path,temppntr))) { /* verify that the extension is at the end of the path name */ if (*((char *)(temppntr2 + strlen(temppntr))) == '\0') { Debug("found extension %s in path %s\n",temppntr,path); playlist_flag = 1; break; } } i++; } /* verify that the playlist file has a known extension - this is a cheap hack, but how else are you able to detect if the file is a playlist or not? */ if (!playlist_flag) { printf("\nERORR: selected file does not have a recognised playlist extension:\n"); i = 0 ; while ((temppntr = playlist_filename_extensions[i]) != NULL) { printf(" %s\n",temppntr); i++; } return; } gtk_clist_clear(list); row = 0; player_toggle = 0; /* open path */ path = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); fid = open(path,O_RDONLY); FREEZE_LIST(list); /* read in playlist */ while (loop_flag) { /* read in a song path */ read_string_flag = 1; while (read_string_flag) { temppntr = filename; error = read(fid,temppntr,1); len = 0; /* read in line */ while ((error > 0) && (*temppntr != '\n')) { temppntr++; error = read(fid,temppntr,1); len++; } /* exit if there is an error */ if (error == -1) { loop_flag = 0; break; } filename[len] = '\0'; /* check to see if this string is valid, if not, reread */ if (strstr(filename,XMMS_EXT_STR) == NULL) { read_string_flag = 0; } } /* check for EOF */ if (len == 0) { loop_flag = 0; break; } else { /* extract song name from song path */ songname = filename + strlen(filename); while ((*songname != '/') && (songname > filename)) { songname--; } songname++; /* create song_data structure */ sd = (song_data *) g_malloc0(sizeof(song_data)); sd->name = g_strdup(songname); sd->path = g_strdup(filename); sd->xmms_session_id = -1; list_labels[0] = songname; /* determine proper player for song */ if (player_toggle) { list_labels[1] = PLAYER2_STR; sd->player = 1; player_toggle = 0; } else { list_labels[1] = PLAYER1_STR; sd->player = 0; player_toggle = 1; } /* add song to list */ gtk_clist_insert((GtkCList *)list,row,list_labels); /* attach song_data to the song's row */ gtk_clist_set_row_data_full((GtkCList *)list,row,sd,destroy_data); row++; } } set_cue_highlight(songlistbox); THAW_LIST(list); } /* user clicked the load playlist button */ void load_button_clicked(GtkWidget *w, gchar * data) { file_selector = gtk_file_selection_new("Please select a file for editing."); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (load_playlist), NULL); /* ensure that the dialog box is destroyed when the user clicks a button. */ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); /* display that dialog */ gtk_widget_show (file_selector); } /* write the playlist to a playlist file */ void save_file(GtkFileSelection *selector, gpointer user_data) { char * path; int i; GtkCList * list; song_data * sd; FILE * outfile; /* get filename */ path = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); /* open file */ outfile = fopen(path,"w"); /* verify that open succeeded */ if (outfile == NULL) { perror("ERROR: could not open playlist file for writing: \n"); return; } list = (GtkCList*) songlistbox; FREEZE_LIST(list); /* write list to file */ for (i = 0; i < list->rows; i++) { sd = gtk_clist_get_row_data(list,i); fprintf(outfile,"%s\n",sd->path); } fclose(outfile); THAW_LIST(list); } void save_button_clicked(GtkWidget *w, gchar * data) { file_selector = gtk_file_selection_new("Please select a file for editing."); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (save_file), NULL); /* ensure that the dialog box is destroyed when the user clicks a button. */ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer) file_selector); /* display that dialog */ gtk_widget_show (file_selector); } void handle_motion(GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { int x,y; x = event->x; y = event->y; /* Debug("handle_motion x %ld y %ld\n",x,y); */ } /***************************************************************/ /*************** widget creation functions ****************/ /***************************************************************/ /* update_players - check to see if the dbmix clients have changed, and if so, update the player selection menus */ int update_players(gpointer * data) { gint i; GtkWidget * menu, * item; /* only update if the menu is not currently open - this causes a inconsistent state between the data shown to the user and the data that actually exists */ if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(gtk_option_menu_get_menu(GTK_OPTION_MENU(player1_id.opt))))) { gtk_option_menu_remove_menu(GTK_OPTION_MENU(player1_id.opt)); /* player1_id.opt = gtk_option_menu_new(); */ menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { item = gtk_menu_item_new_with_label (local_channels[i].channel_name); gtk_signal_connect (GTK_OBJECT (item), "activate", player1_select,(gpointer) i); gtk_widget_show (item); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu), player1_id.index); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (player1_id.opt), menu); gtk_widget_show (player1_id.opt); } if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(gtk_option_menu_get_menu(GTK_OPTION_MENU(player2_id.opt))))) { menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { item = gtk_menu_item_new_with_label (local_channels[i].channel_name); gtk_signal_connect (GTK_OBJECT (item), "activate", player2_select,(gpointer) i); gtk_widget_show (item); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu), player2_id.index); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (player2_id.opt), menu); gtk_widget_show (player2_id.opt); } return update_ok_flag; } /* gtk application init */ void dbplaylist_init() { gint i; GtkWidget *vbox, *hbox; GtkWidget *channel_box; GtkWidget *scrolled_window; GtkWidget *button; GtkWidget * menu; GtkWidget * item; GtkWidget * label; player1_id.index = 0; player2_id.index = 1; window=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_usize(GTK_WIDGET(window), 350, 400); gtk_window_set_title(GTK_WINDOW(window), "DBMix Playlist"); gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(cleanup), NULL); vbox=gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); gtk_widget_show(vbox); /* create channel selectors */ { channel_box = gtk_hbox_new(FALSE,0); gtk_widget_show(channel_box); gtk_container_set_border_width(GTK_CONTAINER(channel_box),0); player1_label = gtk_label_new(PLAYER1_STR); gtk_box_pack_start(GTK_BOX(channel_box),player1_label,TRUE,TRUE,5); gtk_widget_show(player1_label); player1_id.opt = gtk_option_menu_new(); menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { item = gtk_menu_item_new_with_label (local_channels[i].channel_name); gtk_signal_connect (GTK_OBJECT (item), "activate", player1_select,(gpointer) i); gtk_widget_show (item); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu), player1_id.index); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (player1_id.opt), menu); gtk_widget_show (player1_id.opt); gtk_box_pack_start (GTK_BOX (channel_box), player1_id.opt, TRUE, TRUE, 0); player2_label = gtk_label_new(PLAYER2_STR); gtk_box_pack_start(GTK_BOX(channel_box),player2_label,TRUE,TRUE,5); gtk_widget_show(player2_label); player2_id.opt = gtk_option_menu_new(); menu = gtk_menu_new(); /* add options to channel selector */ for(i = 0; i < sysdata->num_channels;i++) { item = gtk_menu_item_new_with_label (local_channels[i].channel_name); gtk_signal_connect (GTK_OBJECT (item), "activate", player1_select,(gpointer) i); gtk_widget_show (item); gtk_menu_append (GTK_MENU (menu), item); } gtk_menu_set_active(GTK_MENU(menu), player2_id.index); /* add option list to channel selector */ gtk_option_menu_set_menu (GTK_OPTION_MENU (player2_id.opt), menu); gtk_widget_show (player2_id.opt); gtk_box_pack_start (GTK_BOX (channel_box), player2_id.opt, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox),channel_box,FALSE,FALSE,0); } /* create */ { hbox = gtk_hbox_new(TRUE,0); /* cue flag button */ button = gtk_toggle_button_new(); label = gtk_label_new(FULL_CUE_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_widget_show(hbox); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(full_cue_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); /* load list button */ button = gtk_button_new(); label = gtk_label_new(LOAD_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(load_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); /* save list button */ button = gtk_button_new(); label = gtk_label_new(SAVE_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(save_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } /* create list manipulation buttons */ { hbox = gtk_hbox_new(TRUE,0); gtk_widget_show(hbox); /* delete button */ button = gtk_button_new(); label = gtk_label_new(DELETE_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(delete_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); /* cue swap button */ button = gtk_button_new(); label = gtk_label_new(CUE_SWAP_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cue_swap_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); /* cue up button */ button = gtk_button_new(); label = gtk_label_new(CUE_UP_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cue_up_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); /* cue down button */ button = gtk_button_new(); label = gtk_label_new(CUE_DOWN_STR); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_show(label); gtk_widget_show(button); gtk_signal_connect (GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(cue_down_button_clicked),NULL); gtk_box_pack_start(GTK_BOX(hbox),GTK_WIDGET(button),TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); } /* add cue next song button */ { button = gtk_button_new_with_label("Cue Next Song"); gtk_widget_show(button); gtk_signal_connect(GTK_OBJECT(button),"clicked",GTK_SIGNAL_FUNC(cue_next_song_clicked),NULL); gtk_box_pack_start(GTK_BOX(vbox),button,FALSE,FALSE,0); } /* create listbox */ { scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0); gtk_widget_show (scrolled_window); songlistbox = gtk_clist_new_with_titles(NUM_SONGLIST_COLUMNS, songlist_titles); for (i = 0; i < NUM_SONGLIST_COLUMNS; i++) { gtk_clist_set_column_justification(GTK_CLIST(songlistbox),i,GTK_JUSTIFY_LEFT); } gtk_signal_connect(GTK_OBJECT(songlistbox), "select_row", GTK_SIGNAL_FUNC(selection_made), NULL); gtk_clist_set_shadow_type (GTK_CLIST(songlistbox), GTK_SHADOW_OUT); gtk_clist_set_column_width (GTK_CLIST(songlistbox), 0, 250); /* gtk_clist_set_column_width(GTK_CLIST(songlistbox),1,50); */ gtk_container_add(GTK_CONTAINER(scrolled_window), songlistbox); gtk_widget_show(songlistbox); hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); gtk_widget_show(hbox); gtk_signal_connect(GTK_OBJECT(songlistbox), "row_move", GTK_SIGNAL_FUNC(select_row_callback), NULL); /* set up drag from other programs */ gtk_drag_dest_set(songlistbox, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, drop_types, 3, GDK_ACTION_COPY | GDK_ACTION_MOVE); gtk_signal_connect(GTK_OBJECT(songlistbox), "drag_data_received", GTK_SIGNAL_FUNC(drag_data_received), NULL); /* set up drag from this program */ gtk_drag_source_set(songlistbox, GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK, drop_types, 3, GDK_ACTION_COPY | GDK_ACTION_MOVE); gtk_signal_connect(GTK_OBJECT(songlistbox), "drag_begin", GTK_SIGNAL_FUNC(drag_data_begin), NULL); gtk_signal_connect(GTK_OBJECT(songlistbox), "drag_end", GTK_SIGNAL_FUNC(drag_data_end), NULL); gtk_signal_connect(GTK_OBJECT(songlistbox), "drag_drop", GTK_SIGNAL_FUNC(drag_data_drop), NULL); gtk_signal_connect(GTK_OBJECT(songlistbox), "drag_motion", GTK_SIGNAL_FUNC(drag_data_motion), NULL); } gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show(window); /* setup timeouts */ gtk_timeout_add(UPDATE_GUI_TIMEOUT,(GtkFunction)update_players,NULL); } /* color_init - get gdk_color structures for major colors */ void color_init() { colormap = gtk_widget_get_colormap(songlistbox); gdk_color_parse("white",&white); gdk_colormap_alloc_color(colormap,&white,FALSE,TRUE); gdk_color_parse("red",&red); gdk_colormap_alloc_color(colormap,&red,FALSE,TRUE); gdk_color_parse("blue",&blue); gdk_colormap_alloc_color(colormap,&blue,FALSE,TRUE); gdk_color_parse("green",&green); gdk_colormap_alloc_color(colormap,&green,FALSE,TRUE); gdk_color_parse("black",&black); gdk_colormap_alloc_color(colormap,&black,FALSE,TRUE); gdk_color_parse("pink",&pink); gdk_colormap_alloc_color(colormap,&pink,FALSE,TRUE); gdk_color_parse("orange",&orange); gdk_colormap_alloc_color(colormap,&orange,FALSE,TRUE); } int main( int argc, char *argv[] ) { debug_level = 0; channel_index = 0; songlistbox = NULL; #ifdef DBMIX_DEBUG debug_level = 1; printf("\nDebugging is on.\n"); #else debug_level = 0; #endif /* get system data */ sysshmid = shmget((key_t) DB_SYSTEM_SM_KEY, sizeof(dbfsd_data), 0666); if(sysshmid == -1) { Error("DBMixer ERROR: could not create shared memory for system data."); return FAILURE; } sysdata = shmat(sysshmid,(void *)0, 0); if((int)sysdata == -1) { Error("DBMixer ERROR: error attaching system data shared memory."); return FAILURE; } /* verify that there is a free channel into dbfsd */ if(sysdata->free_channel_index == -1) { /* ch = NULL; */ if(shmdt(sysdata) == -1) { Error("DBAudio_Init: could not detach system data memory segment."); return FAILURE; } errno = ERROR_NO_FREE_CHANNELS; return FAILURE; } /* retrieve the channel memory id */ shmid = shmget((key_t) DB_CHANNELS_SM_KEY, (sysdata->num_channels * sizeof(local_channel)), 0666); if(shmid == -1) { Error("DBMixer ERROR: error creating shared memory."); return FAILURE; } else { Debug("DBMixer: shmid is: %d ",shmid); } /* attach the channel memory segment*/ local_channels = (local_channel *) shmat(shmid,(void *)0, 0); if((int)local_channels == -1) { Error("DBMixer ERROR: error attaching shared memory."); return FAILURE; } gtk_init(&argc, &argv); dbplaylist_init(); color_init(); gtk_main(); return(0); } DBMix-0.9.8/dbplaylist/debug.c0000644000076400007640000000311607346372416011602 /* implementation of debug.h AUthor: Bob Dean copyright (c) 1999 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include int debug_level; static char tempstr[1024]; /***************************************************************************/ /* Debug Functions */ /***************************************************************************/ void Error(const char*fmt, ...) { va_list args; va_start(args, fmt); vsprintf(tempstr,fmt,args); perror(tempstr); va_end(args); } void Debug ( const char *fmt, ...) { if(debug_level) { va_list args; va_start(args, fmt); fflush(stdout); /* fprintf(stdout,"dbfsd.c: "); */ vfprintf(stdout, fmt, args); fprintf(stdout,"\n"); fflush(stdout); va_end(args); } } int Check_Debug() { return debug_level; } DBMix-0.9.8/dbplaylist/playerctrl.c0000644000076400007640000001342107427426272012675 /* playerctrl.c =========== Description: functionality to control 3rd party audio players. Copyright (c) 1999, 2000, 2001 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dbplaylist.h" extern int debug_level; extern int full_cue_flag; extern GtkWidget * songlistbox; extern GtkWidget * player1_label; extern GtkWidget * player2_label; extern int cue_index; extern local_channel * local_channels; extern player_id player1_id, player2_id, * last_player; extern unsigned int cue_must_be; /*****************************************************************/ /*************** Song Handling Functions ********************/ /***************************************************************/ /* this function borrowed from GTK API reference on GtkDialog */ void db_message_box(gchar *message) { GtkWidget *dialog, *label, *okay_button; /* create the widgets */ dialog = gtk_dialog_new(); label = gtk_label_new (message); okay_button = gtk_button_new_with_label("OK"); /* ensure that the dialog box is destroyed when the user clicks ok. */ gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), (gpointer)dialog); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), okay_button); /* add the label, and show everything we've added to the dialog. */ gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show_all (dialog); } /* function to sleep a thread for usec microseconds*/ void db_usleep(gint usec) { struct timeval tv; tv.tv_sec = usec / 1000000; usec -= tv.tv_sec * 1000000; tv.tv_usec = usec; select(0, NULL, NULL, NULL, &tv); } /* send_msg - send a message to a dbmix client application */ void send_msg(gint index, long int type, float data) { local_channel * ch; dbfsd_msg msg; ch = &(local_channels[index]); if(ch->msg_q_id == -1) return; msg.msg_type = type; msg.data = data; if(msgsnd(ch->msg_q_id, &msg,sizeof(dbfsd_msg) - sizeof(long int),IPC_NOWAIT) == 0) { } else { Error("dbmixer: Message failure sending to channel %d",index); } } /* setup_next_song - takes the song referenced by the cue highlight bar and sends it to a dbmix client */ void setup_next_song() { GtkCList * list; song_data * sd; player_id * player; gint pos; /* init variables */ list = (GtkCList *) songlistbox; sd = (song_data *) gtk_clist_get_row_data(list,cue_index); if (list->rows == 0) { Debug("list is empty. returning."); return; } /* if (last_player == &player1_id) */ /* { */ /* player = &player2_id; */ /* last_player = &player2_id; */ /* } */ /* else */ /* { */ /* player = &player1_id; */ /* last_player = &player1_id; */ /* } */ /* determine player for this row */ if (sd->player) { player = &player2_id; } else { player = &player1_id; } /* check to make sure player is free */ { /* make sure the xmms client is accepting messages */ if (!xmms_remote_is_running(player->index)) { Error("setup_next_song: could not find xmms remote! Is xmms running?"); return; } /* if full cue mode */ if (full_cue_flag) { /* check to see if player is still playing - and throw error if it is */ if (xmms_remote_is_playing(player->index)) { db_message_box("\nERROR: \n Attempted to cue song while player is still playing. \n"); return; } } /* don;t recue the last song in the list */ if ((cue_index == (list->rows -1)) && (sd->played)) { Debug("setup_next_song: song is last in list and has already been cued."); Debug(" Returning without setting up next song."); db_message_box("\nERROR: \n Last song in list has already been cued. \n"); return; } } /* cue up next song */ sd->played = TRUE; clear_highlight(songlistbox,cue_index); /* stop player */ if (full_cue_flag) { xmms_remote_stop(player->index); } /* send song to player */ xmms_remote_playlist_add_url_string(player->index,sd->path); /* make sure the song is the last in the player's list */ pos = xmms_remote_get_playlist_length(player->index); xmms_remote_set_playlist_pos(player->index,pos-1); /* if full cue mode, play and pause the next song so that it is ready to go */ if (full_cue_flag) { xmms_remote_play(player->index); usleep(1000); send_msg(player->index,DBMSG_MUTE,0); send_msg(player->index,DBMSG_PAUSE,0); } /* update player state */ if (cue_index < (list->rows-1)) { cue_index++; if (cue_must_be) { cue_must_be = 0; } else { cue_must_be = 1; } } set_cue_highlight(songlistbox); } DBMix-0.9.8/dbplaylist/dbplaylist.h0000644000076400007640000000412007433601425012654 /* Copyright (c) 1999, 2000, 2001 Robert Michael S Dean Author: Robert Michael S Dean Version: 1.0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse 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. */ #ifndef _DBPLAYLIST_H_ #define _DBPLAYLIST_H_ #define NUM_SONGLIST_COLUMNS 2 #define XMMS_EXT_STR "#EXT" #define SONG_TITLE "Song Name" #define PLAYER_TITLE "Player" #define PLAYER1_STR "Player 1" #define PLAYER2_STR "Player 2" #define FULL_CUE_STR "Full Cue" #define LOAD_STR "Load List" #define SAVE_STR "Save List" #define DELETE_STR "Delete" #define CUE_UP_STR "Cue /\\" #define CUE_DOWN_STR "Cue \\/" #define CUE_SWAP_STR "Swap Plyr" #define PLAYER_UNDERLINE_SET "________" #define PLAYER_UNDERLINE_CLEAR "" #define UPDATE_GUI_TIMEOUT 1000 #define FREEZE_LIST(a) gtk_clist_freeze((GtkCList *)a); #define THAW_LIST(a) gtk_clist_thaw((GtkCList *)a); enum { DROP_STRING, DROP_PLAINTEXT, DROP_URLENCODED }; typedef struct player_s { gint index; GtkWidget * opt; }player_id; typedef struct songdata_s { char * name; char * path; gint played; gint player; gint xmms_session_id; } song_data; void set_drag_highlight(GtkWidget * w, gint row); void set_cue_highlight(GtkWidget * w); void clear_highlight(GtkWidget *w, gint row); int update_players(gpointer * data); void setup_next_song(); #endif /* _DBPLAYLIST_H_*/ DBMix-0.9.8/dbplaylist/about.c0000644000076400007640000000477407346372416011641 /* Original code: (C) 1998-1999 Mikael Alm, Olle Hallnas, Thomas Nillson and 4Front Technologies Modifications by Robert Michael S Dean, (c) 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licensse as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include static GtkWidget *dialog, *button, *label; void dbmixer_about_close(GtkWidget * w, gpointer data) { gtk_widget_destroy(dialog); } void dbmixer_about(void) { char tempstr[1024]; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), "About DBMixer"); gtk_container_border_width(GTK_CONTAINER(dialog), 5); sprintf(tempstr, "DBPlaylist %s\n\n \ All Components of DBMix %s\n\n This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation; either version 2 of the License, or\n\ (at your option) any later version.\n\ \n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n\ You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n\ USA.",DBMIX_VERSION,DBMIX_COPYRIGHT); label = gtk_label_new(tempstr); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, TRUE, TRUE, 0); gtk_widget_show(label); button = gtk_button_new_with_label(" Close "); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(dbmixer_about_close), NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), button, FALSE, FALSE, 0); gtk_widget_show(button); gtk_widget_show(dialog); gtk_widget_grab_focus(button); }