diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 8c770f6..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Build alsa-tools - -on: [push, pull_request] - -jobs: - fedora_latest_build: - runs-on: ubuntu-latest - container: - image: fedora:latest - env: - QTDIR: /usr/lib64/qt-3.3 - steps: - - name: Prepare environment - run: | - dnf -y upgrade - dnf -y install @development-tools gcc-c++ libtool bzip2 gtk2-devel gtk3-devel fltk-devel qt3-devel - - - name: Checkout alsa-lib - uses: actions/checkout@v4 - with: - repository: alsa-project/alsa-lib - ref: master - path: alsa-lib - - name: Configure alsa-lib - run: | - cd alsa-lib - head -5 configure.ac - libtoolize --force --copy --automake - aclocal - autoheader - automake --foreign --copy --add-missing - autoconf - export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" - ./configure - echo "Version: $(cat version)" - - name: Build alsa-lib - run: | - cd alsa-lib - make - - name: Install alsa-lib - run: | - cd alsa-lib - make install - - - name: Checkout - uses: actions/checkout@v4 - with: - path: alsa-tools - - name: Checkout all tags - run: | - cd alsa-tools - git fetch --prune --tags --force - git fetch --prune --unshallow --force - - name: Modify version - run: | - cd alsa-tools - mv Makefile Makefile.old - version=$(git describe | sed -e 's/v//') - if test -z "$version"; then version=$(git describe --tags | sed -e 's/v//'); fi - if test -z "$version"; then version1=$(grep "VERSION = .*" Makefile.old | cut -d ' ' -f 3); version2=$(git rev-parse --short HEAD); version="${version1}-g${version2}"; fi - echo "Version: ${version}" - sed -r "s/VERSION = .*/VERSION = ${version}/" < Makefile.old > Makefile - grep "VERSION =" Makefile - - name: Compile and install as10k1 (dependency) - run: | - cd alsa-tools/as10k1 - ./gitcompile --prefix=/usr - make install - - name: Compile and install ld10k1 (dependency) - run: | - cd alsa-tools/ld10k1 - ./gitcompile --prefix=/usr - make install - - name: Configure and build - run: | - cd alsa-tools - ./gitcompile - - name: Create package - run: | - cd alsa-tools - make alsa-dist - mkdir ../artifacts - mv alsa-tools*.tar.bz2 ../artifacts - - name: Archive package - uses: actions/upload-artifact@v4 - with: - name: alsa-tools-test-package - path: artifacts/ - - ubuntu_last_build: - runs-on: ubuntu-latest - container: - image: ubuntu:latest - steps: - - name: Prepare - run: | - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get -y install apt-utils - apt-get -y full-upgrade - apt-get install -y git build-essential pkg-config m4 autoconf automake libtool ibgtk2.0-dev libgtk-3-dev libfltk1.3-dev - - - name: Checkout alsa-lib - uses: actions/checkout@v4 - with: - repository: alsa-project/alsa-lib - ref: master - - name: Configure alsa-lib - run: | - libtoolize --force --copy --automake - aclocal - autoheader - automake --foreign --copy --add-missing - autoconf - export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" - ./configure - - name: Build alsa-lib - run: | - make - - name: Install alsa-lib - run: | - make install - - - name: Checkout - uses: actions/checkout@v4 - - name: Remove qlo10k1 - run: | - mv Makefile Makefile.old - sed -e 's/qlo10k1//' < Makefile.old > Makefile - - name: Compile and install as10k1 (dependency) - run: | - cd as10k1 - ./gitcompile --prefix=/usr - make install - - name: Compile and install ld10k1 (dependency) - run: | - cd ld10k1 - ./gitcompile --prefix=/usr - make install - - name: Configure and build - run: | - ./gitcompile diff --git a/.gitignore b/.gitignore index 0909477..93127b4 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ autom4te.cache stamp-h1 version distdir -*/compile ac3dec/Makefile ac3dec/ac3dec @@ -46,28 +45,24 @@ as10k1/configure echomixer/echomixer echomixer/Makefile echomixer/configure -echomixer/desktop/Makefile envy24control/Makefile envy24control/configure -envy24control/desktop/Makefile hdspconf/Makefile hdspconf/configure hdspconf/src/hdspconf hdspconf/src/Makefile hdspconf/pixmaps/Makefile -hdspconf/desktop/Makefile hdspmixer/Makefile hdspmixer/configure hdspmixer/src/hdspmixer hdspmixer/pixmaps/Makefile -hdspmixer/desktop/Makefile hdspmixer/src/Makefile hdsploader/Makefile hdsploader/configure hwmixvolume/Makefile hwmixvolume/configure -hwmixvolume/desktop/Makefile ld10k1/Makefile +ld10k1/compile ld10k1/ld10k1d ld10k1/configure ld10k1/m4/ @@ -128,10 +123,6 @@ hdajackretask/configure hdajackretask/Makefile hdajackretask/README.generated.h hdajackretask/hdajackretask -hdajackretask/desktop/Makefile -hdajacksensetest/Makefile -hdajacksensetest/configure -hdajacksensetest/hdajacksensetest hda-verb/Makefile hda-verb/configure hda-verb/hda-verb diff --git a/Makefile b/Makefile index 1a94611..dd8898a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 1.2.14 +VERSION = 1.0.29 TOP = . SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ @@ -29,7 +29,7 @@ install: done alsa-dist: - @echo $(VERSION) > $(TOP)/version + @echo $(VERSION) >> $(TOP)/version @mkdir -p $(TOP)/distdir @for i in $(SUBDIRS); do \ cd $(TOP)/$$i; echo $(TOP)/$$i; \ diff --git a/as10k1/COPYING b/as10k1/COPYING index b74ec10..5b6e7c6 100644 --- a/as10k1/COPYING +++ b/as10k1/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/as10k1/as10k1.c b/as10k1/as10k1.c index 079f1c2..96af0c3 100644 --- a/as10k1/as10k1.c +++ b/as10k1/as10k1.c @@ -244,7 +244,6 @@ void asm_open(char *name) struct stat st; char *next; int backup_line_num,backup_file_num; - size_t rsize; @@ -285,10 +284,8 @@ void asm_open(char *name) buff[i].mem_end = buff[i].mem_start+st.st_size; - rsize = read(fd, buff[i].mem_start, st.st_size); + read(fd, buff[i].mem_start, st.st_size); close(fd); - if (rsize != st.st_size) - as_exit("short read from input file\n"); #ifdef DEBUG printf("File %s opened:\n",name); @@ -369,8 +366,8 @@ void as_exit(const char *message) exit(1); } -void output_tram_line(struct list_head *line_head, int type) -{ +inline void output_tram_line( struct list_head *line_head, int type){ + struct tram *tram_sym; struct list_head *entry; @@ -386,14 +383,13 @@ void output_tram_line(struct list_head *line_head, int type) val = __cpu_to_le32(tram_sym->data.value); fwrite(&val,sizeof(u32),1,fp); if(listing){ - if(type==TYPE_TRAM_ADDR_READ) { + if(type==TYPE_TRAM_ADDR_READ) fprintf(listfile,"\tRead"); - } else { + else fprintf(listfile,"\tWrite"); - } - fprintf(listfile,": 0x3%02x/0x2%02x (%s), offset 0x%07x\n",tram_sym->data.address,tram_sym->data.address, - (prev_sym((&tram_sym->list)))->data.name,tram_sym->data.value); + fprintf(listfile,": 0x3%02x/0x2%02x (%s), offset 0x%07x\n",tram_sym->data.address,tram_sym->data.address, + (prev_sym((&tram_sym->list)))->data.name,tram_sym->data.value); } } diff --git a/as10k1/as10k1.h b/as10k1/as10k1.h index 1713963..b897f3b 100644 --- a/as10k1/as10k1.h +++ b/as10k1/as10k1.h @@ -55,6 +55,6 @@ int tram_table_count=0; int gpr_constant_count=0; char patch_name[PATCH_NAME_SIZE]="NO_NAME"; -unsigned int macro_depth=0; +int macro_depth=0; diff --git a/as10k1/assemble.c b/as10k1/assemble.c index ced57c7..4508973 100644 --- a/as10k1/assemble.c +++ b/as10k1/assemble.c @@ -22,7 +22,6 @@ #include"types.h" #include"proto.h" -#include"parse.h" extern int dbg_opt; extern FILE *listfile; @@ -46,6 +45,7 @@ void op(int op, int z,int w,int x,int y) int w0, w1; extern int dsp_code[DSP_CODE_SIZE]; extern int ip; + extern char op_codes[35][9]; extern char listtemp[60]; if (ip >= 0x200) as_exit("to many instructions"); @@ -306,6 +306,7 @@ void add_symbol(char *name, u16 type, u16 address, u32 value) extern int gpr_input_count,gpr_output_count,gpr_static_count,gpr_dynamic_count,gpr_control_count,gpr_constant_count; struct sym *sym; + struct tram *tmp_ptr; extern struct list_head sym_head; extern struct delay tram_delay[MAX_TANK_ADDR]; extern struct lookup tram_lookup[MAX_TANK_ADDR]; @@ -355,8 +356,10 @@ void add_symbol(char *name, u16 type, u16 address, u32 value) else tram_delay[tmp].write++; }else{ + tmp_ptr=(struct tram *)sym; list_add_tail(&(((struct tram *)sym)->tram) , &(tram_lookup[tmp].tram) ); - if(type== TYPE_TRAM_ADDR_READ) + tmp_ptr=(struct tram *)sym; + if(type== TYPE_TRAM_ADDR_READ) tram_lookup[tmp].read++; else tram_lookup[tmp].write++; diff --git a/as10k1/macro.c b/as10k1/macro.c index 70e4ef9..a01ad6f 100644 --- a/as10k1/macro.c +++ b/as10k1/macro.c @@ -72,11 +72,14 @@ void new_macro(char *symbol, char *line, char *operand) void macro_expand(int macnum,char *operand ) { char *line,*next; - int done=0,old; + int done=0,i,old; extern unsigned int macro_depth; extern int macro_line_num; char string[MAX_LINE_LENGTH]; + //initialize macro use: + i=0; + if(macro_depth+1> MAX_MAC_DEPTH) as_exit("Error exceeded maximum number of recursive macro calls"); diff --git a/as10k1/parse.c b/as10k1/parse.c index 02d4f5e..8523717 100644 --- a/as10k1/parse.c +++ b/as10k1/parse.c @@ -18,7 +18,6 @@ #include #include #include"types.h" -#define DECLARE_OP_CODES #include"parse.h" #include"proto.h" @@ -88,7 +87,7 @@ int parse( char line_string[MAX_LINE_LENGTH], char *line) if((tmp=ismacro(op_name_ptr)) != -1 ){ if(defmacro==0) macro_expand(tmp,strtok(NULL,"")); - return(0); + return(0); } if( (op_num=op_decode(op_name_ptr))==-1) { diff --git a/as10k1/parse.h b/as10k1/parse.h index b79ed8b..be71daa 100644 --- a/as10k1/parse.h +++ b/as10k1/parse.h @@ -63,9 +63,7 @@ enum foo { }; -#ifndef DECLARE_OP_CODES -extern char op_codes[NUM_OPS+1][9]; -#else + char op_codes[NUM_OPS+1][9]= { "MACS", @@ -112,7 +110,6 @@ char op_codes[NUM_OPS+1][9]= "con", "NotAnOp" }; -#endif //extern int file_num,source_line_num diff --git a/echomixer/COPYING b/echomixer/COPYING index 623b625..d60c31a 100644 --- a/echomixer/COPYING +++ b/echomixer/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/echomixer/Makefile.am b/echomixer/Makefile.am index beae8fc..ee08822 100644 --- a/echomixer/Makefile.am +++ b/echomixer/Makefile.am @@ -1,4 +1,3 @@ -SUBDIRS = desktop AM_CFLAGS = @ECHOMIXER_CFLAGS@ bin_PROGRAMS = echomixer man_MANS = diff --git a/echomixer/configure.ac b/echomixer/configure.ac index c360442..769c829 100644 --- a/echomixer/configure.ac +++ b/echomixer/configure.ac @@ -7,4 +7,4 @@ AM_MAINTAINER_MODE([enable]) PKG_CHECK_MODULES(ECHOMIXER, gtk+-2.0 alsa >= 1.0.0) -AC_OUTPUT(Makefile desktop/Makefile) +AC_OUTPUT(Makefile) diff --git a/echomixer/desktop/Makefile.am b/echomixer/desktop/Makefile.am deleted file mode 100644 index 3314702..0000000 --- a/echomixer/desktop/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -APPNAME = echomixer - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_48x48_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/echomixer/desktop/echomixer.desktop b/echomixer/desktop/echomixer.desktop deleted file mode 100644 index 80753f9..0000000 --- a/echomixer/desktop/echomixer.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Echomixer -GenericName=Control Echo Digital Audio sound cards -Comment=Mixer and GUI control utility for Echo Digital Audio sound cards -Exec=echomixer -Icon=echomixer -Terminal=false -Type=Application -Categories=AudioVideo; -Version=0.9.4 diff --git a/echomixer/desktop/hicolor_apps_48x48_echomixer.png b/echomixer/desktop/hicolor_apps_48x48_echomixer.png deleted file mode 100644 index 48c4b92..0000000 Binary files a/echomixer/desktop/hicolor_apps_48x48_echomixer.png and /dev/null differ diff --git a/echomixer/echomixer.c b/echomixer/echomixer.c index adc10e1..54d1520 100644 --- a/echomixer/echomixer.c +++ b/echomixer/echomixer.c @@ -13,7 +13,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_VERSION "%s Echomixer v" VERSION @@ -525,25 +525,6 @@ void GetChannels(void) { nLOut=snd_ctl_elem_value_get_integer(control, 2); // Number of output channels fdOut=snd_ctl_elem_value_get_integer(control, 3); // First digital out nPOut=snd_ctl_elem_value_get_integer(control, 4); // Number of virtual output channels (==nLOut on non-vmixer cards) - - mixerControl.outputs = nLOut; - mixerControl.inputs = nIn; - - if (vmixerId) { - vmixerControl.outputs = nLOut; - vmixerControl.inputs = nPOut; - - /* For outputs and inputs. */ - metersStreams = 2; - } else { - /* For outputs, inputs and system outputs. */ - metersStreams = 3; - } - - /* For the number of channels. */ - metersNumber = 16; - /* For each of levels and peaks. */ - metersTypes = 2; } ClockMask=snd_ctl_elem_value_get_integer(control, 5); // Bitmask of available input clocks } @@ -629,7 +610,9 @@ gint DrawMixer(gpointer unused) { int OutPeak[ECHO_MAXAUDIOOUTPUTS]; int VirLevel[ECHO_MAXAUDIOOUTPUTS]; int VirPeak[ECHO_MAXAUDIOOUTPUTS]; - char str[16]; + static int InClip[ECHO_MAXAUDIOINPUTS]; + static int OutClip[ECHO_MAXAUDIOOUTPUTS]; + char str[8]; int i, o, dB; GdkColor Grid={0x787878, 0, 0, 0}; GdkColor Labels={0x9694C4, 0, 0, 0}; @@ -645,8 +628,13 @@ gint DrawMixer(gpointer unused) { update_rect.height = Mixheight; GetVUmeters(InLevel, InPeak, OutLevel, OutPeak, VirLevel, VirPeak); - if (!gc) + if (!gc) { gc=gdk_gc_new(gtk_widget_get_parent_window(Mixdarea)); + for (i=0; istyle->black_gc, TRUE, 0, 0, Mixwidth, Mixheight); @@ -1686,7 +1674,7 @@ void ToggleWindow(GtkWidget *widget, gpointer window) { // Scan all controls and sets up the structures needed to access them. int OpenControls(const char *card, const char *cardname) { int err, i, o; - int numid, items, item; + int numid, count, items, item; snd_hctl_t *handle; snd_hctl_elem_t *elem; snd_ctl_elem_id_t *id; @@ -1719,15 +1707,20 @@ int OpenControls(const char *card, const char *cardname) { continue; snd_hctl_elem_get_id(elem, id); numid=snd_ctl_elem_id_get_numid(id); + count=snd_ctl_elem_info_get_count(info); if (!strcmp("Monitor Mixer Volume", snd_ctl_elem_id_get_name(id))) { if (!mixerId) { mixerId=numid; CTLID_DEBUG(("First Mixer id=%d\n", mixerId)); + mixerControl.outputs=snd_ctl_elem_info_get_dimension(info, 0); + mixerControl.inputs=snd_ctl_elem_info_get_dimension(info, 1); } } else if (!strcmp("VMixer Volume", snd_ctl_elem_id_get_name(id))) { if (!vmixerId) { vmixerId=vmixerControl.id=numid; CTLID_DEBUG(("First Vmixer id=%d\n", vmixerId)); + vmixerControl.outputs=snd_ctl_elem_info_get_dimension(info, 0); + vmixerControl.inputs=snd_ctl_elem_info_get_dimension(info, 1); } } else if (!strcmp("PCM Playback Volume", snd_ctl_elem_id_get_name(id))) { pcmoutId=pcmoutControl.id=numid; @@ -1796,6 +1789,9 @@ int OpenControls(const char *card, const char *cardname) { CTLID_DEBUG(("VU-meter switch id=%d\n", numid)); } else if (!strcmp("VU-meters", snd_ctl_elem_id_get_name(id))) { vumetersId=numid; + metersStreams=snd_ctl_elem_info_get_dimension(info, 0); // 2 or 3: output, input and (vmixer cards only) pcm + metersNumber=snd_ctl_elem_info_get_dimension(info, 1); // Number of channels + metersTypes=snd_ctl_elem_info_get_dimension(info, 2); // 2: level and peak CTLID_DEBUG(("VU-meters id=%d\n", numid)); } else if (!strcmp("Channels info", snd_ctl_elem_id_get_name(id))) { channelsId=numid; @@ -1871,7 +1867,7 @@ int main(int argc, char *argv[]) { GtkWidget *label, *menu, *menuitem; GSList *bgroup; int err, i, o, n, cardnum, value; - char hwname[16], cardname[32], load, save; + char hwname[8], cardname[32], load, save; snd_ctl_card_info_t *hw_info; load=save=1; @@ -1892,8 +1888,8 @@ int main(int argc, char *argv[]) { } if ((err=snd_ctl_card_info(ctlhandle, hw_info))>=0) { if (!strncmp(snd_ctl_card_info_get_driver(hw_info), "Echo_", 5)) { - strncpy(card, hwname, sizeof(hwname)-1); - card[sizeof(hwname)-1]=0; + strncpy(card, hwname, 7); + hwname[7]=0; strncpy(cardname, snd_ctl_card_info_get_name(hw_info), 31); cardname[31]=0; strncpy(cardId, snd_ctl_card_info_get_name(hw_info), 15); @@ -2097,7 +2093,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/ for (i=0; iactive; } void config_restore_stereo() diff --git a/envy24control/configure.ac b/envy24control/configure.ac index dfb21bd..08dcdd8 100644 --- a/envy24control/configure.ac +++ b/envy24control/configure.ac @@ -5,6 +5,6 @@ AC_HEADER_STDC AM_INIT_AUTOMAKE AM_MAINTAINER_MODE([enable]) -PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-3.0 alsa >= 0.9.0) +PKG_CHECK_MODULES(ENVY24CONTROL, gtk+-2.0 alsa >= 0.9.0) -AC_OUTPUT(Makefile desktop/Makefile) +AC_OUTPUT(Makefile) diff --git a/envy24control/desktop/Makefile.am b/envy24control/desktop/Makefile.am deleted file mode 100644 index 0a6d6ca..0000000 --- a/envy24control/desktop/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -APPNAME = envy24control - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_48x48_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/envy24control/desktop/envy24control.desktop b/envy24control/desktop/envy24control.desktop deleted file mode 100644 index 391c647..0000000 --- a/envy24control/desktop/envy24control.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Envy24 Control -GenericName=Envy24 Control Utility -Comment=Mixer and GUI control utility for Envy24-based sound cards -Exec=envy24control -Icon=envy24control -Terminal=false -Type=Application -Categories=AudioVideo; -Version=0.9.4 diff --git a/envy24control/desktop/hicolor_apps_48x48_envy24control.png b/envy24control/desktop/hicolor_apps_48x48_envy24control.png deleted file mode 100644 index 73c47d6..0000000 Binary files a/envy24control/desktop/hicolor_apps_48x48_envy24control.png and /dev/null differ diff --git a/envy24control/driverevents.c b/envy24control/driverevents.c index cdc56ab..a05cc35 100644 --- a/envy24control/driverevents.c +++ b/envy24control/driverevents.c @@ -14,12 +14,12 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" -gboolean control_input_callback(GIOChannel *source, GIOCondition condition, gpointer data) +void control_input_callback(gpointer data, gint source, GdkInputCondition condition) { snd_ctl_t *ctl = (snd_ctl_t *)data; snd_ctl_event_t *ev; @@ -29,12 +29,12 @@ gboolean control_input_callback(GIOChannel *source, GIOCondition condition, gpoi snd_ctl_event_alloca(&ev); if (snd_ctl_read(ctl, ev) < 0) - return TRUE; + return; name = snd_ctl_event_elem_get_name(ev); index = snd_ctl_event_elem_get_index(ev); mask = snd_ctl_event_elem_get_mask(ev); if (! (mask & (SND_CTL_EVENT_MASK_VALUE | SND_CTL_EVENT_MASK_INFO))) - return TRUE; + return; switch (snd_ctl_event_elem_get_interface(ev)) { case SND_CTL_ELEM_IFACE_MIXER: @@ -81,13 +81,8 @@ gboolean control_input_callback(GIOChannel *source, GIOCondition condition, gpoi else if (!strcmp(name, "Input Sensitivity Switch")) adc_sense_update(index); break; - case SND_CTL_ELEM_IFACE_PCM: - if (!strcmp(name, "IEC958 Playback Default")) - spdif_output_update(); - break; default: break; } - return TRUE; } diff --git a/envy24control/envy24control.c b/envy24control/envy24control.c index bf6864f..0b2749e 100644 --- a/envy24control/envy24control.c +++ b/envy24control/envy24control.c @@ -24,7 +24,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" @@ -45,7 +45,7 @@ GtkWidget *window; GtkWidget *mixer_mix_drawing; GtkWidget *mixer_clear_peaks_button; GtkWidget *mixer_drawing[20]; -GtkAdjustment *mixer_adj[20][2]; +GtkObject *mixer_adj[20][2]; GtkWidget *mixer_vscale[20][2]; GtkWidget *mixer_mute_toggle[20][2]; GtkWidget *mixer_stereo_toggle[20]; @@ -71,7 +71,7 @@ GtkWidget *hw_clock_state_reset; GtkWidget *hw_rate_locking_check; GtkWidget *hw_rate_reset_check; -GtkAdjustment *hw_volume_change_adj; +GtkObject *hw_volume_change_adj; GtkWidget *hw_volume_change_spin; GtkWidget *hw_spdif_profi_nonaudio_radio; @@ -115,9 +115,9 @@ GtkWidget *input_interface_wavetable; GtkWidget *hw_phono_input_on_radio; GtkWidget *hw_phono_input_off_radio; -GtkAdjustment *av_dac_volume_adj[10]; -GtkAdjustment *av_adc_volume_adj[10]; -GtkAdjustment *av_ipga_volume_adj[10]; +GtkObject *av_dac_volume_adj[10]; +GtkObject *av_adc_volume_adj[10]; +GtkObject *av_ipga_volume_adj[10]; GtkLabel *av_dac_volume_label[10]; GtkLabel *av_adc_volume_label[10]; GtkLabel *av_ipga_volume_label[10]; @@ -130,7 +130,7 @@ struct profile_button { } profiles_toggle_buttons[MAX_PROFILES]; GtkWidget *active_button = NULL; -GtkAdjustment *card_number_adj; +GtkObject *card_number_adj; static void create_mixer_frame(GtkWidget *box, int stream) @@ -139,7 +139,7 @@ static void create_mixer_frame(GtkWidget *box, int stream) GtkWidget *vbox1; GtkWidget *hbox; GtkWidget *frame; - GtkAdjustment *adj; + GtkObject *adj; GtkWidget *vscale; GtkWidget *drawing; GtkWidget *label; @@ -171,94 +171,107 @@ static void create_mixer_frame(GtkWidget *box, int stream) } frame = gtk_frame_new(str); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 2); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); + vbox = gtk_vbox_new(FALSE, 6); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 2); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2); + hbox = gtk_hbox_new(FALSE, 2); + gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); adj = gtk_adjustment_new(96, 0, 96, 1, 16, 0); mixer_adj[stream-1][0] = adj; - vscale = gtk_scale_new(GTK_ORIENTATION_VERTICAL, adj); + vscale = gtk_vscale_new(GTK_ADJUSTMENT(adj)); mixer_vscale[stream-1][0] = vscale; + gtk_widget_show(vscale); gtk_box_pack_start(GTK_BOX(hbox), vscale, TRUE, FALSE, 0); gtk_scale_set_value_pos(GTK_SCALE(vscale), GTK_POS_BOTTOM); gtk_scale_set_digits(GTK_SCALE(vscale), 0); - g_signal_connect(adj, "value_changed", - G_CALLBACK(mixer_adjust), - (gpointer)(long)((stream << 16) + 0)); + gtk_signal_connect(GTK_OBJECT(adj), "value_changed", + GTK_SIGNAL_FUNC(mixer_adjust), + (gpointer)(long)((stream << 16) + 0)); - vbox1 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox1 = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox1); gtk_box_pack_start(GTK_BOX(hbox), vbox1, FALSE, FALSE, 0); drawing = gtk_drawing_area_new(); mixer_drawing[stream-1] = drawing; sprintf(drawname, "Mixer%i", stream); gtk_widget_set_name(drawing, drawname); - g_signal_connect(drawing, "draw", - G_CALLBACK(level_meters_draw_callback), NULL); + gtk_widget_show(drawing); + gtk_signal_connect(GTK_OBJECT(drawing), "expose_event", + GTK_SIGNAL_FUNC(level_meters_expose_event), NULL); + gtk_signal_connect(GTK_OBJECT(drawing), "configure_event", + GTK_SIGNAL_FUNC(level_meters_configure_event), NULL); gtk_widget_set_events(drawing, GDK_EXPOSURE_MASK); - gtk_widget_set_size_request(drawing, 36, (60 * tall_equal_mixer_ht + 204)); + gtk_widget_set_usize(drawing, 36, (60 * tall_equal_mixer_ht + 204)); gtk_box_pack_start(GTK_BOX(vbox1), drawing, FALSE, FALSE, 1); label = gtk_label_new(""); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox1), label, TRUE, TRUE, 2); adj = gtk_adjustment_new(96, 0, 96, 1, 16, 0); mixer_adj[stream-1][1] = adj; - vscale = gtk_scale_new(GTK_ORIENTATION_VERTICAL, adj); + vscale = gtk_vscale_new(GTK_ADJUSTMENT(adj)); mixer_vscale[stream-1][1] = vscale; + gtk_widget_show(vscale); gtk_box_pack_start(GTK_BOX(hbox), vscale, TRUE, FALSE, 0); gtk_scale_set_value_pos(GTK_SCALE(vscale), GTK_POS_BOTTOM); gtk_scale_set_digits(GTK_SCALE(vscale), 0); - g_signal_connect(adj, "value_changed", - G_CALLBACK(mixer_adjust), - (gpointer)(long)((stream << 16) + 1)); + gtk_signal_connect(GTK_OBJECT(adj), "value_changed", + GTK_SIGNAL_FUNC(mixer_adjust), + (gpointer)(long)((stream << 16) + 1)); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); + hbox = gtk_hbox_new(TRUE, 0); + gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, FALSE, 0); label = gtk_label_new("Left"); - gtk_widget_set_halign(label, GTK_ALIGN_START); - gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); label = gtk_label_new("Right"); - gtk_widget_set_halign(label, GTK_ALIGN_END); - gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); toggle = gtk_toggle_button_new_with_label("L/R Gang"); mixer_stereo_toggle[stream-1] = toggle; + gtk_widget_show(toggle); gtk_box_pack_end(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); /* gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); */ - g_signal_connect(toggle, "toggled", - G_CALLBACK(config_set_stereo), GINT_TO_POINTER(stream-1)); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + GTK_SIGNAL_FUNC(config_set_stereo), (gpointer)stream-1); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6); - gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); + hbox = gtk_hbox_new(TRUE, 6); + gtk_widget_show(hbox); gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); toggle = gtk_toggle_button_new_with_label("Mute"); mixer_mute_toggle[stream-1][0] = toggle; + gtk_widget_show(toggle); gtk_box_pack_start(GTK_BOX(hbox), toggle, FALSE, TRUE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); - g_signal_connect(toggle, "toggled", - G_CALLBACK(mixer_toggled_mute), - (gpointer)(long)((stream << 16) + 0)); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + GTK_SIGNAL_FUNC(mixer_toggled_mute), + (gpointer)(long)((stream << 16) + 0)); toggle = gtk_toggle_button_new_with_label("Mute"); mixer_mute_toggle[stream-1][1] = toggle; + gtk_widget_show(toggle); gtk_box_pack_start(GTK_BOX(hbox), toggle, FALSE, TRUE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); - g_signal_connect(toggle, "toggled", - G_CALLBACK(mixer_toggled_mute), - (gpointer)(long)((stream << 16) + 1)); + gtk_signal_connect(GTK_OBJECT(toggle), "toggled", + GTK_SIGNAL_FUNC(mixer_toggled_mute), + (gpointer)(long)((stream << 16) + 1)); } @@ -273,27 +286,33 @@ static void create_inputs_mixer(GtkWidget *main, GtkWidget *notebook, int page) int stream; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); + hbox = gtk_hbox_new(FALSE, 3); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("Monitor Inputs"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),page), label); /* build scrolling area */ scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(viewport), vbox); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); for(stream = (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1); \ @@ -318,27 +337,33 @@ static void create_pcms_mixer(GtkWidget *main, GtkWidget *notebook, int page) GtkWidget *viewport; int stream; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); + hbox = gtk_hbox_new(FALSE, 3); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("Monitor PCMs"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),page), label); /* build scrolling area */ scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(viewport), vbox); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); for(stream = 1; stream <= pcm_output_channels; stream ++) { @@ -412,28 +437,32 @@ static void create_router_frame(GtkWidget *box, int stream, int pos) } frame = gtk_frame_new(str); + gtk_widget_show(frame); gtk_box_pack_start (GTK_BOX(box), frame, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); - gtk_box_set_homogeneous(GTK_BOX(vbox), TRUE); + vbox = gtk_vbox_new(TRUE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, str1); router_radio[stream-1][0] = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(patchbay_toggled), - (gpointer)(long)((stream << 16) + 0)); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)patchbay_toggled, + (gpointer)(long)((stream << 16) + 0)); - hseparator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); - gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, FALSE, 0); + hseparator = gtk_hseparator_new(); + gtk_widget_show(hseparator); + gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, TRUE, 0); label = gtk_label_new(""); + gtk_widget_show(label); /* the digital mixer can only be routed to HW1/2 or SPDIF1/2 */ if( (stream <= 2) /* hw1/2 */ || @@ -441,32 +470,36 @@ static void create_router_frame(GtkWidget *box, int stream, int pos) ) { radiobutton = gtk_radio_button_new_with_label(group, stream & 1 ? "Digital Mix L" : "Digital Mix R"); router_radio[stream-1][1] = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(patchbay_toggled), - (gpointer)(long)((stream << 16) + 1)); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)patchbay_toggled, + (gpointer)(long)((stream << 16) + 1)); } else { label = gtk_label_new(""); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); } - hseparator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); - gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, FALSE, 0); + hseparator = gtk_hseparator_new(); + gtk_widget_show(hseparator); + gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, TRUE, 0); for(idx = 2 - spdif_channels; idx < input_channels + 2; idx++) { radiobutton = gtk_radio_button_new_with_label(group, table[idx]); router_radio[stream-1][2+idx] = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(patchbay_toggled), - (gpointer)(long)((stream << 16) + 2 + idx)); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)patchbay_toggled, + (gpointer)(long)((stream << 16) + 2 + idx)); } } @@ -479,19 +512,23 @@ static void create_router(GtkWidget *main, GtkWidget *notebook, int page) int stream, pos; scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_container_add(GTK_CONTAINER(notebook), scrolledwindow); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); label = gtk_label_new("Patchbay / Router"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(viewport), hbox); pos = 0; @@ -514,76 +551,85 @@ static void create_master_clock(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Master Clock"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 4); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Int 22050"); hw_master_clock_xtal_22050 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"22050"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"22050"); radiobutton = gtk_radio_button_new_with_label(group, "Int 32000"); hw_master_clock_xtal_32000 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"32000"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"32000"); radiobutton = gtk_radio_button_new_with_label(group, "Int 44100"); hw_master_clock_xtal_44100 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"44100"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"44100"); radiobutton = gtk_radio_button_new_with_label(group, "Int 48000"); hw_master_clock_xtal_48000 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"48000"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"48000"); radiobutton = gtk_radio_button_new_with_label(group, "Int 88200"); hw_master_clock_xtal_88200 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"88200"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"88200"); radiobutton = gtk_radio_button_new_with_label(group, "Int 96000"); hw_master_clock_xtal_96000 = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"96000"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"96000"); radiobutton = gtk_radio_button_new_with_label(group, "S/PDIF In"); hw_master_clock_spdif_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"SPDIF"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"SPDIF"); @@ -593,14 +639,16 @@ static void create_master_clock(GtkWidget *box) radiobutton = gtk_radio_button_new_with_label(group, "Word Clock"); hw_master_clock_word_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(internal_clock_toggled), - (gpointer)"WordClock"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)internal_clock_toggled, + (gpointer)"WordClock"); label = gtk_label_new("Locked"); hw_master_clock_status_label = label; + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 0); } @@ -611,27 +659,30 @@ static void create_rate_state(GtkWidget *box) GtkWidget *check; frame = gtk_frame_new("Rate State"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE); + hbox = gtk_hbox_new(TRUE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); check = gtk_check_button_new_with_label("Locked"); hw_rate_locking_check = check; + gtk_widget_show(check); gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 0); - g_signal_connect(check, "toggled", - G_CALLBACK(rate_locking_toggled), - (gpointer)"locked"); + gtk_signal_connect(GTK_OBJECT(check), "toggled", + (GtkSignalFunc)rate_locking_toggled, + (gpointer)"locked"); check = gtk_check_button_new_with_label("Reset"); hw_rate_reset_check = check; + gtk_widget_show(check); gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 0); - g_signal_connect(check, "toggled", - G_CALLBACK(rate_reset_toggled), - (gpointer)"reset"); + gtk_signal_connect(GTK_OBJECT(check), "toggled", + (GtkSignalFunc)rate_reset_toggled, + (gpointer)"reset"); } @@ -641,45 +692,47 @@ static void create_actual_rate(GtkWidget *box) GtkWidget *label; frame = gtk_frame_new("Actual Rate"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); label = gtk_label_new(""); hw_master_clock_actual_rate_label = label; + gtk_widget_show(label); gtk_container_add(GTK_CONTAINER(frame), label); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - gtk_widget_set_margin_start(label, 6); - gtk_widget_set_margin_end(label, 6); - gtk_widget_set_margin_top(label, 6); - gtk_widget_set_margin_bottom(label, 6); + gtk_misc_set_padding(GTK_MISC(label), 6, 6); } static void create_volume_change(GtkWidget *box) { GtkWidget *frame; GtkWidget *hbox; - GtkAdjustment *spinbutton_adj; + GtkObject *spinbutton_adj; GtkWidget *spinbutton; GtkWidget *label; frame = gtk_frame_new("Volume Change"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); label = gtk_label_new("Rate"); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0); gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); - spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 0); + spinbutton_adj = gtk_adjustment_new(16, 0, 255, 1, 10, 10); hw_volume_change_adj = spinbutton_adj; - spinbutton = gtk_spin_button_new(spinbutton_adj, 1, 0); + spinbutton = gtk_spin_button_new(GTK_ADJUSTMENT(spinbutton_adj), 1, 0); + gtk_widget_show(spinbutton); gtk_box_pack_start(GTK_BOX(hbox), spinbutton, TRUE, FALSE, 0); - gtk_widget_set_valign(spinbutton, GTK_ALIGN_CENTER); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbutton), TRUE); - g_signal_connect(spinbutton_adj, "value_changed", - G_CALLBACK(volume_change_rate_adj), NULL); + gtk_signal_connect(GTK_OBJECT(spinbutton_adj), "value_changed", + GTK_SIGNAL_FUNC(volume_change_rate_adj), NULL); } @@ -691,29 +744,33 @@ static void create_spdif_output_settings_profi_data(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Data Mode"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Non-audio"); hw_spdif_profi_nonaudio_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_data_toggled), - (gpointer)"Non-audio"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_data_toggled, + (gpointer)"Non-audio"); radiobutton = gtk_radio_button_new_with_label(group, "Audio"); hw_spdif_profi_audio_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_data_toggled), - (gpointer)"Audio"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_data_toggled, + (gpointer)"Audio"); } static void create_spdif_output_settings_profi_stream(GtkWidget *box) @@ -724,28 +781,32 @@ static void create_spdif_output_settings_profi_stream(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Stream"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Stereophonic"); hw_profi_stream_stereo_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_stream_toggled), - (gpointer)"Stereo"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_stream_toggled, + (gpointer)"Stereo"); radiobutton = gtk_radio_button_new_with_label(group, "Not indicated"); hw_profi_stream_notid_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_stream_toggled), - (gpointer)"NOTID"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_stream_toggled, + (gpointer)"NOTID"); } static void create_spdif_output_settings_profi_emphasis(GtkWidget *box) @@ -756,45 +817,51 @@ static void create_spdif_output_settings_profi_emphasis(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Emphasis"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "No emphasis"); hw_profi_emphasis_none_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_emphasis_toggled), - (gpointer)"No"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_emphasis_toggled, + (gpointer)"No"); radiobutton = gtk_radio_button_new_with_label(group, "50/15us"); hw_profi_emphasis_5015_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_emphasis_toggled), - (gpointer)"5015"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_emphasis_toggled, + (gpointer)"5015"); radiobutton = gtk_radio_button_new_with_label(group, "CCITT J.17"); hw_profi_emphasis_ccitt_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_emphasis_toggled), - (gpointer)"CCITT"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_emphasis_toggled, + (gpointer)"CCITT"); radiobutton = gtk_radio_button_new_with_label(group, "Not indicated"); hw_profi_emphasis_notid_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(profi_emphasis_toggled), - (gpointer)"NOTID"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)profi_emphasis_toggled, + (gpointer)"NOTID"); } static void create_spdif_output_settings_profi(GtkWidget *notebook, int page) @@ -803,22 +870,26 @@ static void create_spdif_output_settings_profi(GtkWidget *notebook, int page) GtkWidget *vbox; GtkWidget *label; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("Professional"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); create_spdif_output_settings_profi_data(vbox); create_spdif_output_settings_profi_stream(vbox); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); @@ -833,28 +904,32 @@ static void create_spdif_output_settings_consumer_copyright(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Copyright"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Copyrighted"); hw_consumer_copyright_on_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_copyright_toggled), - (gpointer)"Copyright"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_copyright_toggled, + (gpointer)"Copyright"); radiobutton = gtk_radio_button_new_with_label(group, "Copy permitted"); hw_consumer_copyright_off_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_copyright_toggled), - (gpointer)"Permitted"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_copyright_toggled, + (gpointer)"Permitted"); } static void create_spdif_output_settings_consumer_copy(GtkWidget *box) @@ -865,28 +940,32 @@ static void create_spdif_output_settings_consumer_copy(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Copy"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "1-st generation"); hw_consumer_copy_1st_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_copy_toggled), - (gpointer)"1st"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_copy_toggled, + (gpointer)"1st"); radiobutton = gtk_radio_button_new_with_label(group, "Original"); hw_consumer_copy_original_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_copy_toggled), - (gpointer)"Original"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_copy_toggled, + (gpointer)"Original"); } static void create_spdif_output_settings_consumer_emphasis(GtkWidget *box) @@ -897,27 +976,31 @@ static void create_spdif_output_settings_consumer_emphasis(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Emphasis"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "No emphasis"); hw_consumer_emphasis_none_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_emphasis_toggled), - (gpointer)"No"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_emphasis_toggled, + (gpointer)"No"); radiobutton = gtk_radio_button_new_with_label(group, "50/15us"); hw_consumer_emphasis_5015_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_emphasis_toggled), - (gpointer)"5015"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_emphasis_toggled, + (gpointer)"5015"); } static void create_spdif_output_settings_consumer_category(GtkWidget *box) @@ -928,43 +1011,49 @@ static void create_spdif_output_settings_consumer_category(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("Category"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "DAT"); hw_consumer_category_dat_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(consumer_category_toggled), - (gpointer)"DAT"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_category_toggled, + (gpointer)"DAT"); radiobutton = gtk_radio_button_new_with_label(group, "PCM encoder"); hw_consumer_category_pcm_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(radiobutton), "toggled", - G_CALLBACK(consumer_category_toggled), - (gpointer)"PCM"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_category_toggled, + (gpointer)"PCM"); radiobutton = gtk_radio_button_new_with_label(group, "CD (ICE-908)"); hw_consumer_category_cd_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(radiobutton), "toggled", - G_CALLBACK(consumer_category_toggled), - (gpointer)"CD"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_category_toggled, + (gpointer)"CD"); radiobutton = gtk_radio_button_new_with_label(group, "General"); hw_consumer_category_general_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(radiobutton), "toggled", - G_CALLBACK(consumer_category_toggled), - (gpointer)"General"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)consumer_category_toggled, + (gpointer)"General"); } static void create_spdif_output_settings_consumer(GtkWidget *notebook, int page) @@ -973,29 +1062,34 @@ static void create_spdif_output_settings_consumer(GtkWidget *notebook, int page) GtkWidget *hbox; GtkWidget *label; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); label = gtk_label_new("Consumer"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); create_spdif_output_settings_consumer_copyright(vbox); create_spdif_output_settings_consumer_copy(vbox); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); create_spdif_output_settings_consumer_emphasis(vbox); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); @@ -1012,38 +1106,44 @@ static void create_spdif_output_settings(GtkWidget *box) GSList *group = NULL; frame = gtk_frame_new("S/PDIF Output Settings"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); radiobutton = gtk_radio_button_new_with_label(NULL, "Professional"); hw_spdif_professional_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(hbox), radiobutton, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(radiobutton), 6); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(spdif_output_toggled), - (gpointer)"Professional"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)spdif_output_toggled, + (gpointer)"Professional"); radiobutton = gtk_radio_button_new_with_label(group, "Consumer"); hw_spdif_consumer_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(hbox), radiobutton, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(radiobutton), 6); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(spdif_output_toggled), - (gpointer)"Consumer"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)spdif_output_toggled, + (gpointer)"Consumer"); notebook = gtk_notebook_new(); hw_spdif_output_notebook = notebook; + gtk_widget_show(notebook); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); @@ -1057,40 +1157,51 @@ static void create_spdif_input_select(GtkWidget *box) GtkWidget *vbox; GtkWidget *radiobutton; GSList *group = NULL; + int hide = 1; + + if((card_eeprom.subvendor == ICE1712_SUBDEVICE_DELTADIO2496) || (card_is_dmx6fire)) + hide = 0; frame = gtk_frame_new("Digital Input"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Coaxial"); hw_spdif_input_coaxial_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(spdif_input_toggled), - (gpointer)"Coaxial"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)spdif_input_toggled, + (gpointer)"Coaxial"); radiobutton = gtk_radio_button_new_with_label(group, "Optical"); hw_spdif_input_optical_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(spdif_input_toggled), - (gpointer)"Optical"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)spdif_input_toggled, + (gpointer)"Optical"); - if (card_is_dmx6fire) { - radiobutton = gtk_radio_button_new_with_label(group, "Internal CD"); - hw_spdif_switch_off_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); - gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(spdif_input_toggled), - (gpointer)"Off"); - } + radiobutton = gtk_radio_button_new_with_label(group, "Internal CD"); + hw_spdif_switch_off_radio = radiobutton; + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + if(card_is_dmx6fire) + gtk_widget_show(radiobutton); + gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)spdif_input_toggled, + (gpointer)"Off"); + + if(hide) + gtk_widget_hide_all(frame); } @@ -1100,30 +1211,41 @@ static void create_phono_input(GtkWidget *box) GtkWidget *vbox; GtkWidget *radiobutton; GSList *group = NULL; + int hide = 1; + + if(card_is_dmx6fire) + hide = 0; frame = gtk_frame_new("Phono Input Switch"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 7); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Phono"); hw_phono_input_on_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(phono_input_toggled), - (gpointer)"Phono"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)phono_input_toggled, + (gpointer)"Phono"); radiobutton = gtk_radio_button_new_with_label(group, "Mic"); hw_phono_input_off_radio = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(phono_input_toggled), - (gpointer)"Mic"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)phono_input_toggled, + (gpointer)"Mic"); + + if(hide) + gtk_widget_hide_all(frame); } static void create_input_interface(GtkWidget *box) @@ -1132,46 +1254,59 @@ static void create_input_interface(GtkWidget *box) GtkWidget *vbox; GtkWidget *radiobutton; GSList *group = NULL; + int hide = 1; + + if (card_is_dmx6fire) + hide = 0; frame = gtk_frame_new("Line In Selector"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 4); //gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); radiobutton = gtk_radio_button_new_with_label(group, "Internal"); input_interface_internal = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(analog_input_select_toggled), - (gpointer)"Internal"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)analog_input_select_toggled, + (gpointer)"Internal"); radiobutton = gtk_radio_button_new_with_label(group, "Front Input"); input_interface_front_input = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(analog_input_select_toggled), - (gpointer)"Front Input"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)analog_input_select_toggled, + (gpointer)"Front Input"); radiobutton = gtk_radio_button_new_with_label(group, "Rear Input"); input_interface_rear_input = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(analog_input_select_toggled), - (gpointer)"Rear Input"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)analog_input_select_toggled, + (gpointer)"Rear Input"); radiobutton = gtk_radio_button_new_with_label(group, "Wavetable"); input_interface_wavetable = radiobutton; - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); + gtk_widget_show(radiobutton); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0); - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(analog_input_select_toggled), - (gpointer)"Wave Table"); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)analog_input_select_toggled, + (gpointer)"Wave Table"); + + if(hide) + gtk_widget_hide_all(frame); } static void create_hardware(GtkWidget *main, GtkWidget *notebook, int page) @@ -1186,55 +1321,61 @@ static void create_hardware(GtkWidget *main, GtkWidget *notebook, int page) GtkWidget *viewport; GtkWidget *hseparator; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("Hardware Settings"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); /* Build scrolling area */ scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); /* Outer box */ - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(viewport), hbox); /* Create boxes for controls */ - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 6); - hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox1 = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0); - hseparator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); + hseparator = gtk_hseparator_new(); + gtk_widget_show(hseparator); gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, FALSE, 2); - hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox2 = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox2); gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0); create_master_clock(hbox1); - vbox1 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox1 = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox1); gtk_box_pack_start(GTK_BOX(hbox1), vbox1, FALSE, FALSE, 20); create_rate_state(vbox1); create_actual_rate(vbox1); create_volume_change(vbox1); - if (card_is_dmx6fire) { - create_input_interface(hbox2); - create_phono_input(hbox2); - } - if ((card_eeprom.subvendor == ICE1712_SUBDEVICE_DELTADIO2496) || (card_is_dmx6fire)) { - create_spdif_input_select(hbox2); - } + create_input_interface(hbox2); + create_phono_input(hbox2); + create_spdif_input_select(hbox2); create_spdif_output_settings(hbox); } @@ -1246,47 +1387,57 @@ static void create_about(GtkWidget *main, GtkWidget *notebook, int page) GtkWidget *scrolledwindow; GtkWidget *viewport; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("About"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); /* build scrolling area */ scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(viewport), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); /* Create text as labels */ label = gtk_label_new(""); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 6); /* create first line */ label = gtk_label_new("Envy24 Control Utility " VERSION); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); /* create second line */ label = gtk_label_new("A GTK Tool for Envy24 PCI Audio Chip"); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); /* create third line */ label = gtk_label_new("Copyright(c) 2000 by Jaroslav Kysela "); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); label = gtk_label_new(""); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 6); } @@ -1296,7 +1447,7 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) GtkWidget *hbox; GtkWidget *vbox; GtkWidget *frame; - GtkAdjustment *adj; + GtkObject *adj; GtkWidget *vscale; GtkWidget *radiobutton; GSList *group; @@ -1322,9 +1473,11 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_container_add(GTK_CONTAINER(notebook), scrolledwindow); label = gtk_label_new("Analog Volume"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); @@ -1332,9 +1485,11 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(viewport), hbox); /* create DAC */ @@ -1342,32 +1497,37 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) char name[32]; sprintf(name, "DAC %d", i); frame = gtk_frame_new(name); + gtk_widget_show(frame); //gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); /* Add friendly labels for DMX 6Fires */ if(card_is_dmx6fire && (i < 6)){ label = gtk_label_new(dmx6fire_outputs[i]); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); } adj = gtk_adjustment_new(0, -(envy_dac_max()), 0, 1, 16, 0); av_dac_volume_adj[i] = adj; - vscale = gtk_scale_new(GTK_ORIENTATION_VERTICAL, adj); + vscale = gtk_vscale_new(GTK_ADJUSTMENT(adj)); gtk_scale_set_draw_value(GTK_SCALE(vscale), FALSE); + gtk_widget_show(vscale); gtk_box_pack_start(GTK_BOX(vbox), vscale, TRUE, TRUE, 6); gtk_scale_set_digits(GTK_SCALE(vscale), 0); - g_signal_connect(adj, "value_changed", - G_CALLBACK(dac_volume_adjust), - (gpointer)(long)(i)); + gtk_signal_connect(GTK_OBJECT(adj), "value_changed", + GTK_SIGNAL_FUNC(dac_volume_adjust), + (gpointer)(long)(i)); label = gtk_label_new("000"); av_dac_volume_label[i] =(GtkLabel *)label; + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); @@ -1378,12 +1538,13 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) radiobutton = gtk_radio_button_new_with_label(group, envy_dac_sense_enum_name(j)); av_dac_sense_radio[i][j] = radiobutton; - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(dac_sense_toggled), - (gpointer)(long)((i << 8) + j)); + gtk_widget_show(radiobutton); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)dac_sense_toggled, + (gpointer)(long)((i << 8) + j)); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, TRUE, 0); - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); } } @@ -1392,33 +1553,38 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) char name[32]; sprintf(name, "ADC %d", i); frame = gtk_frame_new(name); + gtk_widget_show(frame); //gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); /* Add friendly labels for DMX 6Fires */ if(card_is_dmx6fire && (i < 6)){ label = gtk_label_new(dmx6fire_inputs[i]); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); } adj = gtk_adjustment_new(0, -(envy_adc_max()), 0, 1, 16, 0); av_adc_volume_adj[i] = adj; - vscale = gtk_scale_new(GTK_ORIENTATION_VERTICAL, adj); + vscale = gtk_vscale_new(GTK_ADJUSTMENT(adj)); gtk_scale_set_draw_value(GTK_SCALE(vscale), FALSE); + gtk_widget_show(vscale); gtk_box_pack_start(GTK_BOX(vbox), vscale, TRUE, TRUE, 6); gtk_scale_set_value_pos(GTK_SCALE(vscale), GTK_POS_BOTTOM); gtk_scale_set_digits(GTK_SCALE(vscale), 0); - g_signal_connect(adj, "value_changed", - G_CALLBACK(adc_volume_adjust), - (gpointer)(long)(i)); + gtk_signal_connect(GTK_OBJECT(adj), "value_changed", + GTK_SIGNAL_FUNC(adc_volume_adjust), + (gpointer)(long)(i)); label = gtk_label_new("000"); av_adc_volume_label[i] =(GtkLabel *)label; + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); if (i >= envy_adc_senses()) @@ -1428,12 +1594,13 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) radiobutton = gtk_radio_button_new_with_label(group, envy_adc_sense_enum_name(j)); av_adc_sense_radio[i][j] = radiobutton; - g_signal_connect(radiobutton, "toggled", - G_CALLBACK(adc_sense_toggled), - (gpointer)(long)((i << 8) + j)); + gtk_widget_show(radiobutton); + gtk_signal_connect(GTK_OBJECT(radiobutton), "toggled", + (GtkSignalFunc)adc_sense_toggled, + (gpointer)(long)((i << 8) + j)); gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, TRUE, 0); - group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radiobutton)); + group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton)); } } @@ -1442,33 +1609,38 @@ static void create_analog_volume(GtkWidget *main, GtkWidget *notebook, int page) char name[32]; sprintf(name, "IPGA %d", i); frame = gtk_frame_new(name); + gtk_widget_show(frame); //gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); /* Add friendly labels for DMX 6Fires */ if(card_is_dmx6fire && (i < 6)){ label = gtk_label_new(dmx6fire_inputs[i]); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); } adj = gtk_adjustment_new(0, -36, 0, 1, 16, 0); av_ipga_volume_adj[i] = adj; - vscale = gtk_scale_new(GTK_ORIENTATION_VERTICAL, adj); + vscale = gtk_vscale_new(GTK_ADJUSTMENT(adj)); gtk_scale_set_draw_value(GTK_SCALE(vscale), FALSE); + gtk_widget_show(vscale); gtk_box_pack_start(GTK_BOX(vbox), vscale, TRUE, TRUE, 6); gtk_scale_set_value_pos(GTK_SCALE(vscale), GTK_POS_BOTTOM); gtk_scale_set_digits(GTK_SCALE(vscale), 0); - g_signal_connect(adj, "value_changed", - G_CALLBACK(ipga_volume_adjust), - (gpointer)(long)(i)); + gtk_signal_connect(GTK_OBJECT(adj), "value_changed", + GTK_SIGNAL_FUNC(ipga_volume_adjust), + (gpointer)(long)(i)); label = gtk_label_new("000"); av_ipga_volume_label[i] = (GtkLabel *)label; + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, TRUE, 6); } } @@ -1499,19 +1671,19 @@ int delete_card_number(GtkWidget *delete_button) gint card_nr; gint index; - if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (delete_button))) + if (!(GTK_TOGGLE_BUTTON (delete_button)->active)) return EXIT_SUCCESS; - card_nr = gtk_adjustment_get_value(card_number_adj); + card_nr = GTK_ADJUSTMENT (card_number_adj)->value; if ((card_nr < 0) || (card_nr >= MAX_CARD_NUMBERS)) { fprintf(stderr, "card number not in [0 ... %d]\n", MAX_CARD_NUMBERS - 1); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (delete_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (delete_button), FALSE); return -EINVAL; } res = delete_card(card_number, profiles_file_name); if (res < 0) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (delete_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (delete_button), FALSE); return res; } if (card_nr == card_number) { @@ -1521,7 +1693,7 @@ int delete_card_number(GtkWidget *delete_button) } } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (delete_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (delete_button), FALSE); return EXIT_SUCCESS; } @@ -1540,18 +1712,18 @@ int save_active_profile(GtkWidget *save_button) gint res; gint index; - if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (save_button))) + if (!(GTK_TOGGLE_BUTTON (save_button)->active)) return EXIT_SUCCESS; if ((index = index_active_profile()) >= 0) { res = save_restore(ALSACTL_OP_STORE, index + 1, card_number, profiles_file_name, \ gtk_entry_get_text(GTK_ENTRY (profiles_toggle_buttons[index].entry))); } else { fprintf(stderr, "No active profile found.\n"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (save_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (save_button), FALSE); return -EXIT_FAILURE; } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (save_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (save_button), FALSE); return res; } @@ -1562,21 +1734,21 @@ void entry_toggle_editable(GtkWidget *toggle_button, GtkWidget *entry) gint profile_number; if (active_button == toggle_button) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (toggle_button), TRUE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (toggle_button), TRUE); gtk_editable_set_editable(GTK_EDITABLE (entry), TRUE); gtk_widget_grab_focus(entry); return; - } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (toggle_button))) { + } else if (GTK_TOGGLE_BUTTON (toggle_button)->active) { active_button = toggle_button; } - gtk_editable_set_editable(GTK_EDITABLE (entry), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (toggle_button))); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (toggle_button))) { + gtk_editable_set_editable(GTK_EDITABLE (entry), GTK_TOGGLE_BUTTON (toggle_button)->active); + if (GTK_TOGGLE_BUTTON (toggle_button)->active) { gtk_widget_grab_focus(entry); profile_number = NOTFOUND; for (index = 0; index < MAX_PROFILES; index++) { if (profiles_toggle_buttons[index].toggle_button != toggle_button) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (profiles_toggle_buttons[index].toggle_button), FALSE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (profiles_toggle_buttons[index].toggle_button), FALSE); } else { profile_number = index + 1; } @@ -1599,25 +1771,28 @@ static GtkWidget *toggle_button_entry(const GtkWidget *parent, const gchar *prof GtkWidget *entry_label; GtkWidget *toggle_button; - box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + box = gtk_hbox_new(FALSE, 0); toggle_button = gtk_toggle_button_new(); - gtk_container_set_border_width(GTK_CONTAINER(toggle_button), 3); + gtk_container_border_width(GTK_CONTAINER(toggle_button), 3); profiles_toggle_buttons[index].entry = entry_label = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY (entry_label), MAX_PROFILE_NAME_LENGTH); gtk_entry_set_text(GTK_ENTRY (entry_label), profile_name); /* only the active profile can be modified */ gtk_editable_set_editable(GTK_EDITABLE (entry_label), FALSE); - g_signal_connect(entry_label, "activate", - G_CALLBACK (enter_callback), + gtk_signal_connect(GTK_OBJECT (entry_label), "activate", + GTK_SIGNAL_FUNC (enter_callback), (gpointer) entry_label); - g_signal_connect(toggle_button, "toggled", - G_CALLBACK (entry_toggle_editable), + gtk_signal_connect(GTK_OBJECT (toggle_button), "toggled", + GTK_SIGNAL_FUNC (entry_toggle_editable), (gpointer) entry_label); gtk_box_pack_start(GTK_BOX (box), entry_label, FALSE, FALSE, 20); + gtk_widget_show(entry_label); + gtk_widget_show(box); gtk_container_add(GTK_CONTAINER (toggle_button), box); + gtk_widget_show(toggle_button); return (toggle_button); } @@ -1631,7 +1806,7 @@ static void create_profiles(GtkWidget *main, GtkWidget *notebook, int page) GtkWidget *hbox1; GtkWidget *save_button; GtkWidget *delete_button; - GtkAdjustment *card_button_adj; + GtkObject *card_button_adj; GtkWidget *card_button; GtkWidget *scrolledwindow; GtkWidget *viewport; @@ -1641,72 +1816,83 @@ static void create_profiles(GtkWidget *main, GtkWidget *notebook, int page) gint max_profiles; gint max_digits; - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(notebook), hbox); label = gtk_label_new("Profiles"); + gtk_widget_show(label); gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), label); /* build scrolling area */ scrolledwindow = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolledwindow); gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); viewport = gtk_viewport_new(NULL, NULL); + gtk_widget_show(viewport); gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport); - hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(viewport), hbox); gtk_container_set_border_width(GTK_CONTAINER(hbox), 0); /* Create button boxes */ - vbox1 = gtk_button_box_new(GTK_ORIENTATION_VERTICAL); + vbox1 = gtk_vbutton_box_new(); + gtk_vbutton_box_set_spacing_default(0); for (index = 0; index < MAX_PROFILES; index++) { profile_name = get_profile_name(index + 1, card_number, profiles_file_name); profiles_toggle_buttons[index].toggle_button = toggle_button_entry(window, profile_name, index); gtk_box_pack_start(GTK_BOX (vbox1), profiles_toggle_buttons[index].toggle_button, FALSE, FALSE, 0); } - gtk_container_set_border_width(GTK_CONTAINER(vbox1), 6); + gtk_widget_show(vbox1); + gtk_container_border_width(GTK_CONTAINER(vbox1), 6); - vbox2 = gtk_button_box_new(GTK_ORIENTATION_VERTICAL); - gtk_container_set_border_width(GTK_CONTAINER(vbox2), 50); + vbox2 = gtk_vbutton_box_new(); + gtk_widget_show(vbox2); + gtk_container_border_width(GTK_CONTAINER(vbox2), 50); - hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox1 = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox2), hbox1, FALSE, FALSE, 20); label_card_nr = gtk_label_new("Card Number:"); + gtk_widget_show(label_card_nr); gtk_box_pack_start(GTK_BOX(hbox1), label_card_nr, FALSE, FALSE, 20); gtk_label_set_justify(GTK_LABEL(label_card_nr), GTK_JUSTIFY_LEFT); - card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 0); + card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 10); card_number_adj = card_button_adj; - card_button = gtk_spin_button_new(card_button_adj, 1, 0); + card_button = gtk_spin_button_new(GTK_ADJUSTMENT (card_button_adj), 1, 0); + gtk_widget_show(card_button); gtk_box_pack_start(GTK_BOX (hbox1), card_button, TRUE, FALSE, 0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON (card_button), TRUE); - gtk_adjustment_set_value(card_button_adj, card_number); + gtk_adjustment_set_value(GTK_ADJUSTMENT (card_button_adj), card_number); delete_button = gtk_toggle_button_new_with_label("Delete card from profiles"); + gtk_widget_show(delete_button); gtk_box_pack_start(GTK_BOX (vbox2), delete_button, FALSE, FALSE, 20); - g_signal_connect(delete_button, "toggled", - G_CALLBACK (delete_card_number), + gtk_signal_connect(GTK_OBJECT (delete_button), "toggled", + GTK_SIGNAL_FUNC (delete_card_number), NULL); save_button = gtk_toggle_button_new_with_label("Save active profile"); + gtk_widget_show(save_button); gtk_box_pack_end(GTK_BOX (vbox2), save_button, FALSE, FALSE, 20); - g_signal_connect(save_button, "toggled", - G_CALLBACK (save_active_profile), + gtk_signal_connect(GTK_OBJECT (save_button), "toggled", + GTK_SIGNAL_FUNC (save_active_profile), NULL); gtk_container_add(GTK_CONTAINER(hbox), vbox1); - gtk_widget_set_hexpand(vbox1, TRUE); gtk_container_add(GTK_CONTAINER(hbox), vbox2); - gtk_widget_set_hexpand(vbox2, TRUE); if (default_profile != NULL) { @@ -1729,7 +1915,7 @@ static void create_profiles(GtkWidget *main, GtkWidget *notebook, int page) profile_number = get_profile_number(default_profile, card_number, profiles_file_name); } if ((profile_number > 0) && (profile_number <= MAX_PROFILES)) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (profiles_toggle_buttons[profile_number - 1].toggle_button), TRUE); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON (profiles_toggle_buttons[profile_number - 1].toggle_button), TRUE); } else { fprintf(stderr, "Cannot find profile '%s' for card '%d'.\n", default_profile, card_number); } @@ -1746,23 +1932,27 @@ static void create_outer(GtkWidget *main) GtkWidget *drawing; /* Create digital mixer frame */ - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1); + vbox = gtk_vbox_new(FALSE, 1); + gtk_widget_show(vbox); gtk_box_pack_start(GTK_BOX(main), vbox, FALSE, FALSE, 0); label = gtk_label_new(" Rt-clk Menu >>"); - //gtk_widget_set_halign(label, GTK_ALIGN_START); - //gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + //gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 3); frame = gtk_frame_new("Digital Mixer"); + gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(frame), 6); /* Create controls in the digital mixer frame */ - vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + vbox = gtk_vbox_new(FALSE, 0); + gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); - hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + hbox1 = gtk_hbox_new(FALSE, 0); + gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 6); drawing = gtk_drawing_area_new(); @@ -1770,37 +1960,60 @@ static void create_outer(GtkWidget *main) gtk_widget_set_name(drawing, "DigitalMixer"); gtk_box_pack_start(GTK_BOX(hbox1), drawing, TRUE, FALSE, 6); if (tall_equal_mixer_ht > 1 ) { - gtk_widget_set_size_request(drawing, 60, 264 + 60 * (tall_equal_mixer_ht - 1)); + gtk_widget_set_usize(drawing, 60, 264 + 60 * (tall_equal_mixer_ht - 1)); } else { - gtk_widget_set_size_request(drawing, 60, 264); + gtk_widget_set_usize(drawing, 60, 264); } - g_signal_connect(drawing, "draw", - G_CALLBACK(level_meters_draw_callback), NULL); + gtk_signal_connect(GTK_OBJECT(drawing), "expose_event", + (GtkSignalFunc)level_meters_expose_event, NULL); + gtk_signal_connect(GTK_OBJECT(drawing), "configure_event", + (GtkSignalFunc)level_meters_configure_event, NULL); gtk_widget_set_events(drawing, GDK_EXPOSURE_MASK); + gtk_widget_show(drawing); - hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_box_set_homogeneous(GTK_BOX(hbox1), TRUE); + hbox1 = gtk_hbox_new(TRUE, 0); + gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox), hbox1, TRUE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox1), 6); label = gtk_label_new("Left"); - gtk_widget_set_halign(label, GTK_ALIGN_START); - gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0); label = gtk_label_new("Right"); - gtk_widget_set_halign(label, GTK_ALIGN_END); - gtk_widget_set_valign(label, GTK_ALIGN_CENTER); + gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); + gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0); mixer_clear_peaks_button = gtk_button_new_with_label("Reset Peaks"); + gtk_widget_show(mixer_clear_peaks_button); gtk_box_pack_start(GTK_BOX(vbox), mixer_clear_peaks_button, TRUE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(mixer_clear_peaks_button), 4); - g_signal_connect(mixer_clear_peaks_button, "clicked", - G_CALLBACK(level_meters_reset_peaks), NULL); + gtk_signal_connect(GTK_OBJECT(mixer_clear_peaks_button), "clicked", + GTK_SIGNAL_FUNC(level_meters_reset_peaks), NULL); }/* End create_outer */ +static void create_blank(GtkWidget *main, GtkWidget *notebook, int page) +{ +/* This is a little workaround for a problem with the pop-up menu. + For some reason the label of the last page is not accessed by the menu + so all it shows is 'page 7'. Here a blank extra page is created, unseen, + which seems to satisfy gtk, and we see the menu last page label correct. AH 12.7.2005 */ + + GtkWidget *label; + GtkWidget *hbox; + + hbox = gtk_hbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(notebook), hbox); + + label = gtk_label_new("Blank"); + gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), + gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), + label); +} + static void usage(void) { fprintf(stderr, "usage: envy24control [-c card#] [-D control-name] [-o num-outputs] [-i num-inputs] [-p num-pcm-outputs] [-s num-spdif-in/outs] [-v] [-f profiles-file] [profile name|profile id] [-m channel-num] [-w initial-window-width] [-t height-num]\n"); @@ -1822,7 +2035,6 @@ int main(int argc, char **argv) { GtkWidget *notebook; GtkWidget *outerbox; - GtkCssProvider *provider; char *name, tmpname[8], title[128]; int i, c, err; snd_ctl_card_info_t *hw_info; @@ -1964,7 +2176,7 @@ int main(int argc, char **argv) if (! name) { /* probe cards */ - static char cardname[16]; + static char cardname[8]; /* FIXME: hardcoded max number of cards */ for (card_number = 0; card_number < 8; card_number++) { sprintf(cardname, "hw:%d", card_number); @@ -2040,29 +2252,20 @@ int main(int argc, char **argv) fprintf(stderr, "using\t --- input_channels: %i\n\t --- output_channels: %i\n\t --- pcm_output_channels: %i\n\t --- spdif in/out channels: %i\n", \ input_channels, output_channels, pcm_output_channels, spdif_channels); - /* Reduce button padding so the mixers don't get so wide */ - provider = gtk_css_provider_new(); - gtk_css_provider_load_from_data(provider, - "button { padding-left: 6px; padding-right: 6px; }", - -1, NULL); - gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), - GTK_STYLE_PROVIDER(provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - g_object_unref(provider); - /* Make the title */ sprintf(title, "Envy24 Control Utility %s (%s)", VERSION, snd_ctl_card_info_get_longname(hw_info)); /* Create the main window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), title); - g_signal_connect(window, "delete_event", - G_CALLBACK(gtk_main_quit), NULL); + gtk_signal_connect(GTK_OBJECT (window), "delete_event", + (GtkSignalFunc) gtk_main_quit, NULL); signal(SIGINT, (void *)gtk_main_quit); gtk_window_set_default_size(GTK_WINDOW(window), wwidth, 300); - outerbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); + outerbox = gtk_hbox_new(FALSE, 3); + gtk_widget_show(outerbox); gtk_container_add(GTK_CONTAINER(window), outerbox); create_outer(outerbox); @@ -2071,7 +2274,8 @@ int main(int argc, char **argv) notebook = gtk_notebook_new(); gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE); gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook)); - gtk_box_pack_start(GTK_BOX(outerbox), notebook, TRUE, TRUE, 0); + gtk_widget_show(notebook); + gtk_container_add(GTK_CONTAINER(outerbox), notebook); page = 0; @@ -2083,34 +2287,30 @@ int main(int argc, char **argv) create_analog_volume(outerbox, notebook, page++); create_profiles(outerbox, notebook, page++); create_about(outerbox, notebook, page++); + create_blank(outerbox, notebook, page++); npfds = snd_ctl_poll_descriptors_count(ctl); if (npfds > 0) { pfds = alloca(sizeof(*pfds) * npfds); npfds = snd_ctl_poll_descriptors(ctl, pfds, npfds); - for (i = 0; i < npfds; i++) { - GIOChannel *channel = g_io_channel_unix_new(pfds[i].fd); - g_io_add_watch(channel, - G_IO_IN, - control_input_callback, - ctl); - g_io_channel_unref(channel); - } + for (i = 0; i < npfds; i++) + gdk_input_add(pfds[i].fd, + GDK_INPUT_READ, + control_input_callback, + ctl); snd_ctl_subscribe_events(ctl, 1); } if (midi_fd >= 0) { - GIOChannel *channel = g_io_channel_unix_new(midi_fd); - g_io_add_watch(channel, G_IO_IN, midi_process, NULL); - g_io_channel_unref(channel); + gdk_input_add(midi_fd, GDK_INPUT_READ, midi_process, NULL); } - g_timeout_add(40, level_meters_timeout_callback, NULL); - g_timeout_add(100, master_clock_status_timeout_callback, NULL); - g_timeout_add(100, internal_clock_status_timeout_callback, NULL); - g_timeout_add(100, rate_locking_status_timeout_callback, NULL); - g_timeout_add(100, rate_reset_status_timeout_callback, NULL); + gtk_timeout_add(40, level_meters_timeout_callback, NULL); + gtk_timeout_add(100, master_clock_status_timeout_callback, NULL); + gtk_timeout_add(100, internal_clock_status_timeout_callback, NULL); + gtk_timeout_add(100, rate_locking_status_timeout_callback, NULL); + gtk_timeout_add(100, rate_reset_status_timeout_callback, NULL); - gtk_widget_show_all(window); + gtk_widget_show(window); level_meters_postinit(); mixer_postinit(); diff --git a/envy24control/envy24control.h b/envy24control/envy24control.h index 0f887e7..f5c1e39 100644 --- a/envy24control/envy24control.h +++ b/envy24control/envy24control.h @@ -85,7 +85,7 @@ extern ice1712_eeprom_t card_eeprom; extern GtkWidget *mixer_mix_drawing; extern GtkWidget *mixer_clear_peaks_button; extern GtkWidget *mixer_drawing[20]; -extern GtkAdjustment *mixer_adj[20][2]; +extern GtkObject *mixer_adj[20][2]; extern GtkWidget *mixer_vscale[20][2]; extern GtkWidget *mixer_solo_toggle[20][2]; extern GtkWidget *mixer_mute_toggle[20][2]; @@ -108,7 +108,7 @@ extern GtkWidget *hw_master_clock_actual_rate_label; extern GtkWidget *hw_rate_locking_check; extern GtkWidget *hw_rate_reset_check; -extern GtkAdjustment *hw_volume_change_adj; +extern GtkObject *hw_volume_change_adj; extern GtkWidget *hw_volume_change_spin; extern GtkWidget *hw_spdif_profi_nonaudio_radio; @@ -151,9 +151,9 @@ extern GtkWidget *input_interface_internal; extern GtkWidget *input_interface_front_input; extern GtkWidget *input_interface_rear_input; extern GtkWidget *input_interface_wavetable; -extern GtkAdjustment *av_dac_volume_adj[]; -extern GtkAdjustment *av_adc_volume_adj[]; -extern GtkAdjustment *av_ipga_volume_adj[]; +extern GtkObject *av_dac_volume_adj[]; +extern GtkObject *av_adc_volume_adj[]; +extern GtkObject *av_ipga_volume_adj[]; extern GtkLabel *av_dac_volume_label[]; extern GtkLabel *av_adc_volume_label[]; extern GtkLabel *av_ipga_volume_label[]; @@ -163,7 +163,8 @@ extern GtkWidget *av_adc_sense_radio[][4]; /* flags */ extern int card_is_dmx6fire; -gboolean level_meters_draw_callback(GtkWidget *widget, cairo_t *cr, gpointer data); +gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event); +gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event); gint level_meters_timeout_callback(gpointer data); void level_meters_reset_peaks(GtkButton *button, gpointer data); void level_meters_init(void); @@ -237,5 +238,6 @@ void ipga_volume_adjust(GtkAdjustment *adj, gpointer data); void dac_sense_toggled(GtkWidget *togglebutton, gpointer data); void adc_sense_toggled(GtkWidget *togglebutton, gpointer data); -gboolean control_input_callback(GIOChannel *gio, GIOCondition condition, gpointer data); +void control_input_callback(gpointer data, gint source, GdkInputCondition condition); +void mixer_input_callback(gpointer data, gint source, GdkInputCondition condition); diff --git a/envy24control/hardware.c b/envy24control/hardware.c index 8db95c5..73e3f0a 100644 --- a/envy24control/hardware.c +++ b/envy24control/hardware.c @@ -14,7 +14,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" @@ -39,14 +39,7 @@ static inline int is_update_needed(void); static int is_active(GtkWidget *widget) { - return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0; -} - -static void label_set(GtkWidget* widget, const char* str) -{ - const char* old = gtk_label_get_text(GTK_LABEL(widget)); - if (strcmp(old, str)) - gtk_label_set_text(GTK_LABEL(widget), str); + return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0; } void master_clock_update(void) @@ -177,8 +170,8 @@ gint master_clock_status_timeout_callback(gpointer data) snd_ctl_elem_value_set_name(sw, "Word Clock Status"); if ((err = snd_ctl_elem_read(ctl, sw)) < 0) g_print("Unable to determine word clock status: %s\n", snd_strerror(err)); - label_set(hw_master_clock_status_label, - snd_ctl_elem_value_get_boolean(sw, 0) ? "No signal" : "Locked"); + gtk_label_set_text(GTK_LABEL(hw_master_clock_status_label), + snd_ctl_elem_value_get_boolean(sw, 0) ? "No signal" : "Locked"); return TRUE; } @@ -253,7 +246,7 @@ gint internal_clock_status_timeout_callback(gpointer data) } } } - label_set(hw_master_clock_actual_rate_label, label); + gtk_label_set_text(GTK_LABEL(hw_master_clock_actual_rate_label), label); return TRUE; } @@ -361,7 +354,7 @@ void volume_change_rate_adj(GtkAdjustment *adj, gpointer data) { int err; - snd_ctl_elem_value_set_integer(volume_rate, 0, gtk_adjustment_get_value(adj)); + snd_ctl_elem_value_set_integer(volume_rate, 0, adj->value); if ((err = snd_ctl_elem_write(ctl, volume_rate)) < 0) g_print("Unable to write volume change rate: %s\n", snd_strerror(err)); } @@ -462,9 +455,9 @@ void profi_stream_toggled(GtkWidget *togglebutton, gpointer data) return; iec958.status[1] &= ~IEC958_AES1_PRO_MODE; if (!strcmp(str, "NOTID")) { - iec958.status[1] |= IEC958_AES1_PRO_MODE_NOTID; + iec958.status[0] |= IEC958_AES1_PRO_MODE_STEREOPHONIC; } else if (!strcmp(str, "Stereo")) { - iec958.status[1] |= IEC958_AES1_PRO_MODE_STEREOPHONIC; + iec958.status[0] |= IEC958_AES1_PRO_MODE_NOTID; } snd_ctl_elem_value_set_iec958(spdif_output, &iec958); spdif_output_write(); @@ -507,7 +500,7 @@ void consumer_copyright_toggled(GtkWidget *togglebutton, gpointer data) if (!strcmp(str, "Copyright")) { iec958.status[0] &= ~IEC958_AES0_CON_NOT_COPYRIGHT; } else if (!strcmp(str, "Permitted")) { - iec958.status[0] |= IEC958_AES0_CON_NOT_COPYRIGHT; + iec958.status[1] |= IEC958_AES0_CON_NOT_COPYRIGHT; } snd_ctl_elem_value_set_iec958(spdif_output, &iec958); spdif_output_write(); @@ -524,9 +517,9 @@ void consumer_copy_toggled(GtkWidget *togglebutton, gpointer data) if (iec958.status[0] & IEC958_AES0_PROFESSIONAL) return; if (!strcmp(str, "1st")) { - iec958.status[1] &= ~IEC958_AES1_CON_ORIGINAL; + iec958.status[0] |= IEC958_AES1_CON_ORIGINAL; } else if (!strcmp(str, "Original")) { - iec958.status[1] |= IEC958_AES1_CON_ORIGINAL; + iec958.status[1] &= ~IEC958_AES1_CON_ORIGINAL; } snd_ctl_elem_value_set_iec958(spdif_output, &iec958); spdif_output_write(); @@ -546,7 +539,7 @@ void consumer_emphasis_toggled(GtkWidget *togglebutton, gpointer data) if (!strcmp(str, "No")) { iec958.status[0] |= IEC958_AES0_CON_EMPHASIS_NONE; } else if (!strcmp(str, "5015")) { - iec958.status[0] |= IEC958_AES0_CON_EMPHASIS_5015; + iec958.status[1] |= ~IEC958_AES0_CON_EMPHASIS_5015; } snd_ctl_elem_value_set_iec958(spdif_output, &iec958); spdif_output_write(); @@ -562,15 +555,15 @@ void consumer_category_toggled(GtkWidget *togglebutton, gpointer data) return; if (iec958.status[0] & IEC958_AES0_PROFESSIONAL) return; - iec958.status[1] &= ~IEC958_AES1_CON_CATEGORY; + iec958.status[0] &= ~IEC958_AES1_CON_CATEGORY; if (!strcmp(str, "DAT")) { - iec958.status[1] |= IEC958_AES1_CON_DAT; + iec958.status[0] |= IEC958_AES1_CON_DAT; } else if (!strcmp(str, "PCM")) { - iec958.status[1] |= IEC958_AES1_CON_PCM_CODER; + iec958.status[0] |= IEC958_AES1_CON_PCM_CODER; } else if (!strcmp(str, "CD")) { - iec958.status[1] |= IEC958_AES1_CON_IEC908_CD; + iec958.status[0] |= IEC958_AES1_CON_IEC908_CD; } else if (!strcmp(str, "General")) { - iec958.status[1] |= IEC958_AES1_CON_GENERAL; + iec958.status[0] |= IEC958_AES1_CON_GENERAL; } snd_ctl_elem_value_set_iec958(spdif_output, &iec958); spdif_output_write(); @@ -605,7 +598,7 @@ void spdif_output_toggled(GtkWidget *togglebutton, gpointer data) page = 1; } spdif_output_write(); - gtk_notebook_set_current_page(GTK_NOTEBOOK(hw_spdif_output_notebook), page); + gtk_notebook_set_page(GTK_NOTEBOOK(hw_spdif_output_notebook), page); spdif_output_update(); } } diff --git a/envy24control/levelmeters.c b/envy24control/levelmeters.c index c053995..fa44979 100644 --- a/envy24control/levelmeters.c +++ b/envy24control/levelmeters.c @@ -14,18 +14,18 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" -static GdkRGBA *penGreenShadow = NULL; -static GdkRGBA *penGreenLight = NULL; -static GdkRGBA *penOrangeShadow = NULL; -static GdkRGBA *penOrangeLight = NULL; -static GdkRGBA *penRedShadow = NULL; -static GdkRGBA *penRedLight = NULL; -static int level[22] = { 0 }; +static GdkGC *penGreenShadow[21] = { NULL, }; +static GdkGC *penGreenLight[21] = { NULL, }; +static GdkGC *penOrangeShadow[21] = { NULL, }; +static GdkGC *penOrangeLight[21] = { NULL, }; +static GdkGC *penRedShadow[21] = { NULL, }; +static GdkGC *penRedLight[21] = { NULL, }; +static GdkPixmap *pixmap[21] = { NULL, }; static snd_ctl_elem_value_t *peaks; extern int input_channels, output_channels, pcm_output_channels, spdif_channels, view_spdif_playback; @@ -50,19 +50,22 @@ static void get_levels(int idx, int *l1, int *l2) } } -static GdkRGBA *get_pen(int nRed, int nGreen, int nBlue) +static GdkGC *get_pen(int idx, int nRed, int nGreen, int nBlue) { - GdkRGBA *c; + GdkColor *c; + GdkGC *gc; - c = (GdkRGBA *)g_malloc(sizeof(GdkRGBA)); - c->red = nRed / 65535.0; - c->green = nGreen / 65535.0; - c->blue = nBlue / 65535.0; - c->alpha = 1.0; - return c; + c = (GdkColor *)g_malloc(sizeof(GdkColor)); + c->red = nRed; + c->green = nGreen; + c->blue = nBlue; + gdk_color_alloc(gdk_colormap_get_system(), c); + gc = gdk_gc_new(pixmap[idx]); + gdk_gc_set_foreground(gc, c); + return gc; } -static int get_index(const gchar *name) +static int get_index(gchar *name) { int result; @@ -76,7 +79,7 @@ static int get_index(const gchar *name) return result; } -static void redraw_meters(int idx, int width, int height, int level1, int level2, cairo_t *cr) +static void redraw_meters(int idx, int width, int height, int level1, int level2) { int stereo = idx == 0; int segment_width = stereo ? (width / 2) - 8 : width - 12; @@ -87,156 +90,167 @@ static void redraw_meters(int idx, int width, int height, int level1, int level2 int seg; int segs_on1 = ((segments * level1) + 128) / 255; int segs_on2 = ((segments * level2) + 128) / 255; - int end_seg; - GdkRectangle clip; // g_print("segs_on1 = %i (%i), segs_on2 = %i (%i)\n", segs_on1, level1, segs_on2, level2); - cairo_rectangle(cr, 0, 0, width, height); - cairo_fill(cr); - - gdk_cairo_get_clip_rectangle(cr, &clip); - seg = segments - (clip.y + clip.height) / 4; - if (seg < 0) - seg = 0; - segs_on1 -= seg; - segs_on2 -= seg; - end_seg = segments - (clip.y - 2) / 4; - - for (; seg < green_segments && seg < end_seg; seg++) { - gdk_cairo_set_source_rgba(cr, - segs_on1 > 0 ? penGreenLight : penGreenShadow); - cairo_rectangle(cr, - 6, 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - if (stereo) { - gdk_cairo_set_source_rgba(cr, - segs_on2 > 0 ? penGreenLight : penGreenShadow); - cairo_rectangle(cr, - 2 + (width / 2), - 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - } + for (seg = 0; seg < green_segments; seg++) { + gdk_draw_rectangle(pixmap[idx], + segs_on1 > 0 ? penGreenLight[idx] : penGreenShadow[idx], + TRUE, + 6, 3 + ((segments - seg - 1) * 4), + segment_width, + 3); + if (stereo) + gdk_draw_rectangle(pixmap[idx], + segs_on2 > 0 ? penGreenLight[idx] : penGreenShadow[idx], + TRUE, + 2 + (width / 2), + 3 + ((segments - seg - 1) * 4), + segment_width, + 3); segs_on1--; segs_on2--; } - for (; seg < green_segments + orange_segments && seg < end_seg; seg++) { - gdk_cairo_set_source_rgba(cr, - segs_on1 > 0 ? penOrangeLight : penOrangeShadow); - cairo_rectangle(cr, - 6, 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - if (stereo) { - gdk_cairo_set_source_rgba(cr, - segs_on2 > 0 ? penOrangeLight : penOrangeShadow); - cairo_rectangle(cr, - 2 + (width / 2), - 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - } + for (seg = green_segments; seg < green_segments + orange_segments; seg++) { + gdk_draw_rectangle(pixmap[idx], + segs_on1 > 0 ? penOrangeLight[idx] : penOrangeShadow[idx], + TRUE, + 6, 3 + ((segments - seg - 1) * 4), + segment_width, + 3); + if (stereo) + gdk_draw_rectangle(pixmap[idx], + segs_on2 > 0 ? penOrangeLight[idx] : penOrangeShadow[idx], + TRUE, + 2 + (width / 2), + 3 + ((segments - seg - 1) * 4), + segment_width, + 3); segs_on1--; segs_on2--; } - for (; seg < segments && seg < end_seg; seg++) { - gdk_cairo_set_source_rgba(cr, - segs_on1 > 0 ? penRedLight : penRedShadow); - cairo_rectangle(cr, - 6, 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - if (stereo) { - gdk_cairo_set_source_rgba(cr, - segs_on2 > 0 ? penRedLight : penRedShadow); - cairo_rectangle(cr, - 2 + (width / 2), - 3 + ((segments - seg - 1) * 4), - segment_width, - 3); - cairo_fill(cr); - } + for (seg = green_segments + orange_segments; seg < segments; seg++) { + gdk_draw_rectangle(pixmap[idx], + segs_on1 > 0 ? penRedLight[idx] : penRedShadow[idx], + TRUE, + 6, 3 + ((segments - seg - 1) * 4), + segment_width, + 3); + if (stereo) + gdk_draw_rectangle(pixmap[idx], + segs_on2 > 0 ? penRedLight[idx] : penRedShadow[idx], + TRUE, + 2 + (width / 2), + 3 + ((segments - seg - 1) * 4), + segment_width, + 3); segs_on1--; segs_on2--; } } -gboolean level_meters_draw_callback(GtkWidget *widget, cairo_t *cr, gpointer data) +gint level_meters_configure_event(GtkWidget *widget, GdkEventConfigure *event) +{ + int idx = get_index(gtk_widget_get_name(widget)); + + if (pixmap[idx] != NULL) + gdk_pixmap_unref(pixmap[idx]); + pixmap[idx] = gdk_pixmap_new(widget->window, + widget->allocation.width, + widget->allocation.height, + -1); + penGreenShadow[idx] = get_pen(idx, 0, 0x77ff, 0); + penGreenLight[idx] = get_pen(idx, 0, 0xffff, 0); + penOrangeShadow[idx] = get_pen(idx, 0xddff, 0x55ff, 0); + penOrangeLight[idx] = get_pen(idx, 0xffff, 0x99ff, 0); + penRedShadow[idx] = get_pen(idx, 0xaaff, 0, 0); + penRedLight[idx] = get_pen(idx, 0xffff, 0, 0); + gdk_draw_rectangle(pixmap[idx], + widget->style->black_gc, + TRUE, + 0, 0, + widget->allocation.width, + widget->allocation.height); + // g_print("configure: %i:%i\n", widget->allocation.width, widget->allocation.height); + redraw_meters(idx, widget->allocation.width, widget->allocation.height, 0, 0); + return TRUE; +} + +gint level_meters_expose_event(GtkWidget *widget, GdkEventExpose *event) { int idx = get_index(gtk_widget_get_name(widget)); int l1, l2; get_levels(idx, &l1, &l2); - redraw_meters(idx, gtk_widget_get_allocated_width(widget), gtk_widget_get_allocated_height(widget), l1, l2, cr); + redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2); + gdk_draw_pixmap(widget->window, + widget->style->black_gc, + pixmap[idx], + event->area.x, event->area.y, + event->area.x, event->area.y, + event->area.width, event->area.height); return FALSE; } -static void update_meter(int idx) -{ - int stereo = idx == 0; - GtkWidget *widget = stereo ? mixer_mix_drawing : mixer_drawing[idx - 1]; - int width = gtk_widget_get_allocated_width(widget); - int height = gtk_widget_get_allocated_height(widget); - int segments = (height - 6) / 4; - int level_idx = stereo ? 20 : idx - 1; - int l1, l2, segs_on, old_segs_on, h; - - get_levels(idx, &l1, &l2); - segs_on = ((segments * l1) + 128) / 255; - old_segs_on = ((segments * level[level_idx]) + 128) / 255; - h = abs(old_segs_on - segs_on); - level[level_idx] = l1; - - if (h > 0) { - int y = segments - MAX(old_segs_on, segs_on); - gtk_widget_queue_draw_area(widget, - 6, 4 * y + 3, - stereo ? (width / 2) - 8 : width - 12, - 4 * h - 1); - } - - if (stereo) { - level_idx++; - segs_on = ((segments * l2) + 128) / 255; - old_segs_on = ((segments * level[level_idx]) + 128) / 255; - h = abs(old_segs_on - segs_on); - level[level_idx] = l2; - - if (h > 0) { - int y = segments - MAX(old_segs_on, segs_on); - gtk_widget_queue_draw_area(widget, - 2 + (width / 2), 4 * y + 3, - (width / 2) - 8, - 4 * h - 1); - } - } -} - gint level_meters_timeout_callback(gpointer data) { - int idx; + GtkWidget *widget; + int idx, l1, l2; update_peak_switch(); for (idx = 0; idx <= pcm_output_channels; idx++) { - update_meter(idx); + get_levels(idx, &l1, &l2); + widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1]; + if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) { + redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2); + gdk_draw_pixmap(widget->window, + widget->style->black_gc, + pixmap[idx], + 0, 0, + 0, 0, + widget->allocation.width, widget->allocation.height); + } } if (view_spdif_playback) { for (idx = MAX_PCM_OUTPUT_CHANNELS + 1; idx <= MAX_OUTPUT_CHANNELS + spdif_channels; idx++) { - update_meter(idx); + get_levels(idx, &l1, &l2); + widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1]; + if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) { + redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2); + gdk_draw_pixmap(widget->window, + widget->style->black_gc, + pixmap[idx], + 0, 0, + 0, 0, + widget->allocation.width, widget->allocation.height); + } } } for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1; idx <= input_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS; idx++) { - update_meter(idx); + get_levels(idx, &l1, &l2); + widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1]; + if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) { + redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2); + gdk_draw_pixmap(widget->window, + widget->style->black_gc, + pixmap[idx], + 0, 0, + 0, 0, + widget->allocation.width, widget->allocation.height); + } } for (idx = MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + 1; \ idx <= spdif_channels + MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS; idx++) { - update_meter(idx); + get_levels(idx, &l1, &l2); + widget = idx == 0 ? mixer_mix_drawing : mixer_drawing[idx-1]; + if (GTK_WIDGET_VISIBLE(widget) && (pixmap[idx] != NULL)) { + redraw_meters(idx, widget->allocation.width, widget->allocation.height, l1, l2); + gdk_draw_pixmap(widget->window, + widget->style->black_gc, + pixmap[idx], + 0, 0, + 0, 0, + widget->allocation.width, widget->allocation.height); + } } return TRUE; } @@ -256,13 +270,6 @@ void level_meters_init(void) /* older ALSA driver, using MIXER type */ snd_ctl_elem_value_set_interface(peaks, SND_CTL_ELEM_IFACE_MIXER); - - penGreenShadow = get_pen(0, 0x77ff, 0); - penGreenLight = get_pen(0, 0xffff, 0); - penOrangeShadow = get_pen(0xddff, 0x55ff, 0); - penOrangeLight = get_pen(0xffff, 0x99ff, 0); - penRedShadow = get_pen(0xaaff, 0, 0); - penRedLight = get_pen(0xffff, 0, 0); } void level_meters_postinit(void) diff --git a/envy24control/midi.c b/envy24control/midi.c index dce8d46..327f6cf 100644 --- a/envy24control/midi.c +++ b/envy24control/midi.c @@ -15,7 +15,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include @@ -243,7 +243,7 @@ int midi_init(char *appname, int channel, int midi_enhanced) void mixer_adjust(GtkAdjustment *adj, gpointer data); void mixer_set_mute(int stream, int left, int right); -gboolean midi_process(GIOChannel *gio, GIOCondition condition, gpointer data) +void midi_process(gpointer data, gint source, GdkInputCondition condition) { snd_seq_event_t *ev; static GtkAdjustment *adj=0; @@ -306,7 +306,6 @@ gboolean midi_process(GIOChannel *gio, GIOCondition condition, gpointer data) snd_seq_free_event(ev); } while (snd_seq_event_input_pending(seq, 0) > 0); - return TRUE; } /* ************************************************* */ diff --git a/envy24control/midi.h b/envy24control/midi.h index b71eafd..f821d42 100644 --- a/envy24control/midi.h +++ b/envy24control/midi.h @@ -7,7 +7,7 @@ int midi_init(char *appname, int channel, int midi_enhanced); int midi_close(); void midi_maxstreams(int); int midi_controller(int c, int v); -gboolean midi_process(GIOChannel *gio, GIOCondition condition, gpointer data); +void midi_process(gpointer data, gint source, GdkInputCondition condition); int midi_button(int b, int v); #endif diff --git a/envy24control/mixer.c b/envy24control/mixer.c index 46171cc..f2b4e9a 100644 --- a/envy24control/mixer.c +++ b/envy24control/mixer.c @@ -14,7 +14,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" @@ -39,7 +39,7 @@ extern int input_channels, output_channels, pcm_output_channels, spdif_channels, static int is_active(GtkWidget *widget) { - return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0; + return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0; } void mixer_update_stream(int stream, int vol_flag, int sw_flag) @@ -181,10 +181,10 @@ void mixer_adjust(GtkAdjustment *adj, gpointer data) int stereo = is_active(mixer_stereo_toggle[stream-1]) ? 1 : 0; int vol[2] = { -1, -1 }; - vol[button] = 96 - gtk_adjustment_get_value(adj); + vol[button] = 96 - adj->value; if (stereo) { - gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), gtk_adjustment_get_value(adj)); - vol[button ^ 1] = 96 - gtk_adjustment_get_value(adj); + gtk_adjustment_set_value(GTK_ADJUSTMENT(mixer_adj[stream-1][button ^ 1]), adj->value); + vol[button ^ 1] = 96 - adj->value; } set_volume1(stream, vol[0], vol[1]); } diff --git a/envy24control/new_process.c b/envy24control/new_process.c index 2168489..7ea89a6 100644 --- a/envy24control/new_process.c +++ b/envy24control/new_process.c @@ -20,9 +20,9 @@ int new_process(char * const cmd_line[MAX_PARAM]) struct stat file_status; /* memory for storage of function pointers from the signal handling routines */ - void (*int_stat)(int); - void (*quit_stat)(int); - void (*usr2_stat)(int); + void (*int_stat)(); + void (*quit_stat)(); + void (*usr2_stat)(); /* * check command file diff --git a/envy24control/patchbay.c b/envy24control/patchbay.c index 57ddf13..88f697d 100644 --- a/envy24control/patchbay.c +++ b/envy24control/patchbay.c @@ -14,7 +14,7 @@ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ******************************************************************************/ #include "envy24control.h" @@ -30,7 +30,7 @@ extern int output_channels, input_channels, pcm_output_channels, spdif_channels; static int is_active(GtkWidget *widget) { - return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)) ? 1 : 0; + return GTK_TOGGLE_BUTTON(widget)->active ? 1 : 0; } static int get_toggle_index(int stream) diff --git a/envy24control/profiles.c b/envy24control/profiles.c index 9e5cde1..443e475 100644 --- a/envy24control/profiles.c +++ b/envy24control/profiles.c @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -54,9 +54,9 @@ void subst_tilde_in_filename(char * const filename) if ((pos_after_tilde = strchr(filename, '~')) != NULL) { pos_after_tilde++; - strncpy(new_filename, getenv("HOME"), sizeof(new_filename) - 1); - strncpy(new_filename + strlen(new_filename), pos_after_tilde, sizeof(new_filename) - strlen(new_filename) - 1); - new_filename[sizeof(new_filename) - 1] = '\0'; + strncpy(new_filename, getenv("HOME"), MAX_FILE_NAME_LENGTH); + strncpy(new_filename + strlen(new_filename), pos_after_tilde, MAX_FILE_NAME_LENGTH - strlen(new_filename)); + new_filename[MAX_FILE_NAME_LENGTH - 1] = '\0'; strncpy(filename, new_filename, MAX_FILE_NAME_LENGTH); } } @@ -78,9 +78,7 @@ int which_cfgfile(char ** const cfgfile) (inputFile = fopen(SYS_PROFILERC, "r")) == NULL) { res = -ENOENT; } else { - if (inputFile != NULL) { - fclose(inputFile); - } + fclose(inputFile); *cfgfile = SYS_PROFILERC; res = EXIT_SUCCESS; } @@ -96,9 +94,7 @@ int get_file_size(const char * const filename) { struct stat file_status; - if (filename_without_tilde != filename) { - strncpy(filename_without_tilde, filename, MAX_FILE_NAME_LENGTH); - } + strncpy(filename_without_tilde, filename, MAX_FILE_NAME_LENGTH); filename_without_tilde[MAX_FILE_NAME_LENGTH - 1] = '\0'; subst_tilde_in_filename(filename_without_tilde); if (stat(filename_without_tilde, &file_status) < 0) { @@ -474,8 +470,7 @@ int get_pos_name_header_from_card(const char * const buffer, const int profile_n char place_holder; int pos_card_begin, pos_card_end, pos_name_header; - if ((pos_card_begin = get_card_begin(buffer, profile_number, card_number)) < 0) - return pos_card_begin; + pos_card_begin = get_card_begin(buffer, profile_number, card_number); pos_card_end = get_card_end(buffer, profile_number, card_number); place_holder = PLACE_HOLDER_STR; strncpy(header, PROFILE_NAME_TEMPL, MAX_SEARCH_FIELD_LENGTH); @@ -527,7 +522,7 @@ int reorganize_profiles(char * const buffer, const int max_length) { int profile_number, card_number, card_number_max; int res; - int pos_profile_begin, pos_card_begin, pos_card_end, pos_name_header; + int pos_profile_begin, pos_profile_end, pos_card_begin, pos_card_end, pos_name_header; int pos_alsa_section_begin, pos_after_alsa_section; char header[MAX_SEARCH_FIELD_LENGTH]; void *buffer_copy = NULL; @@ -552,6 +547,7 @@ int reorganize_profiles(char * const buffer, const int max_length) compose_search_string(header, PROFILE_HEADER_TEMPL, profile_or_card_number_as_str, place_holder, MAX_SEARCH_FIELD_LENGTH); header[MAX_SEARCH_FIELD_LENGTH - 1] = '\0'; snprintf(buffer_copy + strlen(buffer_copy), max_length - strlen(buffer_copy), "%s\n", header); + pos_profile_end = get_profile_end(buffer, profile_number); /* search max card number in profile */ card_number_max = get_max_card_number_in_profile(buffer, profile_number); for (card_number = 0; card_number <= card_number_max; card_number++) @@ -645,9 +641,9 @@ int save_restore_alsactl_settings(char * const tmpfile, const int card_number, c void compose_tmpfile_name(char * const tmpfile, const char * const cfgfile) { - strncpy(tmpfile, cfgfile, MAX_FILE_NAME_LENGTH - 1); + strncpy(tmpfile, cfgfile, MAX_FILE_NAME_LENGTH); tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0'; - strncpy(tmpfile + strlen(tmpfile), "_alsactl_tmp", MAX_FILE_NAME_LENGTH - strlen(tmpfile) - 1); + strncpy(tmpfile + strlen(tmpfile), "_alsactl_tmp", MAX_FILE_NAME_LENGTH - strlen(tmpfile)); tmpfile[MAX_FILE_NAME_LENGTH - 1] = '\0'; } @@ -1149,16 +1145,13 @@ int save_restore(const char * const operation, const int profile_number, const i fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number); return -errno; } - close(res); unlink(cfgfile); } else { - close(res); if ((res = open(cfgfile, O_RDWR | 0400000 /* O_NOFOLLOW */, FILE_CREA_MODE)) < 0) { fprintf(stderr, "Cannot open configuration file '%s' for writing.\n", cfgfile); fprintf(stderr, "Cannot save settings for card '%d' in profile '%d'.\n", card_number, profile_number); return -errno; } - close(res); } res = save_profile(profile_number, card_number, profile_name, cfgfile); } else if (!strcmp(operation, ALSACTL_OP_RESTORE)) { diff --git a/envy24control/profiles.h b/envy24control/profiles.h index b586291..2063bff 100644 --- a/envy24control/profiles.h +++ b/envy24control/profiles.h @@ -44,7 +44,7 @@ #define MAX_PROFILE_SIZE 32768 #define MAX_SEARCH_FIELD_LENGTH 1024 #define MAX_FILE_NAME_LENGTH 1024 -#define MAX_NUM_STR_LENGTH 11 +#define MAX_NUM_STR_LENGTH 10 #define TOKEN_SEP "|" #define SEP_CHAR ' ' diff --git a/envy24control/strstr_icase_blank.c b/envy24control/strstr_icase_blank.c index 6b7c500..4c325cf 100644 --- a/envy24control/strstr_icase_blank.c +++ b/envy24control/strstr_icase_blank.c @@ -16,7 +16,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -48,7 +48,6 @@ int strstr_icase_blank(const char * const string1, const char * const string2) char search_string[MAX_SEARCH_FIELD_LENGTH]; char *pstr; int pos_first_non_blank; - size_t len; strncpy(search_string, string2, MAX_SEARCH_FIELD_LENGTH); search_string[MAX_SEARCH_FIELD_LENGTH - 1] = '\0'; @@ -85,11 +84,7 @@ int strstr_icase_blank(const char * const string1, const char * const string2) } } } - len = strlen(search_string); - if (len > sizeof(search_string) - 1) - len = sizeof(search_string) - 1; - strncpy(search_string, cmp_line, len); - search_string[len] = '\0'; + strncpy(search_string, cmp_line, strlen(search_string)); position = 0; while (position < strlen(string1)) diff --git a/envy24control/volume.c b/envy24control/volume.c index b071ad6..4386e35 100644 --- a/envy24control/volume.c +++ b/envy24control/volume.c @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "envy24control.h" @@ -217,7 +217,7 @@ void dac_volume_adjust(GtkAdjustment *adj, gpointer data) { int idx = (int)(long)data; snd_ctl_elem_value_t *val; - int err, ival = -(int)gtk_adjustment_get_value(adj); + int err, ival = -(int)adj->value; char text[16]; snd_ctl_elem_value_alloca(&val); @@ -235,7 +235,7 @@ void adc_volume_adjust(GtkAdjustment *adj, gpointer data) { int idx = (int)(long)data; snd_ctl_elem_value_t *val; - int err, ival = -(int)gtk_adjustment_get_value(adj); + int err, ival = -(int)adj->value; char text[16]; snd_ctl_elem_value_alloca(&val); @@ -253,7 +253,7 @@ void ipga_volume_adjust(GtkAdjustment *adj, gpointer data) { int idx = (int)(long)data; snd_ctl_elem_value_t *val; - int err, ival = -(int)gtk_adjustment_get_value(adj); + int err, ival = -(int)adj->value; char text[16]; snd_ctl_elem_value_alloca(&val); diff --git a/hda-verb/hda_hwdep.h b/hda-verb/hda_hwdep.h index c603724..1c0034e 100644 --- a/hda-verb/hda_hwdep.h +++ b/hda-verb/hda_hwdep.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __SOUND_HDA_HWDEP_H diff --git a/hdajackretask/Makefile.am b/hdajackretask/Makefile.am index a9f0a67..e313159 100644 --- a/hdajackretask/Makefile.am +++ b/hdajackretask/Makefile.am @@ -1,4 +1,3 @@ -SUBDIRS = desktop EXTRA_DIST = gitcompile README AM_CFLAGS = @GTK3_CFLAGS@ -Wno-deprecated-declarations bin_PROGRAMS = hdajackretask @@ -22,3 +21,4 @@ alsa-dist: distdir @mkdir -p ../distdir/hdajackretask @cp -RLpv $(distdir)/* ../distdir/hdajackretask @rm -rf $(distdir) + diff --git a/hdajackretask/README b/hdajackretask/README index bd6244b..209e332 100644 --- a/hdajackretask/README +++ b/hdajackretask/README @@ -51,4 +51,4 @@ This is for the experts only. It makes you select each configuration field indiv http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf ) * Parser hints -This enables you to send special "hints" to the driver that causes parsing to behave differently. Leave them at the "default" setting unless you have read the driver documentation. ( Which, at the time of this writing, is available here: https://www.kernel.org/doc/Documentation/sound/hd-audio/notes.rst - see the "Hint strings" section. ) +This enables you to send special "hints" to the driver that causes parsing to behave differently. Leave them at the "default" setting unless you have read the driver documentation. ( Which, at the time of this writing, is available here: https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt - see the "Hint strings" section. ) diff --git a/hdajackretask/apply-changes.c b/hdajackretask/apply-changes.c index 381ccf2..aa291ce 100644 --- a/hdajackretask/apply-changes.c +++ b/hdajackretask/apply-changes.c @@ -15,15 +15,6 @@ static gchar* tempdir = NULL; static gchar* scriptfile = NULL; static gchar* errorfile = NULL; -struct soundserver { - enum { - PULSEAUDIO, - PIPEWIRE - } type; - gboolean was_killed; - gchar *user; -}; - static GQuark quark() { return g_quark_from_static_string("hda-jack-retask-error"); @@ -134,73 +125,33 @@ static gchar* get_pulseaudio_client_conf() return fname; } -static gboolean call_systemctl(gchar* user, gchar* operation, gchar *unit, GError **err) -{ - gchar* s; - gboolean ok; - - if (getuid() == 0) { - // special case for root - // XDG_RUNTIME_DIR setup seems to be mandatory for Fedora, may differ for other distros - s = g_strdup_printf("runuser -l %s -c 'XDG_RUNTIME_DIR=/var/run/user/$(id -u) systemctl --user %s %s'", user, operation, unit); - } else { - s = g_strdup_printf("systemctl --user %s %s", operation, unit); - } - ok = g_spawn_command_line_sync(s, NULL, NULL, NULL, err); - g_free(s); - return ok; -} - -static gboolean kill_soundserver(struct soundserver* state, int card, GError** err) +static gboolean kill_pulseaudio(gboolean* was_killed, int card, GError** err) { gchar* fuser = NULL, *fuser2 = NULL; gchar* s = NULL; gchar* clientconf = NULL; gboolean ok; - char *p; - state->type = PULSEAUDIO; - state->was_killed = FALSE; - state->user = NULL; + *was_killed = FALSE; /* Is PA having a lock on the sound card? */ s = g_strdup_printf("fuser -v /dev/snd/controlC%d", card); /* Due to some bug in fuser, stdout and stderr output is unclear. Better check both. */ if (!(ok = g_spawn_command_line_sync(s, &fuser, &fuser2, NULL, err))) goto cleanup; - if (strstr(fuser, "pulseaudio") != NULL || strstr(fuser2, "pulseaudio") != NULL) { - clientconf = get_pulseaudio_client_conf(); - if (!(ok = !g_file_test(clientconf, G_FILE_TEST_EXISTS))) { - g_set_error(err, quark(), 0, "Cannot block PulseAudio from respawning:\n" - "Please either remove '%s' or kill PulseAudio manually.", clientconf); - goto cleanup; - } - - if (!(ok = g_file_set_contents(clientconf, "autospawn=no\n", -1, err))) - goto cleanup; - state->was_killed = TRUE; - ok = g_spawn_command_line_sync("pulseaudio -k", NULL, NULL, NULL, err); - } else if ((p = strstr(fuser, "wireplumber")) != NULL || (p = strstr(fuser2, "wireplumber")) != NULL) { - *p = '\0'; - while (p != fuser && p != fuser2 && *p != '\n') - p--; - if (*p == '\n') - p++; - - GRegex *regex; - GMatchInfo *match_info; + if ((ok = strstr(fuser, "pulseaudio") == NULL && strstr(fuser2, "pulseaudio") == NULL)) + goto cleanup; // PulseAudio not locking the sound card - regex = g_regex_new (" ([a-zA-Z0-9_-]+) ", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL); - g_regex_match (regex, p, 0, &match_info); - if (g_match_info_matches (match_info)) - state->user = g_match_info_fetch (match_info, 1); - g_match_info_free (match_info); - g_regex_unref (regex); - - state->type = PIPEWIRE; - ok = call_systemctl(state->user, "stop", "wireplumber.service", err); - state->was_killed = ok; - } else { - // Sound server not locking the sound card + clientconf = get_pulseaudio_client_conf(); + if (!(ok = !g_file_test(clientconf, G_FILE_TEST_EXISTS))) { + g_set_error(err, quark(), 0, "Cannot block PulseAudio from respawning:\n" + "Please either remove '%s' or kill PulseAudio manually.", clientconf); + goto cleanup; } + + if (!(ok = g_file_set_contents(clientconf, "autospawn=no\n", -1, err))) + goto cleanup; + + *was_killed = TRUE; + ok = g_spawn_command_line_sync("pulseaudio -k", NULL, NULL, NULL, err); cleanup: g_free(clientconf); @@ -210,34 +161,16 @@ cleanup: return ok; } -static gboolean restore_soundserver(struct soundserver* state, GError** err) +static gboolean restore_pulseaudio(gboolean was_killed, GError** err) { - gboolean ok = FALSE; - gchar* clientconf; - - switch (state->type) { - case PULSEAUDIO: - clientconf = get_pulseaudio_client_conf(); - if (state->was_killed && g_unlink(clientconf) != 0) { - g_set_error(err, quark(), 0, "%s", g_strerror(errno)); - g_free(clientconf); - goto cleanup; - } - g_free(clientconf); - ok = TRUE; - break; - case PIPEWIRE: - if (state->was_killed) - ok = call_systemctl(state->user, "start", "wireplumber.service", err); - else - ok = TRUE; - break; + gchar* clientconf = get_pulseaudio_client_conf(); + if (was_killed && g_unlink(clientconf) != 0) { + g_set_error(err, quark(), 0, "%s", g_strerror(errno)); + g_free(clientconf); + return FALSE; } - -cleanup: - g_free(state->user); - state->user = NULL; - return ok; + g_free(clientconf); + return TRUE; } gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int device, @@ -245,10 +178,10 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int { gboolean result = FALSE; // gchar* script_name = NULL; - struct soundserver state = { 0 }; + gboolean pa_killed = FALSE; /* Check for users of the sound card */ /* Kill pulseaudio if necessary (and possible) */ - if (!kill_soundserver(&state, card, err)) + if (!kill_pulseaudio(&pa_killed, card, err)) goto cleanup; /* Create script */ if (!create_reconfig_script(pins, entries, card, device, model, hints, err)) @@ -258,7 +191,7 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int goto cleanup; result = TRUE; cleanup: - if (!restore_soundserver(&state, result ? err : NULL)) { + if (!restore_pulseaudio(pa_killed, result ? err : NULL)) { result = FALSE; } // g_free(script_name); diff --git a/hdajackretask/apply-changes.h b/hdajackretask/apply-changes.h index e431a0d..e08d66d 100644 --- a/hdajackretask/apply-changes.h +++ b/hdajackretask/apply-changes.h @@ -9,7 +9,7 @@ gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int gboolean apply_changes_boot(pin_configs_t* pins, int entries, int card, int device, const char* model, const char* hints, GError** err); -gboolean reset_changes_boot(GError ** err); +gboolean reset_changes_boot(); #endif diff --git a/hdajackretask/configure.ac b/hdajackretask/configure.ac index f836306..050c731 100644 --- a/hdajackretask/configure.ac +++ b/hdajackretask/configure.ac @@ -8,4 +8,4 @@ AC_HEADER_STDC PKG_CHECK_MODULES(GTK3, gtk+-3.0) -AC_OUTPUT(Makefile desktop/Makefile) +AC_OUTPUT(Makefile) diff --git a/hdajackretask/desktop/Makefile.am b/hdajackretask/desktop/Makefile.am deleted file mode 100644 index 263d892..0000000 --- a/hdajackretask/desktop/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -APPNAME = hdajackretask - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_48x48_$(APPNAME).png \ - hicolor_apps_128x128_$(APPNAME).png \ - hicolor_apps_256x256_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/hdajackretask/desktop/hdajackretask.desktop b/hdajackretask/desktop/hdajackretask.desktop deleted file mode 100644 index f45ba06..0000000 --- a/hdajackretask/desktop/hdajackretask.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=HDAJackRetask -GenericName=Retask the audio jacks for the HDA sound driver -Exec=hdajackretask -Terminal=false -Type=Application -Categories=AudioVideo; -Version=0.9.4 diff --git a/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png deleted file mode 100644 index b95d433..0000000 Binary files a/hdajackretask/desktop/hicolor_apps_128x128_hdajackretask.png and /dev/null differ diff --git a/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png deleted file mode 100644 index 686215f..0000000 Binary files a/hdajackretask/desktop/hicolor_apps_256x256_hdajackretask.png and /dev/null differ diff --git a/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png b/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png deleted file mode 100644 index 875456c..0000000 Binary files a/hdajackretask/desktop/hicolor_apps_48x48_hdajackretask.png and /dev/null differ diff --git a/hdajackretask/main-gtk.c b/hdajackretask/main-gtk.c index c561f57..f5ff6e4 100644 --- a/hdajackretask/main-gtk.c +++ b/hdajackretask/main-gtk.c @@ -519,7 +519,7 @@ static void documentation_clicked(GtkWidget* sender, ui_data_t* ui) int neww = screen ? (gdk_screen_get_width(screen)*3)/4 : 800; int newh = screen ? (gdk_screen_get_height(screen)*3)/4 : 600; - gtk_window_set_default_size(GTK_WINDOW(dlg), MIN(1600, neww), MIN(1000, newh)); + gtk_window_set_default_size(GTK_WINDOW(dlg), neww, newh); } gtk_dialog_run(dlg); diff --git a/hdajacksensetest/Makefile.am b/hdajacksensetest/Makefile.am index 893b4e1..795373c 100644 --- a/hdajacksensetest/Makefile.am +++ b/hdajacksensetest/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST = gitcompile MYNAME = hdajacksensetest AUTOMAKE_OPTIONS = foreign bin_PROGRAMS = hdajacksensetest diff --git a/hdspconf/COPYING b/hdspconf/COPYING index 623b625..d60c31a 100644 --- a/hdspconf/COPYING +++ b/hdspconf/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/hdspconf/Makefile.am b/hdspconf/Makefile.am index 3fdfb34..e4a4bd8 100644 --- a/hdspconf/Makefile.am +++ b/hdspconf/Makefile.am @@ -1,5 +1,8 @@ -EXTRA_DIST = gitcompile depcomp -SUBDIRS = src pixmaps desktop +EXTRA_DIST = gitcompile hdspconf.desktop depcomp +SUBDIRS = src pixmaps + +desktopdir = $(DESKTOP_DIR) +desktop_DATA = hdspconf.desktop alsa-dist: distdir @rm -rf ../distdir/hdspconf diff --git a/hdspconf/configure.ac b/hdspconf/configure.ac index e11d481..f0b0c95 100644 --- a/hdspconf/configure.ac +++ b/hdspconf/configure.ac @@ -39,4 +39,4 @@ FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags` CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS" LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS" -AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile desktop/Makefile) +AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile) diff --git a/hdspconf/desktop/Makefile.am b/hdspconf/desktop/Makefile.am deleted file mode 100644 index c143498..0000000 --- a/hdspconf/desktop/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -APPNAME = hdspconf - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_48x48_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/hdspconf/desktop/hdspconf.desktop b/hdspconf/hdspconf.desktop similarity index 57% rename from hdspconf/desktop/hdspconf.desktop rename to hdspconf/hdspconf.desktop index 3ce6429..732745c 100644 --- a/hdspconf/desktop/hdspconf.desktop +++ b/hdspconf/hdspconf.desktop @@ -1,8 +1,10 @@ [Desktop Entry] +Encoding=UTF-8 Name=HDSPConf Comment=Hammerfall DSP control application Exec=hdspconf -Icon=hdspconf +FilePattern=hdspconf +Icon=hdspconf.png Terminal=false Type=Application -Categories=AudioVideo; +Categories=Application;AudioVideo; diff --git a/hdspconf/pixmaps/Makefile.am b/hdspconf/pixmaps/Makefile.am index 7278f3b..d8b3822 100644 --- a/hdspconf/pixmaps/Makefile.am +++ b/hdspconf/pixmaps/Makefile.am @@ -1 +1,4 @@ -EXTRA_DIST = $(wildcard *.xpm) +pixmapdir = $(PIXMAP_DIR) +pixmap_DATA = hdspconf.png + +EXTRA_DIST = $(wildcard *.xpm) hdspconf.png diff --git a/hdspconf/desktop/hicolor_apps_48x48_hdspconf.png b/hdspconf/pixmaps/hdspconf.png similarity index 100% rename from hdspconf/desktop/hicolor_apps_48x48_hdspconf.png rename to hdspconf/pixmaps/hdspconf.png diff --git a/hdspconf/src/HC_AboutText.h b/hdspconf/src/HC_AboutText.h index 1b579e5..2a76c40 100644 --- a/hdspconf/src/HC_AboutText.h +++ b/hdspconf/src/HC_AboutText.h @@ -32,7 +32,7 @@ public: HC_AboutText(int x, int y, int w, int h); void draw(); private: - const char *text; + char *text; }; #endif diff --git a/hdspconf/src/HC_Aeb.cxx b/hdspconf/src/HC_Aeb.cxx index 6df4848..d7a98d6 100644 --- a/hdspconf/src/HC_Aeb.cxx +++ b/hdspconf/src/HC_Aeb.cxx @@ -21,7 +21,7 @@ #pragma implementation #include "HC_Aeb.h" -static void setAebStatus(const char *ctl_name, int val, int card_index) +static void setAebStatus(char *ctl_name, int val, int card_index) { int err; char card_name[6]; diff --git a/hdspconf/src/HC_SpdifOut.cxx b/hdspconf/src/HC_SpdifOut.cxx index 674140b..71c7bfe 100644 --- a/hdspconf/src/HC_SpdifOut.cxx +++ b/hdspconf/src/HC_SpdifOut.cxx @@ -21,7 +21,7 @@ #pragma implementation #include "HC_SpdifOut.h" -static void setSpdifBit(const char *ctl_name, int val, int card_index) +static void setSpdifBit(char *ctl_name, int val, int card_index) { int err; char card_name[6]; diff --git a/hdspconf/src/HC_SyncCheck.h b/hdspconf/src/HC_SyncCheck.h index c79d21f..6aa6d13 100644 --- a/hdspconf/src/HC_SyncCheck.h +++ b/hdspconf/src/HC_SyncCheck.h @@ -51,7 +51,7 @@ public: void setAdatSyncStatus(unsigned char s); void setWCStatus(unsigned char s); private: - const char *adat_name; + char *adat_name; int h_step; Fl_Box_Draw_F *draw_box; }; diff --git a/hdsploader/COPYING b/hdsploader/COPYING index 623b625..d60c31a 100644 --- a/hdsploader/COPYING +++ b/hdsploader/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/hdspmixer/COPYING b/hdspmixer/COPYING index 623b625..d60c31a 100644 --- a/hdspmixer/COPYING +++ b/hdspmixer/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/hdspmixer/Makefile.am b/hdspmixer/Makefile.am index 85c1177..86a759c 100644 --- a/hdspmixer/Makefile.am +++ b/hdspmixer/Makefile.am @@ -1,5 +1,8 @@ -EXTRA_DIST = gitcompile depcomp -SUBDIRS = src pixmaps desktop +EXTRA_DIST = gitcompile hdspmixer.desktop depcomp +SUBDIRS = src pixmaps + +desktopdir = $(DESKTOP_DIR) +desktop_DATA = hdspmixer.desktop alsa-dist: distdir @rm -rf ../distdir/hdspmixer diff --git a/hdspmixer/configure.ac b/hdspmixer/configure.ac index 167e4f4..0b32dba 100644 --- a/hdspmixer/configure.ac +++ b/hdspmixer/configure.ac @@ -9,6 +9,25 @@ AC_PATH_X AM_PATH_ALSA(1.0.0) +dnl desktop install +AC_ARG_WITH(desktop-dir, + [ --with-desktop-dir specify the path to install desktop file], + [desktopdir="$withval"], [desktopdir=""]) +if test -z "$desktopdir"; then + desktopdir=$datadir/applications +fi +DESKTOP_DIR="$desktopdir" +AC_SUBST(DESKTOP_DIR) + +AC_ARG_WITH(pixmap-dir, + [ --with-pixmap-dir specify the path to install desktop pixmap file], + [pixmapdir="$withval"], [pixmapdir=""]) +if test -z "$pixmapdir"; then + pixmapdir=$datadir/pixmaps +fi +PIXMAP_DIR="$pixmapdir" +AC_SUBST(PIXMAP_DIR) + dnl library check AC_PATH_PROG(FLTK_CONFIG, fltk-config, no) if test "$FLTK_CONFIG" = "no" && ! test "`hostname -f`" = "alsa.alsa-project.org"; then @@ -20,4 +39,4 @@ FLTK_LIBS="`$FLTK_CONFIG --ldflags`" CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS" LIBS="$LIBS $ALSA_LIBS $FLTK_LIBS" -AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile desktop/Makefile) +AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile) diff --git a/hdspmixer/desktop/Makefile.am b/hdspmixer/desktop/Makefile.am deleted file mode 100644 index adafcd8..0000000 --- a/hdspmixer/desktop/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -APPNAME = hdspmixer - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_48x48_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/hdspmixer/desktop/hdspmixer.desktop b/hdspmixer/hdspmixer.desktop similarity index 58% rename from hdspmixer/desktop/hdspmixer.desktop rename to hdspmixer/hdspmixer.desktop index 4cfee66..eb5615e 100644 --- a/hdspmixer/desktop/hdspmixer.desktop +++ b/hdspmixer/hdspmixer.desktop @@ -1,8 +1,10 @@ [Desktop Entry] +Encoding=UTF-8 Name=HDSPMixer Comment=Hammerfall DSP matrix mixer control GUI Exec=hdspmixer -Icon=hdspmixer +FilePattern=hdspmixer +Icon=hdspmixer.png Terminal=false Type=Application -Categories=AudioVideo; +Categories=Application;AudioVideo; diff --git a/hdspmixer/pixmaps/Makefile.am b/hdspmixer/pixmaps/Makefile.am index c1cdf2c..c81fc95 100644 --- a/hdspmixer/pixmaps/Makefile.am +++ b/hdspmixer/pixmaps/Makefile.am @@ -1,3 +1,4 @@ pixmapdir = $(PIXMAP_DIR) +pixmap_DATA = hdspmixer.png -EXTRA_DIST = $(wildcard *.xpm) +EXTRA_DIST = $(wildcard *.xpm) hdspmixer.png diff --git a/hdspmixer/desktop/hicolor_apps_48x48_hdspmixer.png b/hdspmixer/pixmaps/hdspmixer.png similarity index 100% rename from hdspmixer/desktop/hicolor_apps_48x48_hdspmixer.png rename to hdspmixer/pixmaps/hdspmixer.png diff --git a/hdspmixer/pixmaps/loopback.xpm b/hdspmixer/pixmaps/loopback.xpm deleted file mode 100644 index a327467..0000000 --- a/hdspmixer/pixmaps/loopback.xpm +++ /dev/null @@ -1,69 +0,0 @@ -/* XPM */ -char const * loopback_xpm[] = { -"34 15 51 1", -" c None", -". c #2E3038", -"+ c #FFFB7C", -"@ c #FDF97B", -"# c #2E2D11", -"$ c #000000", -"% c #383716", -"& c #898740", -"* c #F1EE75", -"= c #22210A", -"- c #727034", -"; c #E2DE6D", -"> c #D5D267", -", c #787637", -"' c #FBF77A", -") c #AAA750", -"! c #ABA851", -"~ c #CDC962", -"{ c #83813C", -"] c #C8C560", -"^ c #84823D", -"/ c #F7F378", -"( c #949145", -"_ c #B7B457", -": c #949245", -"< c #353414", -"[ c #87853F", -"} c #F1ED75", -"| c #3B3A17", -"1 c #DFDB6C", -"2 c #161505", -"3 c #4B4A20", -"4 c #E5E16E", -"5 c #FEFA7C", -"6 c #E8E470", -"7 c #535124", -"8 c #FAF679", -"9 c #E7E370", -"0 c #66642E", -"a c #E4E06E", -"b c #F6F277", -"c c #EAE671", -"d c #E0DC6C", -"e c #B9B658", -"f c #5F5D2A", -"g c #EDE973", -"h c #69672F", -"i c #DDD96A", -"j c #333342", -"k c #32323E", -"l c #313136", -"..................................", -".++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++.", -".+++@#++++@$$%&*@$$=-;+@#++>,*+++.", -".+++@#++++@#+')!@#+@~{+@#+]^/++++.", -".+++@#++++@#+'!!@#+@~(+@#_:'+++++.", -".+++@#++++@$$<[}@$$$|1+@234++++++.", -".+++@#++++@#++++@#+5678@#90a+++++.", -".+++@#++++@#++++@#+59#b@#+c0d++++.", -".+++@$$$$e@#++++@$$2f]+@#++ghi+++.", -".++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++.", -"..jklllllllllkj....jklllllllllkj.."}; diff --git a/hdspmixer/pixmaps/output.xpm b/hdspmixer/pixmaps/output.xpm index c827b1c..8f7cd65 100644 --- a/hdspmixer/pixmaps/output.xpm +++ b/hdspmixer/pixmaps/output.xpm @@ -1,282 +1,220 @@ /* XPM */ char const * output_xpm[] = { -"36 224 55 1", -" c None", -". c #595966", -"+ c #2E3038", -"@ c #000000", -"# c #474951", -"$ c #404044", -"% c #7A7A8F", -"& c #27272B", -"* c #616176", -"= c #737384", -"- c #757585", -"; c #D4D4D4", -"> c #D6D6D6", -", c #D3D3D4", -"' c #C3C3C6", -") c #848491", -"! c #D5D5D5", -"~ c #CACACB", -"{ c #93939C", -"] c #9D9DA5", -"^ c #C8C8CA", -"/ c #787888", -"( c #B6B6BA", -"_ c #A3A3AA", -": c #C5C5C7", -"< c #A7A7AE", -"[ c #C4C4C6", -"} c #7D7D8C", -"| c #797989", -"1 c #C0C0C2", -"2 c #AFAFB4", -"3 c #BFBFC2", -"4 c #D3D3D3", -"5 c #95959F", -"6 c #D5D5D6", -"7 c #D1D1D2", -"8 c #91919B", -"9 c #757586", -"0 c #8E8E99", -"a c #D1D1D1", -"b c #8F8F99", -"c c #CBCBCD", -"d c #92929C", -"e c #7F7F8D", -"f c #8C8C97", -"g c #96969F", -"h c #AFAFB5", -"i c #CECECF", -"j c #A6A6AD", -"k c #8A8A96", -"l c #CCCCCD", -"m c #9898A1", -"n c #333342", -"o c #32323E", -"p c #313136", -"....................................", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++++++++++++@@@@@@@@@@++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -"....................................", -".++++++++++++++++++++++++++++++++++.", -".+================================+.", -".+================================+.", -".+================================+.", -".+===-;====->>,')->>!~{=-;==]^)===+.", -".+===-;====-;=/((-;=-_:=-;=<[}====+.", -".+===-;====-;=|((-;=-_1=-;23/=====+.", -".+===-;====->>,[)->>>45=-678======+.", -".+===-;====-;====-;=90a|-;bcd=====+.", -".+===-;====-;====-;=9b;e-;=fcg====+.", -".+===->>>>h-;====->>6ij=-;==klm===+.", -".+================================+.", -".+================================+.", -".+================================+.", -".++nopppppppppon++++nopppppppppon++.", -"...................................."}; +"36 208 9 1", +" c #595966", +". c #2E3038", +"+ c #000000", +"@ c #474951", +"# c #404044", +"$ c #7A7A8F", +"% c #27272B", +"& c #616176", +"* c #737384", +" ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..................++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ..................++++++++++...... ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" "}; diff --git a/hdspmixer/pixmaps/output_r.xpm b/hdspmixer/pixmaps/output_r.xpm index 51b1984..ab2ca99 100644 --- a/hdspmixer/pixmaps/output_r.xpm +++ b/hdspmixer/pixmaps/output_r.xpm @@ -1,282 +1,220 @@ /* XPM */ char const * output_r_xpm[] = { -"36 224 55 1", -" c None", -". c #595966", -"+ c #2E3038", -"@ c #000000", -"# c #474951", -"$ c #404044", -"% c #7A7A8F", -"& c #27272B", -"* c #616176", -"= c #737384", -"- c #757585", -"; c #D4D4D4", -"> c #D6D6D6", -", c #D3D3D4", -"' c #C3C3C6", -") c #848491", -"! c #D5D5D5", -"~ c #CACACB", -"{ c #93939C", -"] c #9D9DA5", -"^ c #C8C8CA", -"/ c #787888", -"( c #B6B6BA", -"_ c #A3A3AA", -": c #C5C5C7", -"< c #A7A7AE", -"[ c #C4C4C6", -"} c #7D7D8C", -"| c #797989", -"1 c #C0C0C2", -"2 c #AFAFB4", -"3 c #BFBFC2", -"4 c #D3D3D3", -"5 c #95959F", -"6 c #D5D5D6", -"7 c #D1D1D2", -"8 c #91919B", -"9 c #757586", -"0 c #8E8E99", -"a c #D1D1D1", -"b c #8F8F99", -"c c #CBCBCD", -"d c #92929C", -"e c #7F7F8D", -"f c #8C8C97", -"g c #96969F", -"h c #AFAFB5", -"i c #CECECF", -"j c #A6A6AD", -"k c #8A8A96", -"l c #CCCCCD", -"m c #9898A1", -"n c #333342", -"o c #32323E", -"p c #313136", -"....................................", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".+#######$%###+++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++&*++++++++@@@@@@@@@@++++++.", -".++++++++++++++++++@@@@@@@@@@++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++==============================++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -".++++++++++++++++++++++++++++++++++.", -"....................................", -".++++++++++++++++++++++++++++++++++.", -".+================================+.", -".+================================+.", -".+================================+.", -".+===-;====->>,')->>!~{=-;==]^)===+.", -".+===-;====-;=/((-;=-_:=-;=<[}====+.", -".+===-;====-;=|((-;=-_1=-;23/=====+.", -".+===-;====->>,[)->>>45=-678======+.", -".+===-;====-;====-;=90a|-;bcd=====+.", -".+===-;====-;====-;=9b;e-;=fcg====+.", -".+===->>>>h-;====->>6ij=-;==klm===+.", -".+================================+.", -".+================================+.", -".+================================+.", -".++nopppppppppon++++nopppppppppon++.", -"...................................."}; +"36 208 9 1", +" c #595966", +". c #2E3038", +"+ c #000000", +"@ c #474951", +"# c #404044", +"$ c #7A7A8F", +"% c #27272B", +"& c #616176", +"* c #737384", +" ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..................++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" .@@@@@@@#$@@@.....++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ........%&........++++++++++...... ", +" ..................++++++++++...... ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" ..++++++++++++++++++++++++++++++.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" .................................. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" ..******************************.. ", +" .................................. ", +" .................................. ", +" .................................. ", +" "}; diff --git a/hdspmixer/src/HDSPMixerCard.cxx b/hdspmixer/src/HDSPMixerCard.cxx index 72232c8..ce40ba7 100644 --- a/hdspmixer/src/HDSPMixerCard.cxx +++ b/hdspmixer/src/HDSPMixerCard.cxx @@ -231,8 +231,6 @@ void HDSPMixerCard::adjustSettings() { /* should never happen */ break; } - - max_channels = sizeof(channel_map_mf_ss); } if (type == Digiface) { @@ -255,8 +253,6 @@ void HDSPMixerCard::adjustSettings() { /* should never happen */ break; } - - max_channels = sizeof(channel_map_df_ss); } if (type == RPM) { @@ -267,8 +263,6 @@ void HDSPMixerCard::adjustSettings() { channel_map_input = channel_map_playback = channel_map_rpm; dest_map = dest_map_rpm; meter_map_input = meter_map_playback = channel_map_rpm; - - max_channels = sizeof(channel_map_rpm); } @@ -292,8 +286,6 @@ void HDSPMixerCard::adjustSettings() { /* should never happen */ break; } - - max_channels = sizeof(channel_map_df_ss); } if (type == H9632) { @@ -320,8 +312,6 @@ void HDSPMixerCard::adjustSettings() { meter_map_input = meter_map_playback = channel_map_h9632_qs; break; } - - max_channels = sizeof(channel_map_h9632_ss); } if (HDSPeMADI == type) { @@ -351,7 +341,6 @@ void HDSPMixerCard::adjustSettings() { break; } - max_channels = sizeof(channel_map_unity_ss); } if (HDSPeAIO == type) { @@ -390,7 +379,6 @@ void HDSPMixerCard::adjustSettings() { break; } - max_channels = sizeof(channel_map_aio_out_ss); } if (HDSP_AES == type) { @@ -406,7 +394,6 @@ void HDSPMixerCard::adjustSettings() { meter_map_input = channel_map_aes32; meter_map_playback = channel_map_aes32; - max_channels = sizeof(channel_map_aes32); } if (HDSPeRayDAT == type) { @@ -439,7 +426,6 @@ void HDSPMixerCard::adjustSettings() { break; } - max_channels = sizeof(channel_map_raydat_ss); } window_width = (channels_playback+2)*STRIP_WIDTH; @@ -559,23 +545,3 @@ int HDSPMixerCard::initializeCard(HDSPMixerWindow *w) return 0; } -int HDSPMixerCard::supportsLoopback() const -{ - int err = 0; - snd_ctl_elem_value_t *elemval; - snd_ctl_elem_id_t * elemid; - snd_ctl_t *handle; - snd_ctl_elem_value_alloca(&elemval); - snd_ctl_elem_id_alloca(&elemid); - if ((err = snd_ctl_open(&handle, name, SND_CTL_NONBLOCK)) < 0) - return err; - - snd_ctl_elem_id_set_name(elemid, "Output Loopback"); - snd_ctl_elem_id_set_interface(elemid, SND_CTL_ELEM_IFACE_HWDEP); - snd_ctl_elem_id_set_index(elemid, 0); - snd_ctl_elem_value_set_id(elemval, elemid); - err = snd_ctl_elem_read(handle, elemval); - snd_ctl_close(handle); - - return err; -} diff --git a/hdspmixer/src/HDSPMixerCard.h b/hdspmixer/src/HDSPMixerCard.h index eecfca3..faaeefa 100644 --- a/hdspmixer/src/HDSPMixerCard.h +++ b/hdspmixer/src/HDSPMixerCard.h @@ -52,7 +52,6 @@ public: HDSPMixerCard(int cardtype, int id, char *shortname); int channels_input, channels_playback, window_width, window_height, card_id; int channels_output; - int max_channels; int type; int last_preset; /* Last activated preset before switching to another card */ int last_dirty; /* Last dirty flag before switching to another card */ @@ -69,7 +68,6 @@ public: void adjustSettings(); void getAeb(); hdsp_9632_aeb_t h9632_aeb; - int supportsLoopback() const; }; #endif diff --git a/hdspmixer/src/HDSPMixerLoopback.cxx b/hdspmixer/src/HDSPMixerLoopback.cxx deleted file mode 100644 index fcfec2a..0000000 --- a/hdspmixer/src/HDSPMixerLoopback.cxx +++ /dev/null @@ -1,133 +0,0 @@ -/* - * HDSPMixer - * - * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#pragma implementation -#include "HDSPMixerLoopback.h" - -HDSPMixerLoopback::HDSPMixerLoopback(int x, int y, int idx):Fl_Widget(x, y, 34, 15) -{ - basew = (HDSPMixerWindow *)window(); - index = idx; -} - -void HDSPMixerLoopback::draw() -{ - if (_loopback == 1) - fl_draw_pixmap(loopback_xpm, x(), y()); -} - -int HDSPMixerLoopback::get() -{ - auto const card { basew->cards[basew->current_card] }; - - if (card->supportsLoopback() != 0) - return -1; - - if (index >= card->max_channels) - return -1; - - int err; - snd_ctl_elem_value_t *elemval; - snd_ctl_elem_id_t * elemid; - snd_ctl_t *handle; - snd_ctl_elem_value_alloca(&elemval); - snd_ctl_elem_id_alloca(&elemid); - char const * const name = basew->cards[basew->current_card]->name; - if ((err = snd_ctl_open(&handle, name, SND_CTL_NONBLOCK)) < 0) { - fprintf(stderr, "Error accessing ctl interface on card %s\n.", name); - return -1; - } - - snd_ctl_elem_id_set_name(elemid, "Output Loopback"); - snd_ctl_elem_id_set_interface(elemid, SND_CTL_ELEM_IFACE_HWDEP); - snd_ctl_elem_id_set_index(elemid, index); - snd_ctl_elem_value_set_id(elemval, elemid); - if ((err = snd_ctl_elem_read(handle, elemval)) < 0) - fprintf(stderr, "cannot read loopback: %d\n", err); - else - _loopback = snd_ctl_elem_value_get_integer(elemval, 0); - - snd_ctl_close(handle); - - return _loopback; -} - -void HDSPMixerLoopback::set(int l) -{ - auto const card { basew->cards[basew->current_card] }; - - if (card->supportsLoopback() != 0) - return; - - if (index >= card->max_channels) - return; - - if (l != _loopback) { - int err; - - snd_ctl_elem_id_t *id; - snd_ctl_elem_value_t *ctl; - snd_ctl_t *handle; - - snd_ctl_elem_value_alloca(&ctl); - snd_ctl_elem_id_alloca(&id); - snd_ctl_elem_id_set_name(id, "Output Loopback"); - snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_HWDEP); - snd_ctl_elem_id_set_device(id, 0); - snd_ctl_elem_id_set_index(id, index); - snd_ctl_elem_value_set_id(ctl, id); - - if ((err = snd_ctl_open( - &handle, basew->cards[basew->current_card]->name, SND_CTL_NONBLOCK)) < 0) { - fprintf(stderr, "Alsa error 1: %s\n", snd_strerror(err)); - return; - } - - snd_ctl_elem_value_set_integer(ctl, 0, l); - if ((err = snd_ctl_elem_write(handle, ctl)) < 0) { - fprintf(stderr, "Alsa error 2: %s\n", snd_strerror(err)); - snd_ctl_close(handle); - return; - } - - _loopback = l; - - snd_ctl_close(handle); - - redraw(); - } -} - -int HDSPMixerLoopback::handle(int e) -{ - int button3 = Fl::event_button3(); - switch (e) { - case FL_PUSH: - set(!_loopback); - if (button3) - relative->set(_loopback); - basew->checkState(); - redraw(); - return 1; - default: - return Fl_Widget::handle(e); - } -} - diff --git a/hdspmixer/src/HDSPMixerLoopback.h b/hdspmixer/src/HDSPMixerLoopback.h deleted file mode 100644 index 07f1f0c..0000000 --- a/hdspmixer/src/HDSPMixerLoopback.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * HDSPMixer - * - * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#pragma interface -#ifndef HDSPMixerLoopback_H -#define HDSPMixerLoopback_H - -#include -#include -#include "HDSPMixerWindow.h" -#include "pixmaps.h" - -class HDSPMixerWindow; - -class HDSPMixerLoopback:public Fl_Widget -{ -private: - HDSPMixerWindow *basew; - int _loopback{-1}; -public: - HDSPMixerLoopback *relative; - int index; - HDSPMixerLoopback(int x, int y, int idx); - void draw(); - int handle(int e); - int get(); - void set(int l); -}; - -#endif - diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx index 8b4db34..0053fe0 100644 --- a/hdspmixer/src/HDSPMixerOutput.cxx +++ b/hdspmixer/src/HDSPMixerOutput.cxx @@ -93,7 +93,7 @@ static char const *labels_aio_ss_input[18] = { "AES.L", "AES.R", "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", - "AEB 1", "AEB 2", "AEB 3", "AEB 4" + "AEB 1", "AEB 2", "AEB 3," "AEB 4" }; static char const *labels_aio_ss_playback[20] = { @@ -204,7 +204,6 @@ HDSPMixerOutput::HDSPMixerOutput(int x, int y, int w, int h, int num):Fl_Group(x peak = new HDSPMixerPeak(x+3, y+4, 0); gain = new HDSPMixerGain(x+3, y+175, 0); meter = new HDSPMixerMeter(x+20, y+27, false, peak); - loopback = new HDSPMixerLoopback(x+1, y+208, out_num); end(); } diff --git a/hdspmixer/src/HDSPMixerOutput.h b/hdspmixer/src/HDSPMixerOutput.h index 1e04ae5..6278cfd 100644 --- a/hdspmixer/src/HDSPMixerOutput.h +++ b/hdspmixer/src/HDSPMixerOutput.h @@ -27,7 +27,6 @@ #include #include #include "HDSPMixerFader.h" -#include "HDSPMixerLoopback.h" #include "HDSPMixerPeak.h" #include "HDSPMixerGain.h" #include "HDSPMixerMeter.h" @@ -37,7 +36,6 @@ class HDSPMixerFader; class HDSPMixerGain; -class HDSPMixerLoopback; class HDSPMixerPeak; class HDSPMixerMeter; class HDSPMixerOutputData; @@ -58,7 +56,6 @@ public: HDSPMixerFader *fader; HDSPMixerGain *gain; HDSPMixerMeter *meter; - HDSPMixerLoopback *loopback; HDSPMixerOutput(int x, int y, int w, int h, int out); void draw(); void draw_background(); diff --git a/hdspmixer/src/HDSPMixerOutputData.h b/hdspmixer/src/HDSPMixerOutputData.h index 75b9109..885047b 100644 --- a/hdspmixer/src/HDSPMixerOutputData.h +++ b/hdspmixer/src/HDSPMixerOutputData.h @@ -26,7 +26,6 @@ class HDSPMixerOutputData { public: int fader_pos; - int loopback; HDSPMixerOutputData(); }; diff --git a/hdspmixer/src/HDSPMixerOutputs.cxx b/hdspmixer/src/HDSPMixerOutputs.cxx index 342685d..0b4e7f4 100644 --- a/hdspmixer/src/HDSPMixerOutputs.cxx +++ b/hdspmixer/src/HDSPMixerOutputs.cxx @@ -25,15 +25,13 @@ HDSPMixerOutputs::HDSPMixerOutputs(int x, int y, int w, int h, int nchans):Fl_Gr { int i; for (i = 0; i < HDSP_MAX_CHANNELS+2; i += 2) { - strips[i] = new HDSPMixerOutput((i*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i); + strips[i] = new HDSPMixerOutput((i*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i); strips[i+1] = new HDSPMixerOutput(((i+1)*STRIP_WIDTH), y, STRIP_WIDTH, SMALLSTRIP_HEIGHT, i+1); /* Setup linked stereo channels */ strips[i]->fader->relative = strips[i+1]->fader; strips[i+1]->fader->relative = strips[i]->fader; strips[i]->fader->gain = strips[i]->gain; strips[i+1]->fader->gain = strips[i+1]->gain; - strips[i]->loopback->relative = strips[i+1]->loopback; - strips[i+1]->loopback->relative = strips[i]->loopback; } empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0); diff --git a/hdspmixer/src/HDSPMixerPresetData.cxx b/hdspmixer/src/HDSPMixerPresetData.cxx index 6359732..276d101 100644 --- a/hdspmixer/src/HDSPMixerPresetData.cxx +++ b/hdspmixer/src/HDSPMixerPresetData.cxx @@ -36,6 +36,5 @@ HDSPMixerPresetData::HDSPMixerPresetData() over = 3; level = 0; rate = 1; - loopback = 0; } diff --git a/hdspmixer/src/HDSPMixerPresetData.h b/hdspmixer/src/HDSPMixerPresetData.h index 3b46b92..58536d3 100644 --- a/hdspmixer/src/HDSPMixerPresetData.h +++ b/hdspmixer/src/HDSPMixerPresetData.h @@ -38,7 +38,6 @@ public: int over; int rate; int rmsplus3; - int loopback; HDSPMixerPresetData(); }; diff --git a/hdspmixer/src/HDSPMixerPresets.cxx b/hdspmixer/src/HDSPMixerPresets.cxx index 82654d9..aeeb9c9 100644 --- a/hdspmixer/src/HDSPMixerPresets.cxx +++ b/hdspmixer/src/HDSPMixerPresets.cxx @@ -143,7 +143,6 @@ void HDSPMixerPresets::save_preset(int prst) { basew->playbacks->strips[i]->data[card][speed][p]->dest = basew->playbacks->strips[i]->targets->selected; basew->outputs->strips[i]->data[card][speed][p]->fader_pos = basew->outputs->strips[i]->fader->pos[0]; - basew->outputs->strips[i]->data[card][speed][p]->loopback = basew->outputs->strips[i]->loopback->get(); } /* Line outs */ basew->outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][p]->fader_pos = basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0]; @@ -189,7 +188,6 @@ void HDSPMixerPresets::restore_preset(int prst) { basew->playbacks->strips[i]->targets->selected = basew->playbacks->strips[i]->data[card][speed][p]->dest; basew->outputs->strips[i]->fader->pos[0] = basew->outputs->strips[i]->data[card][speed][p]->fader_pos; - basew->outputs->strips[i]->loopback->set(basew->outputs->strips[i]->data[card][speed][p]->loopback); } /* Line outs */ basew->outputs->strips[HDSP_MAX_CHANNELS]->fader->pos[0] = basew->outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][p]->fader_pos; diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx index 4a911c1..342efb2 100644 --- a/hdspmixer/src/HDSPMixerWindow.cxx +++ b/hdspmixer/src/HDSPMixerWindow.cxx @@ -35,8 +35,8 @@ static void readregisters_cb(void *arg) hdsp_peak_rms_t hdsp_peak_rms; struct hdspm_peak_rms hdspm_peak_rms; bool isMADI = false; - __u32 *input_peaks, *playback_peaks, *output_peaks; - __u64 *input_rms, *playback_rms, *output_rms; + uint32_t *input_peaks, *playback_peaks, *output_peaks; + uint64_t *input_rms, *playback_rms, *output_rms; HDSPMixerWindow *w = (HDSPMixerWindow *)arg; @@ -353,25 +353,18 @@ void HDSPMixerWindow::save() sizeof(inputs->strips[0]->data[0][0][0]->fader_pos) / sizeof(inputs->strips[0]->data[0][0][0]->fader_pos[0])); - FILE *in,*out; - /* We want to append any existing extra data that might got written by a - * newer version to this file, therefore write our data to file_name.tmp - * and append the old data. Also this way we would not corrupt the file - * should we crash. - */ - std::string const tmp = file_name + std::string(".tmp"); - char const * const tmpc = tmp.c_str(); + FILE *file; - if ((out = fopen(tmpc, "w")) == NULL) { - fl_alert("Error opening file %s for saving", tmpc); + if ((file = fopen(file_name, "w")) == NULL) { + fl_alert("Error opening file %s for saving", file_name); } if (dirty) { inputs->buttons->presets->save_preset(current_preset+1); } /* since hdspmixer 1.11, we also store the meter level settings. Indicate * the new on-disk structure via a small header */ - if (fwrite((void *)&header, sizeof(char), sizeof(header), out) != + if (fwrite((void *)&header, sizeof(char), sizeof(header), file) != sizeof(header)) { goto save_error; } @@ -381,145 +374,99 @@ void HDSPMixerWindow::save() for (int preset = 0; preset < 8; ++preset) { for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) { /* inputs pans and volumes */ - if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) { + if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) { goto save_error; } - if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) { + if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) { goto save_error; } /* playbacks pans and volumes */ - if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) { + if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->pan_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) { goto save_error; } - if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, out) != pan_array_size) { + if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->fader_pos[0]), sizeof(int), pan_array_size, file) != pan_array_size) { goto save_error; } /* inputs mute/solo/dest */ - if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(inputs->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, file) != 1) { goto save_error; } /* playbacks mute/solo/dest */ - if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(playbacks->strips[channel]->data[card][speed][preset]->dest), sizeof(int), 1, file) != 1) { goto save_error; } /* outputs volumes */ - if (fwrite((void *)&(outputs->strips[channel]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(outputs->strips[channel]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) { goto save_error; } } /* Lineouts */ - if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][preset]->fader_pos), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(outputs->strips[HDSP_MAX_CHANNELS+1]->data[card][speed][preset]->fader_pos), sizeof(int), 1, file) != 1) { goto save_error; } /* Global settings */ - if (fwrite((void *)&(data[card][speed][preset]->input), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->input), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->output), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->output), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->playback), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->playback), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->submix), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->submix), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->submix_value), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->submix_value), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->solo), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->solo), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->mute), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->mute), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->last_destination), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->last_destination), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->rmsplus3), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->rmsplus3), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->numbers), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->numbers), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->over), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->over), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->level), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->level), sizeof(int), 1, file) != 1) { goto save_error; } - if (fwrite((void *)&(data[card][speed][preset]->rate), sizeof(int), 1, out) != 1) { + if (fwrite((void *)&(data[card][speed][preset]->rate), sizeof(int), 1, file) != 1) { goto save_error; } } } } - - /* Output loopback data */ - for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) { - auto const strip = outputs->strips[channel]; - - for (int card = 0; card < MAX_CARDS; ++card) { - auto const data = strip->data[card]; - - for (int speed = 0; speed < 3; ++speed) { - auto const spd = data[speed]; - - for (int preset = 0; preset < 8; ++preset) { - auto const data = spd[preset]; - - if (fwrite((void *)&(data->loopback), - sizeof(int), - 1, - out) != 1) - goto save_error; - } - } - } - } - - /* If the file we want to write already exists it could be possible that it - * was saved with a newer version. If that is the case we just append its - * content to the new output file and that way ensure that we don't lose any - * data the new version wrote. - */ - if ((in = fopen(file_name, "r")) != NULL) { - if (!fseek(in, ftell(out), SEEK_SET)) { - char buff[512]; - size_t read; - while ((read = fread(&buff, sizeof(char), sizeof(buff), in)) != 0) - fwrite(buff, sizeof(char), read, out); - if (ferror(in) || ferror(out)) - fl_alert("Error appending %s to %s", file_name, tmpc); - } - fclose(in); - } - - fclose(out); - - if (rename(tmpc, file_name)) - fl_alert("Error renaming %s to %s", tmpc, file_name); - ::remove(tmpc); - + fclose(file); return; save_error: - fclose(out); + fclose(file); fl_alert("Error saving presets to file %s", file_name); return; } @@ -542,7 +489,6 @@ void HDSPMixerWindow::load() bool ondisk_v1 = false; int pan_array_size = 14; /* old (pre 1.0.24) HDSP_MAX_DEST */ int channels_per_card = 26; /* old (pre 1.0.24) HDSP_MAX_CHANNELS */ - bool res = true; if (fread(&buffer, sizeof(char), sizeof(buffer), file) != sizeof(buffer)) { goto load_error; @@ -671,46 +617,6 @@ void HDSPMixerWindow::load() } } } - - /* Output loopback data */ - for (int channel = 0; channel < HDSP_MAX_CHANNELS; ++channel) { - auto const strip = outputs->strips[channel]; - - for (int card = 0; card < MAX_CARDS; ++card) { - auto const data = strip->data[card]; - - for (int speed = 0; speed < 3; ++speed) { - auto const spd = data[speed]; - - for (int preset = 0; preset < 8; ++preset) { - auto const data = spd[preset]; - - /* TODO: Somewhere we get a value of 5 from, investigate - * this another day. For now just reset it here and - * continue looping to reset the value. - */ - data->loopback = 0; - - if (feof(file)) { - res = true; - continue; - } - - if (ferror(file)) { - res = false; - continue; - } - - if (fread((void *)&(data->loopback), sizeof(int), 1, file) != 1) - res = false; - } - } - } - } - - if (!res) - goto load_error; - fclose(file); setTitleWithFilename(); resetMixer(); @@ -908,8 +814,6 @@ void HDSPMixerWindow::restoreDefaults(int card) } outputs->strips[i]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0; outputs->strips[i+1]->data[card][speed][preset]->fader_pos = (preset != 4) ? 137*CF : 0; - outputs->strips[i]->data[card][speed][preset]->loopback = 0; - outputs->strips[i+1]->data[card][speed][preset]->loopback = 0; if (preset == 3 || preset == 7) { inputs->strips[i]->data[card][speed][preset]->mute = 1; inputs->strips[i+1]->data[card][speed][preset]->mute = 1; @@ -1117,8 +1021,6 @@ void HDSPMixerWindow::checkState() /* Outputs row */ if (outputs->strips[i]->data[current_card][speed][p]->fader_pos != outputs->strips[i]->fader->pos[0]) corrupt++; - if (outputs->strips[i]->data[current_card][speed][p]->loopback != outputs->strips[i]->loopback->get()) - corrupt++; } /* Global settings */ diff --git a/hdspmixer/src/Makefile.am b/hdspmixer/src/Makefile.am index ebc4c3c..e80a8ac 100644 --- a/hdspmixer/src/Makefile.am +++ b/hdspmixer/src/Makefile.am @@ -15,8 +15,6 @@ hdspmixer_SOURCES = \ HDSPMixerEmpty.h \ HDSPMixerOutput.cxx \ HDSPMixerOutput.h \ - HDSPMixerLoopback.cxx \ - HDSPMixerLoopback.h \ HDSPMixerIOMixer.cxx \ HDSPMixerIOMixer.h \ HDSPMixerSelector.cxx \ diff --git a/hdspmixer/src/channelmap.cxx b/hdspmixer/src/channelmap.cxx index bfb136d..b7bdded 100644 --- a/hdspmixer/src/channelmap.cxx +++ b/hdspmixer/src/channelmap.cxx @@ -55,7 +55,7 @@ char channel_map_mf_ss[26] = { 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */ 24, 25, /* SPDIF */ 26, 27, /* Phones L+R, only a destination channel */ - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, -1, -1 }; // Digiface/Multiface @@ -65,13 +65,13 @@ char meter_map_ds[26] = { 16, 17, 18, 19, /* ADAT on Multiface, ADAT3 on Digiface */ 24, 25, /* SPDIF */ 26, 27, /* Headphones */ - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; char channel_map_ds[26] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 24, 25, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; char dest_map_ds[8] = { @@ -84,10 +84,10 @@ char dest_map_rpm[3] = { }; char channel_map_rpm[26] = { - 0, 1, 2, 3, 4, 5, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1 + 0, 1, 2, 3, 4, 5, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1 }; // HDSP 9652 @@ -158,21 +158,21 @@ char channel_map_unity_ds[HDSPM_MAX_CHANNELS] = { 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = { 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; // HDSPe RayDAT @@ -208,10 +208,10 @@ char channel_map_raydat_ss[HDSPM_MAX_CHANNELS] = { 28, 29, 30, 31, 32, 33, 34, 35, /* ADAT 4 */ 0, 1, /* AES */ 2, 3, /* SPDIF */ - (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = { @@ -221,12 +221,12 @@ char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = { 16, 17, 18, 19, /* ADAT 4 */ 0, 1, /* AES */ 2, 3, /* SPDIF */ - (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = { @@ -236,13 +236,13 @@ char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = { 10, 11, /* ADAT 4 */ 0, 1, /* AES */ 2, 3, /* SPDIF */ - (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; // HDSPe AIO @@ -284,12 +284,12 @@ char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = { 10, 11, /* spdif in */ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = { @@ -299,12 +299,12 @@ char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = { 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */ 6, 7, /* phone out */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, }; char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = { @@ -313,13 +313,13 @@ char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = { 10, 11, /* spdif in */ 12, 14, 16, 18, /* adat in */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = { @@ -329,12 +329,12 @@ char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = { 12, 14, 16, 18, /* adat out */ 6, 7, /* phone out */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = { @@ -343,13 +343,13 @@ char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = { 10, 11, /* spdif in */ 12, 16, /* adat in */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = { @@ -359,13 +359,13 @@ char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = { 12, 16, /* adat out */ 6, 7, /* phone out */ 2, 3, 4, 5, /* AEB */ - (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; // HDSP AES32 and HDSPe AES @@ -383,11 +383,11 @@ char channel_map_aes32[HDSPM_MAX_CHANNELS] = { 10, 11, /* AES 6 */ 12, 13, /* AES 7 */ 14, 15, /* AES 8 */ - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, - (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; diff --git a/hdspmixer/src/defines.h b/hdspmixer/src/defines.h index e76141b..af5c382 100644 --- a/hdspmixer/src/defines.h +++ b/hdspmixer/src/defines.h @@ -34,7 +34,7 @@ #define STRIP_WIDTH 36 #define FULLSTRIP_HEIGHT 253 -#define SMALLSTRIP_HEIGHT 224 +#define SMALLSTRIP_HEIGHT 208 #define MENU_HEIGHT 20 #define MIN_WIDTH 2*STRIP_WIDTH diff --git a/hdspmixer/src/hdspmixer.cxx b/hdspmixer/src/hdspmixer.cxx index a33a75e..9c0a3c4 100644 --- a/hdspmixer/src/hdspmixer.cxx +++ b/hdspmixer/src/hdspmixer.cxx @@ -39,7 +39,7 @@ int main(int argc, char **argv) { HDSPMixerWindow *window; HDSPMixerCard *hdsp_cards[3]; - char *name = NULL, *shortname; + char *name, *shortname; int card; int cards = 0; diff --git a/hdspmixer/src/pixmaps.cxx b/hdspmixer/src/pixmaps.cxx index 34f8834..2f7c589 100644 --- a/hdspmixer/src/pixmaps.cxx +++ b/hdspmixer/src/pixmaps.cxx @@ -47,7 +47,6 @@ #include "../pixmaps/over.xpm" #include "../pixmaps/peak.xpm" #include "../pixmaps/solo.xpm" -#include "../pixmaps/loopback.xpm" #include "../pixmaps/iomixer_r.xpm" #include "../pixmaps/output_r.xpm" #include "../pixmaps/matrix_black.xpm" diff --git a/hdspmixer/src/pixmaps.h b/hdspmixer/src/pixmaps.h index 3548ba3..b980a62 100644 --- a/hdspmixer/src/pixmaps.h +++ b/hdspmixer/src/pixmaps.h @@ -49,7 +49,6 @@ extern char const * output_xpm[]; extern char const * over_xpm[]; extern char const * peak_xpm[]; extern char const * solo_xpm[]; -extern char const * loopback_xpm[]; extern char const * iomixer_r_xpm[]; extern char const * output_r_xpm[]; extern char const * matrix_white_xpm[]; diff --git a/hwmixvolume/Makefile.am b/hwmixvolume/Makefile.am index 0437723..38690eb 100644 --- a/hwmixvolume/Makefile.am +++ b/hwmixvolume/Makefile.am @@ -1,5 +1,4 @@ -# Process this file with automake to produce Makefile.in. -SUBDIRS = desktop +# # Process this file with automake to procude Makefile.in. bin_SCRIPTS = hwmixvolume #man_MANS = EXTRA_DIST = gitcompile hwmixvolume diff --git a/hwmixvolume/README b/hwmixvolume/README index 56c7554..9884ec2 100644 --- a/hwmixvolume/README +++ b/hwmixvolume/README @@ -8,8 +8,7 @@ that use hardware mixing, i.e., those based on the following chips: * Yamaha DS-1 (YMF-724/740/744/754) (driver: snd-ymfpci) -This tool requires Python, PyGObject, GTK+ 3.0 or later, and alsa-python 1.0.22 -or later. +This tool requires Python, pygtk, and alsa-pyton 1.0.22 or later. It is recommended to use at least Linux kernel 2.6.32 or alsa-driver 1.0.22; otherwise, the name of the program that is using a stream cannot be shown. diff --git a/hwmixvolume/configure.ac b/hwmixvolume/configure.ac index 84f8473..09d5f09 100644 --- a/hwmixvolume/configure.ac +++ b/hwmixvolume/configure.ac @@ -4,4 +4,4 @@ AM_INIT_AUTOMAKE AM_MAINTAINER_MODE([enable]) AC_CONFIG_SRCDIR([hwmixvolume]) AC_PROG_INSTALL -AC_OUTPUT([Makefile desktop/Makefile]) +AC_OUTPUT([Makefile]) diff --git a/hwmixvolume/desktop/Makefile.am b/hwmixvolume/desktop/Makefile.am deleted file mode 100644 index d15b5e5..0000000 --- a/hwmixvolume/desktop/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -APPNAME = hwmixvolume - -desktopdir = $(datadir)/applications -desktop_DATA = $(APPNAME).desktop - -public_icons = \ - hicolor_apps_256x256_$(APPNAME).png \ - hicolor_apps_128x128_$(APPNAME).png \ - hicolor_apps_48x48_$(APPNAME).png - -EXTRA_DIST = \ - $(public_icons) \ - $(desktop_DATA) - -install-icons: - for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -uninstall-icons: - -for icon in $(public_icons); do \ - THEME=`echo $$icon | cut -d_ -f1`; \ - CONTEXT=`echo $$icon | cut -d_ -f2`; \ - SIZE=`echo $$icon | cut -d_ -f3`; \ - ICONFILE=`echo $$icon | cut -d_ -f4`; \ - rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ - done - -install-data-local: install-icons - -uninstall-local: uninstall-icons diff --git a/hwmixvolume/desktop/hicolor_apps_128x128_hwmixvolume.png b/hwmixvolume/desktop/hicolor_apps_128x128_hwmixvolume.png deleted file mode 100644 index c131adc..0000000 Binary files a/hwmixvolume/desktop/hicolor_apps_128x128_hwmixvolume.png and /dev/null differ diff --git a/hwmixvolume/desktop/hicolor_apps_256x256_hwmixvolume.png b/hwmixvolume/desktop/hicolor_apps_256x256_hwmixvolume.png deleted file mode 100644 index 57d6d0a..0000000 Binary files a/hwmixvolume/desktop/hicolor_apps_256x256_hwmixvolume.png and /dev/null differ diff --git a/hwmixvolume/desktop/hicolor_apps_48x48_hwmixvolume.png b/hwmixvolume/desktop/hicolor_apps_48x48_hwmixvolume.png deleted file mode 100644 index 41c366d..0000000 Binary files a/hwmixvolume/desktop/hicolor_apps_48x48_hwmixvolume.png and /dev/null differ diff --git a/hwmixvolume/desktop/hwmixvolume.desktop b/hwmixvolume/desktop/hwmixvolume.desktop deleted file mode 100644 index 70d03fb..0000000 --- a/hwmixvolume/desktop/hwmixvolume.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Hwmixvolume -GenericName=Control the volume of individual streams on sound cards that use hardware mixing -Exec=hwmixvolume -Icon=hwmixvolume -Terminal=false -Type=Application -Categories=AudioVideo; -Version=0.9.4 diff --git a/hwmixvolume/hwmixvolume b/hwmixvolume/hwmixvolume index 871c2c5..f25062b 100755 --- a/hwmixvolume/hwmixvolume +++ b/hwmixvolume/hwmixvolume @@ -2,7 +2,6 @@ # hwmixvolume - ALSA hardware mixer volume control applet # Copyright (c) 2009-2010 Clemens Ladisch -# Copyright (c) 2018 Emmanuel Gil Peyrot # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -16,10 +15,7 @@ # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -import gi -gi.require_version('GLib', '2.0') -gi.require_version('Gtk', '3.0') -from gi.repository import GLib, Gtk +import gobject, gtk from pyalsa import alsacard, alsahcontrol INTF_PCM = alsahcontrol.interface_id['PCM'] @@ -30,283 +26,285 @@ EVENT_INFO = alsahcontrol.event_mask['INFO'] EVENT_REMOVE = alsahcontrol.event_mask_remove class Stream: - def __init__(self, element, parent): - self.element = element - self.element.set_callback(self) - self.parent = parent - self.label = None - self.scales = [] - self.adjustments = [] - self.callback(self.element, EVENT_INFO) + def __init__(self, element, parent): + self.element = element + self.element.set_callback(self) + self.parent = parent + self.label = None + self.scales = [] + self.adjustments = [] + self.callback(self.element, EVENT_INFO) - def destroy(self): - self.deactivate() + def destroy(self): + self.deactivate() - def callback(self, e, mask): - if mask == EVENT_REMOVE: - self.deactivate() - elif (mask & EVENT_INFO) != 0: - info = alsahcontrol.Info(self.element) - if info.is_inactive: - self.deactivate() - else: - self.activate() - elif (mask & EVENT_VALUE) != 0: - self.update_scales_from_ctl() + def callback(self, e, mask): + if mask == EVENT_REMOVE: + self.deactivate() + elif (mask & EVENT_INFO) != 0: + info = alsahcontrol.Info(self.element) + if info.is_inactive: + self.deactivate() + else: + self.activate() + elif (mask & EVENT_VALUE) != 0: + self.update_scales_from_ctl() - def activate(self): - if self.label: - return - info = alsahcontrol.Info(self.element) - value = alsahcontrol.Value(self.element) - value.read() - values = value.get_tuple(TYPE_INTEGER, info.count) - self.label = Gtk.Label.new(self.get_label(info)) - self.label.set_single_line_mode(True) - self.parent.scales_vbox.add(self.label) - for i in range(info.count): - adj = Gtk.Adjustment(value=values[i], - lower=info.min, upper=info.max, - step_incr=1, - page_incr=(info.max-info.min+1)/8) - adj.connect('value-changed', self.update_ctl_from_scale, i) - scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj) - scale.set_draw_value(False) - self.parent.scales_vbox.add(scale) - self.scales.append(scale) - self.adjustments.append(adj) - self.parent.scales_vbox.show_all() - self.parent.update_msg_label() + def activate(self): + if self.label: + return + info = alsahcontrol.Info(self.element) + value = alsahcontrol.Value(self.element) + value.read() + values = value.get_tuple(TYPE_INTEGER, info.count) + self.label = gtk.Label(self.get_label(info)) + self.label.set_single_line_mode(True) + self.parent.scales_vbox.pack_start(self.label, expand=False) + for i in range(info.count): + adj = gtk.Adjustment(value=values[i], + lower=info.min, upper=info.max, + step_incr=1, + page_incr=(info.max-info.min+1)/8) + adj.connect('value-changed', self.update_ctl_from_scale, i) + scale = gtk.HScale(adj) + scale.set_draw_value(False) + self.parent.scales_vbox.pack_start(scale, expand=False) + self.scales.append(scale) + self.adjustments.append(adj) + self.parent.scales_vbox.show_all() + self.parent.update_msg_label() - def deactivate(self): - if not self.label: - return - self.label.destroy() - for s in self.scales: - s.destroy() - self.label = None - self.scales = [] - self.adjustments = [] - self.parent.update_msg_label() + def deactivate(self): + if not self.label: + return + self.label.destroy() + for s in self.scales: + s.destroy() + self.label = None + self.scales = [] + self.adjustments = [] + self.parent.update_msg_label() - def update_scales_from_ctl(self): - if not self.label: - return - count = len(self.adjustments) - value = alsahcontrol.Value(self.element) - value.read() - values = value.get_tuple(TYPE_INTEGER, count) - for i in range(count): - self.adjustments[i].set_value(values[i]) + def update_scales_from_ctl(self): + if not self.label: + return + count = len(self.adjustments) + value = alsahcontrol.Value(self.element) + value.read() + values = value.get_tuple(TYPE_INTEGER, count) + for i in range(count): + self.adjustments[i].set_value(values[i]) - def update_ctl_from_scale(self, adj, index): - scale_value = adj.get_value() - value_to_set = int(round(adj.get_value())) - count = len(self.adjustments) - value = alsahcontrol.Value(self.element) - if self.parent.lock_check.get_active(): - values = [value_to_set for i in range(count)] - else: - value.read() - values = value.get_array(TYPE_INTEGER, count) - values[index] = value_to_set - value.set_array(TYPE_INTEGER, values) - value.write() - if value_to_set != scale_value: - adj.set_value(value_to_set) + def update_ctl_from_scale(self, adj, index): + scale_value = adj.get_value() + value_to_set = int(round(adj.get_value())) + count = len(self.adjustments) + value = alsahcontrol.Value(self.element) + if self.parent.lock_check.get_active(): + values = [value_to_set for i in range(count)] + else: + value.read() + values = value.get_array(TYPE_INTEGER, count) + values[index] = value_to_set + value.set_array(TYPE_INTEGER, values) + value.write() + if value_to_set != scale_value: + adj.set_value(value_to_set) - def get_label(self, info): - pid = self.get_pid(info) - if pid: - cmdline = self.get_pid_cmdline(pid) - if cmdline: - return cmdline - else: - return "PID %d" % pid - else: - name = info.name - if name[-7:] == " Volume": - name = name[:-7] - if name[-9:] == " Playback": - name = name[:-9] - return name + def get_label(self, info): + pid = self.get_pid(info) + if pid: + cmdline = self.get_pid_cmdline(pid) + if cmdline: + return cmdline + else: + return "PID %d" % pid + else: + name = info.name + if name[-7:] == " Volume": + name = name[:-7] + if name[-9:] == " Playback": + name = name[:-9] + return name - def get_pid(self, info): - card = self.parent.current_card - device = info.device - subdevice = info.subdevice - if subdevice == 0: - subdevice = info.index - filename = "/proc/asound/card%d/pcm%dp/sub%d/status" % (card, device, subdevice) - try: - with open(filename, "r") as f: - for line in f: - if line[:9] == "owner_pid": - return int(line.split(':')[1].strip()) - except IOError: - return None - return None + def get_pid(self, info): + card = self.parent.current_card + device = info.device + subdevice = info.subdevice + if subdevice == 0: + subdevice = info.index + filename = "/proc/asound/card%d/pcm%dp/sub%d/status" % (card, device, subdevice) + try: + f = open(filename, "r") + except IOError: + return None + try: + for line in f.readlines(): + if line[:9] == "owner_pid": + return int(line.split(':')[1].strip()) + finally: + f.close() + return None - def get_pid_cmdline(self, pid): - try: - with open("/proc/%d/cmdline" % pid, "r") as f: - cmdline = f.read() - except IOError: - return None - return cmdline.replace('\x00', ' ').strip() + def get_pid_cmdline(self, pid): + try: + f = open("/proc/%d/cmdline" % pid, "r") + except IOError: + return None + try: + cmdline = f.read() + finally: + f.close() + return cmdline.replace('\x00', ' ').strip() -class MixerWindow(Gtk.Window): - card_numbers = alsacard.card_list() - current_card = -1 - hcontrol = None - scales_vbox = None - msg_label = None - streams = [] - hctl_sources = [] +class MixerWindow(gtk.Window): + card_numbers = alsacard.card_list() + current_card = -1 + hcontrol = None + scales_vbox = None + msg_label = None + streams = [] + hctl_sources = [] - def __init__(self): - Gtk.Window.__init__(self) - self.connect('destroy', lambda w: Gtk.main_quit()) - self.set_title("Hardware Mixer Volumes") + def __init__(self): + gtk.Window.__init__(self) + self.connect('destroy', lambda w: gtk.main_quit()) + self.set_title("Hardware Mixer Volumes") - vbox = Gtk.Grid() - vbox.set_orientation(Gtk.Orientation.VERTICAL) - self.add(vbox) + vbox = gtk.VBox() + self.add(vbox) - hbox = Gtk.Grid() - vbox.add(hbox) + hbox = gtk.HBox() + vbox.pack_start(hbox, expand=False) - label = Gtk.Label.new_with_mnemonic("_Sound Card: ") - hbox.add(label) + label = gtk.Label("_Sound Card: ") + label.set_use_underline(True) + hbox.pack_start(label, expand=False) - combo = Gtk.ComboBoxText() - combo.set_hexpand(True) - for i in self.card_numbers: - str = "%d: %s" % (i, alsacard.card_get_name(i)) - combo.append_text(str) - if len(self.card_numbers) > 0: - combo.set_active(0) - combo.connect('changed', lambda c: self.change_card(self.card_numbers[combo.get_active()])) - hbox.add(combo) - label.set_mnemonic_widget(combo) + combo = gtk.combo_box_new_text() + for i in self.card_numbers: + str = "%d: %s" % (i, alsacard.card_get_name(i)) + combo.append_text(str) + if len(self.card_numbers) > 0: + combo.set_active(0) + combo.connect('changed', lambda c: self.change_card(self.card_numbers[combo.get_active()])) + hbox.pack_start(combo) + label.set_mnemonic_widget(combo) - self.lock_check = Gtk.CheckButton.new_with_mnemonic(label="_Lock Channels") - self.lock_check.set_active(True) - vbox.add(self.lock_check) + self.lock_check = gtk.CheckButton(label="_Lock Channels") + self.lock_check.set_active(True) + vbox.pack_start(self.lock_check, expand=False) - scrollwin = Gtk.ScrolledWindow() - scrollwin.set_policy(hscrollbar_policy=Gtk.PolicyType.NEVER, vscrollbar_policy=Gtk.PolicyType.AUTOMATIC) - scrollwin.set_shadow_type(Gtk.ShadowType.NONE) - scrollwin.set_vexpand(True) - vbox.add(scrollwin) + scrollwin = gtk.ScrolledWindow() + scrollwin.set_policy(hscrollbar_policy=gtk.POLICY_NEVER, vscrollbar_policy=gtk.POLICY_AUTOMATIC) + scrollwin.set_shadow_type(gtk.SHADOW_NONE) + vbox.pack_start(scrollwin) - self.scales_vbox = Gtk.Grid() - self.scales_vbox.set_orientation(Gtk.Orientation.VERTICAL) - scrollwin.add(self.scales_vbox) + self.scales_vbox = gtk.VBox() + scrollwin.add_with_viewport(self.scales_vbox) - label = Gtk.Label() - label.set_single_line_mode(True) - line_height = max(label.get_size_request().height, 0) - label.destroy() - scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL) - scale.set_draw_value(False) - line_height += max(scale.get_size_request().height, 0) - scale.destroy() - # always have space for at least four sliders - scrollwin.set_size_request(width=-1, height=line_height*4+4) + label = gtk.Label() + label.set_single_line_mode(True) + line_height = label.size_request()[1] + label.destroy() + scale = gtk.HScale() + scale.set_draw_value(False) + line_height += scale.size_request()[1] + scale.destroy() + # always have space for at least four sliders + scrollwin.set_size_request(width=-1, height=line_height*4+4) - # TODO: select the default card or the first card with stream controls - if len(self.card_numbers) > 0: - self.change_card(self.card_numbers[0]) - self.update_msg_label() + # TODO: select the default card or the first card with stream controls + if len(self.card_numbers) > 0: + self.change_card(self.card_numbers[0]) + self.update_msg_label() - self.show_all() + self.show_all() - def change_card(self, cardnum): - for s in self.hctl_sources: - GLib.source_remove(s) - self.hctl_sources = [] + def change_card(self, cardnum): + for s in self.hctl_sources: + gobject.source_remove(s) + self.hctl_sources = [] - self.hcontrol = self.open_hcontrol_for_card(cardnum) + self.hcontrol = self.open_hcontrol_for_card(cardnum) - for s in self.streams: - s.destroy() - self.streams = [] + for s in self.streams: + s.destroy() + self.streams = [] - self.current_card = cardnum + self.current_card = cardnum - if not self.hcontrol: - self.update_msg_label() - return + if not self.hcontrol: + self.update_msg_label() + return - for id in self.hcontrol.list(): - if not self.is_stream_elem(id): - continue - elem = alsahcontrol.Element(self.hcontrol, id[0]) - info = alsahcontrol.Info(elem) - if not self.is_stream_info(info): - continue - stream = Stream(elem, self) - self.streams.append(stream) + for id in self.hcontrol.list(): + if not self.is_stream_elem(id): + continue + elem = alsahcontrol.Element(self.hcontrol, id[0]) + info = alsahcontrol.Info(elem) + if not self.is_stream_info(info): + continue + stream = Stream(elem, self) + self.streams.append(stream) - for fd,condition in self.hcontrol.poll_fds: - self.hctl_sources.append(GLib.io_add_watch(fd, 0, GLib.IOCondition(condition), self.hctl_io_callback)) + for fd,condition in self.hcontrol.poll_fds: + self.hctl_sources.append(gobject.io_add_watch(fd, condition, self.hctl_io_callback)) - self.update_msg_label() + self.update_msg_label() - self.scales_vbox.show_all() + self.scales_vbox.show_all() - def update_msg_label(self): - needs_msg = len(self.scales_vbox.get_children()) < 2 - has_msg = self.msg_label - if has_msg and not needs_msg: - self.msg_label.destroy() - self.msg_label = None - elif needs_msg: - if len(self.streams) > 0: - msg = "There are no open streams." - else: - msg = "This card does not have stream controls." - if not has_msg: - self.msg_label = Gtk.Label.new(msg) - self.msg_label.set_vexpand(True) - self.scales_vbox.add(self.msg_label) - self.scales_vbox.show_all() - elif self.msg_label.get_text() != msg: - self.msg_label.set_text(msg) + def update_msg_label(self): + needs_msg = len(self.scales_vbox.get_children()) < 2 + has_msg = self.msg_label + if has_msg and not needs_msg: + self.msg_label.destroy() + self.msg_label = None + elif needs_msg: + if len(self.streams) > 0: + msg = "There are no open streams." + else: + msg = "This card does not have stream controls." + if not has_msg: + self.msg_label = gtk.Label(msg) + self.scales_vbox.pack_start(self.msg_label) + self.scales_vbox.show_all() + elif self.msg_label.get_text() != msg: + self.msg_label.set_text(msg) - def open_hcontrol_for_card(self, cardnum): - devname = "hw:CARD=" + str(cardnum) - try: - hc = alsahcontrol.HControl(name=devname, - mode=alsahcontrol.open_mode['NONBLOCK']) - except: - # TODO: alsa error msg - dlg = Gtk.MessageDialog(self, - Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT, - Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, - "Cannot open sound card control device.") - dlg.run() - dlg.destroy() - return None - return hc + def open_hcontrol_for_card(self, cardnum): + devname = "hw:CARD=" + str(cardnum) + try: + hc = alsahcontrol.HControl(name=devname, + mode=alsahcontrol.open_mode['NONBLOCK']) + except: + # TODO: alsa error msg + dlg = gtk.MessageDialog(self, + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, + gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, + "Cannot open sound card control device.") + dlg.run() + dlg.destroy() + return None + return hc - def is_stream_elem(self, id): - return ((id[1] == INTF_PCM and - id[4] in ("PCM Playback Volume", "EMU10K1 PCM Volume")) or - (id[1] == INTF_MIXER and - id[4] == "VIA DXS Playback Volume")) + def is_stream_elem(self, id): + return ((id[1] == INTF_PCM and + id[4] in ("PCM Playback Volume", "EMU10K1 PCM Volume")) or + (id[1] == INTF_MIXER and + id[4] == "VIA DXS Playback Volume")) - def is_stream_info(self, info): - return info.is_readable and info.is_writable and info.type == TYPE_INTEGER + def is_stream_info(self, info): + return info.is_readable and info.is_writable and info.type == TYPE_INTEGER - def hctl_io_callback(self, source, condition): - self.hcontrol.handle_events() - return True + def hctl_io_callback(self, source, condition): + self.hcontrol.handle_events() + return True def main(): - MixerWindow() - Gtk.main() + MixerWindow() + gtk.main() main() diff --git a/ld10k1/COPYING b/ld10k1/COPYING index 623b625..d60c31a 100644 --- a/ld10k1/COPYING +++ b/ld10k1/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/ld10k1/COPYING.LIB b/ld10k1/COPYING.LIB index ae23fcf..b1e3f5a 100644 --- a/ld10k1/COPYING.LIB +++ b/ld10k1/COPYING.LIB @@ -2,7 +2,7 @@ Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/ld10k1/configure.ac b/ld10k1/configure.ac index f48ca31..276b24e 100644 --- a/ld10k1/configure.ac +++ b/ld10k1/configure.ac @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE([enable]) AC_CONFIG_HEADERS(config.h) -AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC AC_PROG_LD AC_PROG_INSTALL diff --git a/ld10k1/contrib/emu10k1MIDIEffects/freberv.asm b/ld10k1/contrib/emu10k1MIDIEffects/freberv.asm index a7f91b1..3fe1b9e 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/freberv.asm +++ b/ld10k1/contrib/emu10k1MIDIEffects/freberv.asm @@ -15,7 +15,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv10k1.m4,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/contrib/emu10k1MIDIEffects/fv-basstreble.inc b/ld10k1/contrib/emu10k1MIDIEffects/fv-basstreble.inc index d4d7216..e727673 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/fv-basstreble.inc +++ b/ld10k1/contrib/emu10k1MIDIEffects/fv-basstreble.inc @@ -16,7 +16,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv-basstreble.inc,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/contrib/emu10k1MIDIEffects/fv-controls.inc b/ld10k1/contrib/emu10k1MIDIEffects/fv-controls.inc index 749a4b1..d2ac8cb 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/fv-controls.inc +++ b/ld10k1/contrib/emu10k1MIDIEffects/fv-controls.inc @@ -15,7 +15,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv-controls.inc,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/contrib/emu10k1MIDIEffects/fv-filters-reduced.inc b/ld10k1/contrib/emu10k1MIDIEffects/fv-filters-reduced.inc index bd50b2f..e7357cd 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/fv-filters-reduced.inc +++ b/ld10k1/contrib/emu10k1MIDIEffects/fv-filters-reduced.inc @@ -15,7 +15,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv-filters.m4,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/contrib/emu10k1MIDIEffects/fv-filters.inc b/ld10k1/contrib/emu10k1MIDIEffects/fv-filters.inc index 84c2b06..12ee8a0 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/fv-filters.inc +++ b/ld10k1/contrib/emu10k1MIDIEffects/fv-filters.inc @@ -15,7 +15,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv-filters.m4,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/contrib/emu10k1MIDIEffects/fv-routes.inc b/ld10k1/contrib/emu10k1MIDIEffects/fv-routes.inc index a4ea931..a45a9cb 100644 --- a/ld10k1/contrib/emu10k1MIDIEffects/fv-routes.inc +++ b/ld10k1/contrib/emu10k1MIDIEffects/fv-routes.inc @@ -15,7 +15,7 @@ ;; ;; 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;; ;; $Id: fv-routes.inc,v 1.1 2001/09/28 01:56:20 dbertrand Exp $ diff --git a/ld10k1/include/comm.h b/ld10k1/include/comm.h index e8f2458..2293aaa 100644 --- a/ld10k1/include/comm.h +++ b/ld10k1/include/comm.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/ld10k1_error.h b/ld10k1/include/ld10k1_error.h index 9f7d455..a36ba78 100644 --- a/ld10k1/include/ld10k1_error.h +++ b/ld10k1/include/ld10k1_error.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/ld10k1_fnc.h b/ld10k1/include/ld10k1_fnc.h index c296ac6..b027336 100644 --- a/ld10k1/include/ld10k1_fnc.h +++ b/ld10k1/include/ld10k1_fnc.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/liblo10k1.h b/ld10k1/include/liblo10k1.h index 2cc12c0..9f57850 100644 --- a/ld10k1/include/liblo10k1.h +++ b/ld10k1/include/liblo10k1.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/liblo10k1ef.h b/ld10k1/include/liblo10k1ef.h index 8c233e3..fb95025 100644 --- a/ld10k1/include/liblo10k1ef.h +++ b/ld10k1/include/liblo10k1ef.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/liblo10k1lf.h b/ld10k1/include/liblo10k1lf.h index 3207321..c51bb44 100644 --- a/ld10k1/include/liblo10k1lf.h +++ b/ld10k1/include/liblo10k1lf.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/include/lo10k1.h b/ld10k1/include/lo10k1.h index d3ab084..67a8af1 100644 --- a/ld10k1/include/lo10k1.h +++ b/ld10k1/include/lo10k1.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/comm.c b/ld10k1/src/comm.c index a9d2965..f010e20 100644 --- a/ld10k1/src/comm.c +++ b/ld10k1/src/comm.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/dl10k1.c b/ld10k1/src/dl10k1.c index b2f3a54..7ca3f43 100644 --- a/ld10k1/src/dl10k1.c +++ b/ld10k1/src/dl10k1.c @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -354,7 +354,7 @@ int dump_load(int audigy, char *file_name) fctrl = (ld10k1_ctl_dump_t *)ptr; memset(ctrl, 0, sizeof(emu10k1_fx8010_control_gpr_t) * header->ctl_count); for (i = 0; i < header->ctl_count; i++) { - strcpy((char *)ctrl[i].id.name, fctrl[i].name); + strcpy(ctrl[i].id.name, fctrl[i].name); ctrl[i].id.iface = EMU10K1_CTL_ELEM_IFACE_MIXER; ctrl[i].id.index = fctrl[i].index; ctrl[i].vcount = fctrl[i].vcount; diff --git a/ld10k1/src/ld10k1.c b/ld10k1/src/ld10k1.c index 97be2c0..e31c5af 100644 --- a/ld10k1/src/ld10k1.c +++ b/ld10k1/src/ld10k1.c @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -77,7 +77,7 @@ void error(const char *fmt, ...) va_end(va); } -static void alog(const char *fmt, ...) +static void log(const char *fmt, ...) { va_list va; @@ -116,7 +116,7 @@ static void cleanup() { if (pidpath[0]) unlink(pidpath); - alog("Exiting daemon"); + log("Exiting daemon"); } static void term_handler(int i) @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) pidfile = fopen(pidpath, "wt"); if (!pidfile) { - alog("%s: pidfile (%s)\n", strerror(errno), pidpath); + log("%s: pidfile (%s)\n", strerror(errno), pidpath); return 1; } @@ -263,7 +263,7 @@ int main(int argc, char *argv[]) dup2(fileno(logfile), fileno(stdout)); } - alog("Starting daemon"); + log("Starting daemon"); } params.type = uses_pipe ? COMM_TYPE_LOCAL : COMM_TYPE_IP; diff --git a/ld10k1/src/ld10k1.h b/ld10k1/src/ld10k1.h index 7654e82..aa10304 100644 --- a/ld10k1/src/ld10k1.h +++ b/ld10k1/src/ld10k1.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_debug.c b/ld10k1/src/ld10k1_debug.c index 2b98160..6ba0ec6 100644 --- a/ld10k1/src/ld10k1_debug.c +++ b/ld10k1/src/ld10k1_debug.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_debug.h b/ld10k1/src/ld10k1_debug.h index aa015c1..519eab3 100644 --- a/ld10k1/src/ld10k1_debug.h +++ b/ld10k1/src/ld10k1_debug.h @@ -14,7 +14,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_driver.c b/ld10k1/src/ld10k1_driver.c index 05b1415..c22418e 100644 --- a/ld10k1/src/ld10k1_driver.c +++ b/ld10k1/src/ld10k1_driver.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -199,7 +199,7 @@ int ld10k1_update_driver(ld10k1_dsp_mgr_t *dsp_mgr) if (!add_ctrl) return LD10K1_ERR_NO_MEM; for (i = 0, item = dsp_mgr->add_ctl_list; item != NULL; item = item->next, i++) { - strcpy((char *)add_ctrl[i].id.name, item->ctl.name); + strcpy(add_ctrl[i].id.name, item->ctl.name); add_ctrl[i].id.iface = EMU10K1_CTL_ELEM_IFACE_MIXER; add_ctrl[i].id.index = item->ctl.index; add_ctrl[i].vcount = item->ctl.vcount; @@ -225,7 +225,7 @@ int ld10k1_update_driver(ld10k1_dsp_mgr_t *dsp_mgr) if (!del_ids) return LD10K1_ERR_NO_MEM; for (i = 0, item = dsp_mgr->del_ctl_list; item != NULL; item = item->next, i++) { - strcpy((char *)del_ids[i].name, item->ctl.name); + strcpy(del_ids[i].name, item->ctl.name); del_ids[i].iface = EMU10K1_CTL_ELEM_IFACE_MIXER; del_ids[i].index = item->ctl.index; } diff --git a/ld10k1/src/ld10k1_driver.h b/ld10k1/src/ld10k1_driver.h index 13b2840..2a3bc4d 100644 --- a/ld10k1/src/ld10k1_driver.h +++ b/ld10k1/src/ld10k1_driver.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_dump.c b/ld10k1/src/ld10k1_dump.c index f4cab49..f2167b0 100644 --- a/ld10k1/src/ld10k1_dump.c +++ b/ld10k1/src/ld10k1_dump.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_dump.h b/ld10k1/src/ld10k1_dump.h index bf04c8c..f5e50ef 100644 --- a/ld10k1/src/ld10k1_dump.h +++ b/ld10k1/src/ld10k1_dump.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_dump_file.h b/ld10k1/src/ld10k1_dump_file.h index aa4a6be..6a2a5fb 100644 --- a/ld10k1/src/ld10k1_dump_file.h +++ b/ld10k1/src/ld10k1_dump_file.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_fnc.c b/ld10k1/src/ld10k1_fnc.c index 7e99d55..bf4c28a 100644 --- a/ld10k1/src/ld10k1_fnc.c +++ b/ld10k1/src/ld10k1_fnc.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -2152,7 +2152,7 @@ int ld10k1_conn_point_add(ld10k1_dsp_mgr_t *dsp_mgr, ld10k1_conn_point_t *point, int allocgprcount = 0; int allocinstrcount = 0; unsigned int reserved[2]; - int res[2]; + unsigned int res[2]; int reservedcount = 0; int usedreserved = 0; diff --git a/ld10k1/src/ld10k1_fnc1.c b/ld10k1/src/ld10k1_fnc1.c index c3ea754..ff8010a 100644 --- a/ld10k1/src/ld10k1_fnc1.c +++ b/ld10k1/src/ld10k1_fnc1.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -179,7 +179,7 @@ int main_loop(comm_param *param, int audigy, const char *card_id, int tram_size, { fd_set active_fd_set/*, read_fd_set*/; int i, j, res = 0; - sighandler_t old_sig_pipe; + __sighandler_t old_sig_pipe; int main_sock = 0; int data_sock = 0; @@ -792,9 +792,12 @@ int ld10k1_fnc_name_find(int data_conn, int op, int size) int ld10k1_fnc_name_rename(int data_conn, int op, int size) { ld10k1_fnc_name_t name_info; + int ret; int err; ld10k1_patch_t *patch; + ret = -1; + if ((err = receive_msg_data(data_conn, &name_info, sizeof(ld10k1_fnc_name_t))) < 0) return err; diff --git a/ld10k1/src/ld10k1_fnc1.h b/ld10k1/src/ld10k1_fnc1.h index 81e1714..696abc8 100644 --- a/ld10k1/src/ld10k1_fnc1.h +++ b/ld10k1/src/ld10k1_fnc1.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_fnc_int.h b/ld10k1/src/ld10k1_fnc_int.h index d5961d0..b7e4af7 100644 --- a/ld10k1/src/ld10k1_fnc_int.h +++ b/ld10k1/src/ld10k1_fnc_int.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_mixer.c b/ld10k1/src/ld10k1_mixer.c index 20db26e..772b98c 100644 --- a/ld10k1/src/ld10k1_mixer.c +++ b/ld10k1/src/ld10k1_mixer.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_mixer.h b/ld10k1/src/ld10k1_mixer.h index 50b86ce..e1251bc 100644 --- a/ld10k1/src/ld10k1_mixer.h +++ b/ld10k1/src/ld10k1_mixer.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_tram.c b/ld10k1/src/ld10k1_tram.c index 1272ca3..840f552 100644 --- a/ld10k1/src/ld10k1_tram.c +++ b/ld10k1/src/ld10k1_tram.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/ld10k1_tram.h b/ld10k1/src/ld10k1_tram.h index 871282a..380f8e0 100644 --- a/ld10k1/src/ld10k1_tram.h +++ b/ld10k1/src/ld10k1_tram.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/liblo10k1.c b/ld10k1/src/liblo10k1.c index afe37a4..8861876 100644 --- a/ld10k1/src/liblo10k1.c +++ b/ld10k1/src/liblo10k1.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/liblo10k1ef.c b/ld10k1/src/liblo10k1ef.c index 84fda78..c01ac58 100644 --- a/ld10k1/src/liblo10k1ef.c +++ b/ld10k1/src/liblo10k1ef.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/liblo10k1lf.c b/ld10k1/src/liblo10k1lf.c index 132d3fe..3cb1ffc 100644 --- a/ld10k1/src/liblo10k1lf.c +++ b/ld10k1/src/liblo10k1lf.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/ld10k1/src/lo10k1.c b/ld10k1/src/lo10k1.c index c1223cb..962c3ef 100644 --- a/ld10k1/src/lo10k1.c +++ b/ld10k1/src/lo10k1.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ @@ -473,9 +473,8 @@ static int transfer_patch(int udin, char *ctrl_opt, liblo10k1_emu_patch_t *ep, l if (*ctrl_opt != ',') { error("wrong ctrl option format - wrong separator beetwen subfunctions"); return 1; - } else { - ctrl_opt++; - } + } else + *ctrl_opt++; } } @@ -692,9 +691,8 @@ static int transfer_native_patch(liblo10k1_dsp_patch_t *p, char *ctrl_opt) if (*ctrl_opt != ',') { error("wrong ctrl option format - wrong separator beetwen subfunctions"); return 1; - } else { - ctrl_opt++; - } + } else + *ctrl_opt++; } } @@ -1468,6 +1466,7 @@ int main(int argc, char *argv[]) int opt_list; int opt_setup; + int opt_info; int opt_add; int opt_del; int opt_con_add; @@ -1527,6 +1526,7 @@ int main(int argc, char *argv[]) opt_add = 0; opt_del = 0; opt_list_patch = NULL; + opt_info = 0; opt_con_add = 0; opt_con_del = 0; opt_debug = 0; @@ -1618,7 +1618,7 @@ int main(int argc, char *argv[]) opt_list_patch = optarg; break; case 'i': - /* nothing */ + opt_info = 1; break; case 'q': opt_con_add = 1; diff --git a/mixartloader/mixartloader.c b/mixartloader/mixartloader.c index 19a1615..663ca32 100644 --- a/mixartloader/mixartloader.c +++ b/mixartloader/mixartloader.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -89,8 +89,7 @@ static int get_file_name(const char *key, unsigned int idx, char *fname) for (p = buf + len; *p && isspace(*p); p++) ; if (*p == '/') { - strncpy(fname, p, MAX_PATH - 1); - fname[MAX_PATH - 1] = '\0'; + strncpy(fname, p, MAX_PATH); } else { snprintf(fname, MAX_PATH, "%s/%s", DATAPATH, p); } diff --git a/pcxhrloader/pcxhrloader.c b/pcxhrloader/pcxhrloader.c index 5cd1845..a5ef079 100644 --- a/pcxhrloader/pcxhrloader.c +++ b/pcxhrloader/pcxhrloader.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -89,8 +89,7 @@ static int get_file_name(const char *key, unsigned int idx, char *fname) for (p = buf + len; *p && isspace(*p); p++) ; if (*p == '/') { - strncpy(fname, p, MAX_PATH - 1); - fname[MAX_PATH - 1] = '\0'; + strncpy(fname, p, MAX_PATH); } else { snprintf(fname, MAX_PATH, "%s/%s", DATAPATH, p); } diff --git a/qlo10k1/COPYING b/qlo10k1/COPYING index c13faf0..5b6e7c6 100644 --- a/qlo10k1/COPYING +++ b/qlo10k1/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/qlo10k1/src/aboutdialog.cpp b/qlo10k1/src/aboutdialog.cpp index a32b488..ab34666 100644 --- a/qlo10k1/src/aboutdialog.cpp +++ b/qlo10k1/src/aboutdialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/aboutdialog.h b/qlo10k1/src/aboutdialog.h index 3f29622..b72ca18 100644 --- a/qlo10k1/src/aboutdialog.h +++ b/qlo10k1/src/aboutdialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/connectionwizard.cpp b/qlo10k1/src/connectionwizard.cpp index 6c3a8fd..25aef79 100644 --- a/qlo10k1/src/connectionwizard.cpp +++ b/qlo10k1/src/connectionwizard.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/connectionwizard.h b/qlo10k1/src/connectionwizard.h index d04fa38..0db31ec 100644 --- a/qlo10k1/src/connectionwizard.h +++ b/qlo10k1/src/connectionwizard.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/custom_colors.h b/qlo10k1/src/custom_colors.h index 62f8aaf..6acef2f 100644 --- a/qlo10k1/src/custom_colors.h +++ b/qlo10k1/src/custom_colors.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/filecontroldialog.cpp b/qlo10k1/src/filecontroldialog.cpp index 37fae6a..3776f6d 100644 --- a/qlo10k1/src/filecontroldialog.cpp +++ b/qlo10k1/src/filecontroldialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/filecontroldialog.h b/qlo10k1/src/filecontroldialog.h index c4591b6..7a69230 100644 --- a/qlo10k1/src/filecontroldialog.h +++ b/qlo10k1/src/filecontroldialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_effect.xpm b/qlo10k1/src/icons/routing_effect.xpm index e0f7961..a83c5f1 100644 --- a/qlo10k1/src/icons/routing_effect.xpm +++ b/qlo10k1/src/icons/routing_effect.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_effect_stack.xpm b/qlo10k1/src/icons/routing_effect_stack.xpm index 7a207e1..0a1ed97 100644 --- a/qlo10k1/src/icons/routing_effect_stack.xpm +++ b/qlo10k1/src/icons/routing_effect_stack.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_fx.xpm b/qlo10k1/src/icons/routing_fx.xpm index 958625f..a8becfa 100644 --- a/qlo10k1/src/icons/routing_fx.xpm +++ b/qlo10k1/src/icons/routing_fx.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_in.xpm b/qlo10k1/src/icons/routing_in.xpm index 7ba3940..7f0858a 100644 --- a/qlo10k1/src/icons/routing_in.xpm +++ b/qlo10k1/src/icons/routing_in.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_normal.xpm b/qlo10k1/src/icons/routing_normal.xpm index 3336ef1..2eaf424 100644 --- a/qlo10k1/src/icons/routing_normal.xpm +++ b/qlo10k1/src/icons/routing_normal.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_out.xpm b/qlo10k1/src/icons/routing_out.xpm index bde1fd0..8a9fb22 100644 --- a/qlo10k1/src/icons/routing_out.xpm +++ b/qlo10k1/src/icons/routing_out.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_route.xpm b/qlo10k1/src/icons/routing_route.xpm index d7b6cfe..a771bbe 100644 --- a/qlo10k1/src/icons/routing_route.xpm +++ b/qlo10k1/src/icons/routing_route.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_zoom_minus.xpm b/qlo10k1/src/icons/routing_zoom_minus.xpm index baa0ea3..0fc331b 100644 --- a/qlo10k1/src/icons/routing_zoom_minus.xpm +++ b/qlo10k1/src/icons/routing_zoom_minus.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/icons/routing_zoom_plus.xpm b/qlo10k1/src/icons/routing_zoom_plus.xpm index f5aabc9..a694cde 100644 --- a/qlo10k1/src/icons/routing_zoom_plus.xpm +++ b/qlo10k1/src/icons/routing_zoom_plus.xpm @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/ld10k1file.cpp b/qlo10k1/src/ld10k1file.cpp index ecb4870..c85e709 100644 --- a/qlo10k1/src/ld10k1file.cpp +++ b/qlo10k1/src/ld10k1file.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/ld10k1file.h b/qlo10k1/src/ld10k1file.h index 068b8d0..c22f0bd 100644 --- a/qlo10k1/src/ld10k1file.h +++ b/qlo10k1/src/ld10k1file.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/loadpatchdialog.cpp b/qlo10k1/src/loadpatchdialog.cpp index f3d9a8e..5cf6721 100644 --- a/qlo10k1/src/loadpatchdialog.cpp +++ b/qlo10k1/src/loadpatchdialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/loadpatchdialog.h b/qlo10k1/src/loadpatchdialog.h index 6522c55..832a029 100644 --- a/qlo10k1/src/loadpatchdialog.h +++ b/qlo10k1/src/loadpatchdialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/main.cpp b/qlo10k1/src/main.cpp index 61c0c5a..b156d57 100644 --- a/qlo10k1/src/main.cpp +++ b/qlo10k1/src/main.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/mainwnd.cpp b/qlo10k1/src/mainwnd.cpp index 0f6fd6e..c7372ba 100644 --- a/qlo10k1/src/mainwnd.cpp +++ b/qlo10k1/src/mainwnd.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/mainwnd.h b/qlo10k1/src/mainwnd.h index 4b4aba7..50eec11 100644 --- a/qlo10k1/src/mainwnd.h +++ b/qlo10k1/src/mainwnd.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/newiodialog.cpp b/qlo10k1/src/newiodialog.cpp index 58cfcba..81453a9 100644 --- a/qlo10k1/src/newiodialog.cpp +++ b/qlo10k1/src/newiodialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/newiodialog.h b/qlo10k1/src/newiodialog.h index c33081b..29df240 100644 --- a/qlo10k1/src/newiodialog.h +++ b/qlo10k1/src/newiodialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/patchdialog.cpp b/qlo10k1/src/patchdialog.cpp index 81ea7d2..035c763 100644 --- a/qlo10k1/src/patchdialog.cpp +++ b/qlo10k1/src/patchdialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/patchdialog.h b/qlo10k1/src/patchdialog.h index 3aa82be..adbf891 100644 --- a/qlo10k1/src/patchdialog.h +++ b/qlo10k1/src/patchdialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/preferences.cpp b/qlo10k1/src/preferences.cpp index d7a78e1..913a28b 100644 --- a/qlo10k1/src/preferences.cpp +++ b/qlo10k1/src/preferences.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/preferences.h b/qlo10k1/src/preferences.h index 94dd6cd..640672d 100644 --- a/qlo10k1/src/preferences.h +++ b/qlo10k1/src/preferences.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/routingwidget.cpp b/qlo10k1/src/routingwidget.cpp index 9af85eb..ef96cf9 100644 --- a/qlo10k1/src/routingwidget.cpp +++ b/qlo10k1/src/routingwidget.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/routingwidget.h b/qlo10k1/src/routingwidget.h index c9bff50..9e4b6a8 100644 --- a/qlo10k1/src/routingwidget.h +++ b/qlo10k1/src/routingwidget.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/routingwidget_menu.cpp b/qlo10k1/src/routingwidget_menu.cpp index b2dd0e2..dc913ee 100644 --- a/qlo10k1/src/routingwidget_menu.cpp +++ b/qlo10k1/src/routingwidget_menu.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/routingwidget_new.cpp b/qlo10k1/src/routingwidget_new.cpp index ca7273f..34d708b 100644 --- a/qlo10k1/src/routingwidget_new.cpp +++ b/qlo10k1/src/routingwidget_new.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/strglobal.cpp b/qlo10k1/src/strglobal.cpp index 2682702..e5bc7d9 100644 --- a/qlo10k1/src/strglobal.cpp +++ b/qlo10k1/src/strglobal.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/strglobal.h b/qlo10k1/src/strglobal.h index 9a6b118..d988de5 100644 --- a/qlo10k1/src/strglobal.h +++ b/qlo10k1/src/strglobal.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/strparam.cpp b/qlo10k1/src/strparam.cpp index 83066bc..b042d75 100644 --- a/qlo10k1/src/strparam.cpp +++ b/qlo10k1/src/strparam.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/strparam.h b/qlo10k1/src/strparam.h index 5c1678e..7ceef2c 100644 --- a/qlo10k1/src/strparam.h +++ b/qlo10k1/src/strparam.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure.cpp b/qlo10k1/src/structure.cpp index 034d707..57d5c6e 100644 --- a/qlo10k1/src/structure.cpp +++ b/qlo10k1/src/structure.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure.h b/qlo10k1/src/structure.h index 380ee17..3342fa0 100644 --- a/qlo10k1/src/structure.h +++ b/qlo10k1/src/structure.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_aa.cpp b/qlo10k1/src/structure_aa.cpp index 277a089..d0bddb9 100644 --- a/qlo10k1/src/structure_aa.cpp +++ b/qlo10k1/src/structure_aa.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_io.cpp b/qlo10k1/src/structure_io.cpp index 61df365..466b023 100644 --- a/qlo10k1/src/structure_io.cpp +++ b/qlo10k1/src/structure_io.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_io.h b/qlo10k1/src/structure_io.h index c9fa5aa..728647c 100644 --- a/qlo10k1/src/structure_io.h +++ b/qlo10k1/src/structure_io.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_link.cpp b/qlo10k1/src/structure_link.cpp index 381fff6..bd7e7bb 100644 --- a/qlo10k1/src/structure_link.cpp +++ b/qlo10k1/src/structure_link.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_link.h b/qlo10k1/src/structure_link.h index d6f27ca..dc5c00f 100644 --- a/qlo10k1/src/structure_link.h +++ b/qlo10k1/src/structure_link.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_patch.cpp b/qlo10k1/src/structure_patch.cpp index 7d1041a..0fa1871 100644 --- a/qlo10k1/src/structure_patch.cpp +++ b/qlo10k1/src/structure_patch.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/structure_patch.h b/qlo10k1/src/structure_patch.h index 00efbe7..1e66336 100644 --- a/qlo10k1/src/structure_patch.h +++ b/qlo10k1/src/structure_patch.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/transformpatchdialog.cpp b/qlo10k1/src/transformpatchdialog.cpp index 05c171a..9313053 100644 --- a/qlo10k1/src/transformpatchdialog.cpp +++ b/qlo10k1/src/transformpatchdialog.cpp @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/qlo10k1/src/transformpatchdialog.h b/qlo10k1/src/transformpatchdialog.h index 88a1603..8962180 100644 --- a/qlo10k1/src/transformpatchdialog.h +++ b/qlo10k1/src/transformpatchdialog.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/rmedigicontrol/COPYING b/rmedigicontrol/COPYING index c13faf0..5b6e7c6 100644 --- a/rmedigicontrol/COPYING +++ b/rmedigicontrol/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/rmedigicontrol/rmedigicontrol.c b/rmedigicontrol/rmedigicontrol.c index 1119637..973299b 100644 --- a/rmedigicontrol/rmedigicontrol.c +++ b/rmedigicontrol/rmedigicontrol.c @@ -29,7 +29,7 @@ void destroy(GtkWidget *widget,gpointer data) int main(int argc, char *argv[]) { int card; - char name[16],*err; + char name[8],*err; snd_ctl_card_info_t *hw_info; card_type_t type; diff --git a/sb16_csp/COPYING b/sb16_csp/COPYING index c13faf0..5b6e7c6 100644 --- a/sb16_csp/COPYING +++ b/sb16_csp/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/sb16_csp/cspctl.1 b/sb16_csp/cspctl.1 index e9ccf6d..10249f8 100644 --- a/sb16_csp/cspctl.1 +++ b/sb16_csp/cspctl.1 @@ -1,4 +1,5 @@ .TH cspctl 1 "April 27, 2000" +.LO 1 .SH NAME cspctl \- Sound Blaster 16 ASP/CSP control program diff --git a/sb16_csp/cspctl.c b/sb16_csp/cspctl.c index d29fa12..3fd1d3f 100644 --- a/sb16_csp/cspctl.c +++ b/sb16_csp/cspctl.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ diff --git a/seq/sbiload/COPYING b/seq/sbiload/COPYING index c13faf0..5b6e7c6 100644 --- a/seq/sbiload/COPYING +++ b/seq/sbiload/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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. diff --git a/seq/sbiload/sbiload.c b/seq/sbiload/sbiload.c index 2315974..7465a82 100644 --- a/seq/sbiload/sbiload.c +++ b/seq/sbiload/sbiload.c @@ -14,7 +14,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * Oct. 2007 - Takashi Iwai diff --git a/sscape_ctl/sscape_ctl.c b/sscape_ctl/sscape_ctl.c index 4239757..0bea604 100644 --- a/sscape_ctl/sscape_ctl.c +++ b/sscape_ctl/sscape_ctl.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include diff --git a/us428control/Cus428Midi.cc b/us428control/Cus428Midi.cc index 455ee90..b9e6783 100644 --- a/us428control/Cus428Midi.cc +++ b/us428control/Cus428Midi.cc @@ -16,7 +16,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -32,22 +32,22 @@ char Cus428Midi::KnobParam[] = { 0x2A, 0x29, 0x28, - (char)-1, + -1, 0x10, 0x11, 0x18, 0x19, 0x1A, - (char)-1, - (char)-1, - (char)-1, - (char)-1, + -1, + -1, + -1, + -1, 0x2C, 0x2D, 0x2E, 0x2F, - (char)-1, - (char)-1, + -1, + -1, 0x20, 0x21, 0x22, @@ -64,14 +64,14 @@ char Cus428Midi::KnobParam[] = { 5, 6, 7, - (char)-1, - (char)-1, - (char)-1, - (char)-1, - (char)-1, - (char)-1, - (char)-1, - (char)-1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, 0x30, 0x31, 0x32, diff --git a/us428control/Cus428Midi.h b/us428control/Cus428Midi.h index 1c1a220..63c91e7 100644 --- a/us428control/Cus428Midi.h +++ b/us428control/Cus428Midi.h @@ -16,7 +16,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "Cus428State.h" diff --git a/us428control/Cus428State.cc b/us428control/Cus428State.cc index 70131bc..280c21d 100644 --- a/us428control/Cus428State.cc +++ b/us428control/Cus428State.cc @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include diff --git a/us428control/Cus428State.h b/us428control/Cus428State.h index af08096..657e656 100644 --- a/us428control/Cus428State.h +++ b/us428control/Cus428State.h @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef Cus428State_h diff --git a/us428control/Cus428_ctls.cc b/us428control/Cus428_ctls.cc index bfac10f..3d59aba 100644 --- a/us428control/Cus428_ctls.cc +++ b/us428control/Cus428_ctls.cc @@ -16,7 +16,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include diff --git a/us428control/Cus428_ctls.h b/us428control/Cus428_ctls.h index 695f342..29da790 100644 --- a/us428control/Cus428_ctls.h +++ b/us428control/Cus428_ctls.h @@ -16,7 +16,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef Cus428_ctls_h diff --git a/us428control/us428control.cc b/us428control/us428control.cc index 8cb3c42..3163402 100644 --- a/us428control/us428control.cc +++ b/us428control/us428control.cc @@ -17,7 +17,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -63,7 +63,7 @@ static void usage(void) { printf("Tascam US-428 Control\n"); printf("version %s\n", VERSION); - printf("usage: " PROGNAME " [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); + printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); printf("mode is one of (us224, us428, mixxx)\n"); } /* diff --git a/us428control/usbus428ctldefs.h b/us428control/usbus428ctldefs.h index f698e38..1063bae 100644 --- a/us428control/usbus428ctldefs.h +++ b/us428control/usbus428ctldefs.h @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef __cplusplus diff --git a/usx2yloader/usx2yloader.c b/usx2yloader/usx2yloader.c index 363cbdc..ab76acc 100644 --- a/usx2yloader/usx2yloader.c +++ b/usx2yloader/usx2yloader.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -225,8 +225,7 @@ static int get_file_name(const char *key, unsigned int idx, char *fname) for (p = buf + len; *p && isspace(*p); p++) ; if (*p == '/') { - strncpy(fname, p, MAX_PATH - 1); - fname[MAX_PATH - 1] = '\0'; + strncpy(fname, p, MAX_PATH); } else { snprintf(fname, MAX_PATH, "%s/%s", DATAPATH, p); } diff --git a/vxloader/vxloader.c b/vxloader/vxloader.c index cc62e1e..6539674 100644 --- a/vxloader/vxloader.c +++ b/vxloader/vxloader.c @@ -15,7 +15,7 @@ * * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -214,8 +214,7 @@ static int get_file_name(const char *key, unsigned int idx, char *fname) for (p = buf + len; *p && isspace(*p); p++) ; if (*p == '/') { - strncpy(fname, p, MAX_PATH - 1); - fname[MAX_PATH - 1] = '\0'; + strncpy(fname, p, MAX_PATH); } else { snprintf(fname, MAX_PATH, "%s/%s", DATAPATH, p); }