From c4afb782fd6ea7e6bab10d0439bf02ac12656eca Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 24 Nov 2003 18:16:26 +0000 Subject: [PATCH] - updated to version 1.4 fixed compile warnings. --- hdspconf/ChangeLog | 6 ++++ hdspconf/configure.in | 2 +- hdspconf/src/HC_Aeb.cxx | 1 - hdspconf/src/HC_AutoSyncRef.cxx | 4 +-- hdspconf/src/HC_AutoSyncRef.h | 1 + hdspconf/src/HC_BreakoutCable.cxx | 1 - hdspconf/src/HC_ClockSource.cxx | 3 +- hdspconf/src/HC_ClockSource.h | 2 ++ hdspconf/src/HC_InputLevel.cxx | 3 +- hdspconf/src/HC_OutputLevel.cxx | 3 +- hdspconf/src/HC_Phones.cxx | 3 +- hdspconf/src/HC_PrefSyncRef.cxx | 3 +- hdspconf/src/HC_SpdifFreq.h | 1 + hdspconf/src/HC_SpdifIn.cxx | 3 +- hdspconf/src/HC_SystemClock.h | 1 + hdspconf/src/Makefile.am | 4 ++- hdspconf/src/hdspconf.cxx | 38 -------------------- hdspconf/src/labels.cxx | 59 +++++++++++++++++++++++++++++++ hdspconf/src/labels.h | 30 ++++++++++++++++ 19 files changed, 117 insertions(+), 51 deletions(-) create mode 100644 hdspconf/src/labels.cxx create mode 100644 hdspconf/src/labels.h diff --git a/hdspconf/ChangeLog b/hdspconf/ChangeLog index c396ad8..1adeefd 100644 --- a/hdspconf/ChangeLog +++ b/hdspconf/ChangeLog @@ -1,2 +1,8 @@ +Version 1.4 (24/11/2003) : + * Fix compilation warnings + +Version 1.3 (21/11/2003) : + * Added a .desktop file and icon + Version 1.2 (01/11/2003) : * added support for HDSP 9652 and HDSP 9632 specific features diff --git a/hdspconf/configure.in b/hdspconf/configure.in index bbc2da5..74cc928 100644 --- a/hdspconf/configure.in +++ b/hdspconf/configure.in @@ -1,5 +1,5 @@ AC_INIT(src/hdspconf.cxx) -AM_INIT_AUTOMAKE(hdspconf, 1.3) +AM_INIT_AUTOMAKE(hdspconf, 1.4) AC_PROG_CXX AC_PROG_MAKE_SET diff --git a/hdspconf/src/HC_Aeb.cxx b/hdspconf/src/HC_Aeb.cxx index 571ad4d..ba7b76a 100644 --- a/hdspconf/src/HC_Aeb.cxx +++ b/hdspconf/src/HC_Aeb.cxx @@ -57,7 +57,6 @@ void adat_internal_cb(Fl_Widget *w, void *arg) HC_Aeb::HC_Aeb(int x, int y, int w, int h):Fl_Group(x, y, w, h, "AEB") { - int i = 0; lock = 0; box(FL_ENGRAVED_FRAME); label("AEB"); diff --git a/hdspconf/src/HC_AutoSyncRef.cxx b/hdspconf/src/HC_AutoSyncRef.cxx index ff4f29c..f20bbad 100644 --- a/hdspconf/src/HC_AutoSyncRef.cxx +++ b/hdspconf/src/HC_AutoSyncRef.cxx @@ -20,9 +20,7 @@ #pragma implementation #include "HC_AutoSyncRef.h" - -extern char *freqs[10]; -extern char *ref[7]; +#include "labels.h" HC_AutoSyncRef::HC_AutoSyncRef(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "AutoSync Ref.") { diff --git a/hdspconf/src/HC_AutoSyncRef.h b/hdspconf/src/HC_AutoSyncRef.h index 2ce0921..497d1d7 100644 --- a/hdspconf/src/HC_AutoSyncRef.h +++ b/hdspconf/src/HC_AutoSyncRef.h @@ -26,6 +26,7 @@ #include #include #include "HC_CardPane.h" +#include "labels.h" class HC_CardPane; diff --git a/hdspconf/src/HC_BreakoutCable.cxx b/hdspconf/src/HC_BreakoutCable.cxx index e0baa92..229f9b8 100644 --- a/hdspconf/src/HC_BreakoutCable.cxx +++ b/hdspconf/src/HC_BreakoutCable.cxx @@ -57,7 +57,6 @@ void xlr_cb(Fl_Widget *w, void *arg) HC_BreakoutCable::HC_BreakoutCable(int x, int y, int w, int h):Fl_Group(x, y, w, h, "Breakout Cable") { - int i = 0; lock = 0; box(FL_ENGRAVED_FRAME); label("Breakout Cable"); diff --git a/hdspconf/src/HC_ClockSource.cxx b/hdspconf/src/HC_ClockSource.cxx index ac99800..f442c0e 100644 --- a/hdspconf/src/HC_ClockSource.cxx +++ b/hdspconf/src/HC_ClockSource.cxx @@ -25,11 +25,12 @@ extern char *freqs[10]; void clock_source_cb(Fl_Widget *w, void *arg) { - int src, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int src = 0; HC_ClockSource *cs = (HC_ClockSource *)arg; HC_CardPane *pane = (HC_CardPane *)(cs->parent()); Fl_Round_Button *source = (Fl_Round_Button *)w; diff --git a/hdspconf/src/HC_ClockSource.h b/hdspconf/src/HC_ClockSource.h index 27b3619..c1c527c 100644 --- a/hdspconf/src/HC_ClockSource.h +++ b/hdspconf/src/HC_ClockSource.h @@ -22,10 +22,12 @@ #ifndef HC_CLOCKSOURCE_H #define HC_CLOCKSOURCE_H + #include #include #include #include "HC_CardPane.h" +#include "labels.h" class HC_CardPane; diff --git a/hdspconf/src/HC_InputLevel.cxx b/hdspconf/src/HC_InputLevel.cxx index 157cd13..deef8dc 100644 --- a/hdspconf/src/HC_InputLevel.cxx +++ b/hdspconf/src/HC_InputLevel.cxx @@ -23,11 +23,12 @@ void input_level_cb(Fl_Widget *w, void *arg) { - int gain, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int gain = 0; Fl_Round_Button *source = (Fl_Round_Button *)w; HC_InputLevel *il = (HC_InputLevel *)arg; HC_CardPane *pane = (HC_CardPane *)il->parent(); diff --git a/hdspconf/src/HC_OutputLevel.cxx b/hdspconf/src/HC_OutputLevel.cxx index 9523ab6..f42e71a 100644 --- a/hdspconf/src/HC_OutputLevel.cxx +++ b/hdspconf/src/HC_OutputLevel.cxx @@ -23,11 +23,12 @@ void output_level_cb(Fl_Widget *w, void *arg) { - int gain, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int gain = 0; Fl_Round_Button *source = (Fl_Round_Button *)w; HC_OutputLevel *ol = (HC_OutputLevel *)arg; HC_CardPane *pane = (HC_CardPane *)ol->parent(); diff --git a/hdspconf/src/HC_Phones.cxx b/hdspconf/src/HC_Phones.cxx index 7c5f30a..fb1c600 100644 --- a/hdspconf/src/HC_Phones.cxx +++ b/hdspconf/src/HC_Phones.cxx @@ -23,11 +23,12 @@ void phones_cb(Fl_Widget *w, void *arg) { - int gain, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int gain = 0; Fl_Round_Button *source = (Fl_Round_Button *)w; HC_Phones *ph = (HC_Phones *)arg; HC_CardPane *pane = (HC_CardPane *)ph->parent(); diff --git a/hdspconf/src/HC_PrefSyncRef.cxx b/hdspconf/src/HC_PrefSyncRef.cxx index bfd3096..3fd636a 100644 --- a/hdspconf/src/HC_PrefSyncRef.cxx +++ b/hdspconf/src/HC_PrefSyncRef.cxx @@ -23,11 +23,12 @@ void pref_sync_ref_cb(Fl_Widget *w, void *arg) { - int ref, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int ref = 0; HC_PrefSyncRef *psr = (HC_PrefSyncRef *)arg; HC_CardPane *pane = (HC_CardPane *)(psr->parent()); Fl_Round_Button *source = (Fl_Round_Button *)w; diff --git a/hdspconf/src/HC_SpdifFreq.h b/hdspconf/src/HC_SpdifFreq.h index ca9c81e..ef1b1de 100644 --- a/hdspconf/src/HC_SpdifFreq.h +++ b/hdspconf/src/HC_SpdifFreq.h @@ -26,6 +26,7 @@ #include #include #include "HC_CardPane.h" +#include "labels.h" class HC_CardPane; diff --git a/hdspconf/src/HC_SpdifIn.cxx b/hdspconf/src/HC_SpdifIn.cxx index 343479f..211af05 100644 --- a/hdspconf/src/HC_SpdifIn.cxx +++ b/hdspconf/src/HC_SpdifIn.cxx @@ -23,11 +23,12 @@ void spdif_in_cb(Fl_Widget *w, void *arg) { - int in, err; + int err; char card_name[6]; snd_ctl_elem_value_t *ctl; snd_ctl_elem_id_t *id; snd_ctl_t *handle; + int in = 0; Fl_Round_Button *source = (Fl_Round_Button *)w; HC_SpdifIn *si = (HC_SpdifIn *)arg; HC_CardPane *pane = (HC_CardPane *)si->parent(); diff --git a/hdspconf/src/HC_SystemClock.h b/hdspconf/src/HC_SystemClock.h index 8102e86..c4822dd 100644 --- a/hdspconf/src/HC_SystemClock.h +++ b/hdspconf/src/HC_SystemClock.h @@ -26,6 +26,7 @@ #include #include #include "HC_CardPane.h" +#include "labels.h" class HC_CardPane; diff --git a/hdspconf/src/Makefile.am b/hdspconf/src/Makefile.am index 907fadd..9f29a4d 100644 --- a/hdspconf/src/Makefile.am +++ b/hdspconf/src/Makefile.am @@ -35,4 +35,6 @@ hdspconf_SOURCES = \ HC_AboutText.cxx \ HC_AboutText.h \ pixmaps.cxx \ - pixmaps.h + pixmaps.h \ + labels.cxx \ + labels.h diff --git a/hdspconf/src/hdspconf.cxx b/hdspconf/src/hdspconf.cxx index 22e4fa2..b56eab4 100644 --- a/hdspconf/src/hdspconf.cxx +++ b/hdspconf/src/hdspconf.cxx @@ -41,43 +41,6 @@ class HC_CardPane; class HC_XpmRenderer; class HC_AboutText; -char *card_names[5] = { - "Digiface", - "Multiface", - "HDSP9652", - "HDSP9632", - "Undefined", -}; - -char *freqs[10] = { - "32.0 kHz", - "44.1 kHz", - "48.0 kHz", - "64.0 kHz", - "88.2 kHz", - "96.0 kHz", - "-----", - "128.0 kHz", - "176.4 kHz", - "192.0 kHz", -}; - -char *ref[7] = { - "Word Clock", - "ADAT Sync", - "SPDIF", - "-----", - "ADAT1", - "ADAT2", - "ADAT3" -}; - -char *lock_status[3] = { - "No Lock", - "Lock", - "Sync" -}; - static void refresh_cb(void *arg) { Fl_Tabs *tabs = (Fl_Tabs *)arg; @@ -159,7 +122,6 @@ int main(int argc, char **argv) int card; HDSP_IO_Type hdsp_cards[4]; int alsa_index[4]; - snd_ctl_t *handle; snd_ctl_card_info_t *info; snd_pcm_info_t *pcminfo; int cards = 0; diff --git a/hdspconf/src/labels.cxx b/hdspconf/src/labels.cxx new file mode 100644 index 0000000..59880b6 --- /dev/null +++ b/hdspconf/src/labels.cxx @@ -0,0 +1,59 @@ +/* + * HDSPConf + * + * 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. + */ + +#include "labels.h" + +char *card_names[5] = { + "Digiface", + "Multiface", + "HDSP9652", + "HDSP9632", + "Undefined", +}; + +char *freqs[10] = { + "32.0 kHz", + "44.1 kHz", + "48.0 kHz", + "64.0 kHz", + "88.2 kHz", + "96.0 kHz", + "-----", + "128.0 kHz", + "176.4 kHz", + "192.0 kHz", +}; + +char *ref[7] = { + "Word Clock", + "ADAT Sync", + "SPDIF", + "-----", + "ADAT1", + "ADAT2", + "ADAT3" +}; + +char *lock_status[3] = { + "No Lock", + "Lock", + "Sync" +}; + diff --git a/hdspconf/src/labels.h b/hdspconf/src/labels.h new file mode 100644 index 0000000..42964c0 --- /dev/null +++ b/hdspconf/src/labels.h @@ -0,0 +1,30 @@ +/* + * HDSPConf + * + * 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. + */ + +#ifndef LABELS_H +#define LABELS_H + +extern char *card_names[5]; +extern char *freqs[10]; +extern char *ref[7]; +extern char *lock_status[3]; + +#endif + -- 2.47.1