[alsa-devel] [PATCH 0/6] hdspmixer fixes
Hi!
Here's a collection of fixes to hdspmixer. Besides style fixes, it re-enables support for Multiface/Digiface and other non-MADI cards.
The support was accidently lost when merging hdspmixer64 with hdspmixer. Today, RME has provided me with two cards (Multiface and AES32), so I had the opportunity to fix the broken bits.
Also, the old code never handled three cards correctly, but that's fixed, too. (and tested against the three RME cards currently in my workstation)
Cheers
Adrian Knoth (6): hdspmixer: Improve code coherency hdspmixer: Update FSF address. hdspmixer: Increase height of about window. hdspmixer: Bump version number to 1.10 hdspmixer: Fix ALSA snd_ctl_open error when running with three cards. hdspmixer: Fix metering for non-MADI cards
hdspmixer/configure.in | 2 +- hdspmixer/src/HDSPMixerAboutText.cxx | 13 ++- hdspmixer/src/HDSPMixerCard.cxx | 163 ++--------------------- hdspmixer/src/HDSPMixerOutput.cxx | 4 +- hdspmixer/src/HDSPMixerSelector.cxx | 7 +- hdspmixer/src/HDSPMixerWindow.cxx | 75 +++++++---- hdspmixer/src/HDSPMixerWindow.h | 4 +- hdspmixer/src/channelmap.h | 234 +++++++++++++++++++++++++++++++--- hdspmixer/src/defines.h | 4 +- hdspmixer/src/hdspmixer.cxx | 3 + hdspmixer/src/mappings.h | 93 -------------- 11 files changed, 308 insertions(+), 294 deletions(-) delete mode 100644 hdspmixer/src/mappings.h
Move channelmappings into one place (channelmap.h). Also, use "aes32" when referring to the card itself to avoid confusion and to be coherent with the remaining naming scheme.
This work has mainly been done by Fredrik Lingvall.
Signed-off-by: Fredrik Lingvall fredrik.lingvall@gmail.com Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerAboutText.cxx b/hdspmixer/src/HDSPMixerAboutText.cxx index d628d00..40bd862 100644 --- a/hdspmixer/src/HDSPMixerAboutText.cxx +++ b/hdspmixer/src/HDSPMixerAboutText.cxx @@ -2,6 +2,9 @@ * HDSPMixer * * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) + * + * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de) + * Fredrik Lingvall (fredrik.lingvall@gmail.com) * * 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 @@ -23,7 +26,10 @@
HDSPMixerAboutText::HDSPMixerAboutText(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "About Text") { - text = "HDSPMixer " VERSION " (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n (C) 2009 Florian Faber <faber@@faberman.de>\n (C) 2011 Adrian Knoth <adi@@drcomp.erfurt.thur.de>\n\n" + text = "HDSPMixer " VERSION " (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n" + "(C) 2009 Florian Faber <faber@@faberman.de>\n" + "(C) 2011 Adrian Knoth <adi@@drcomp.erfurt.thur.de>\n" + "(C) 2011 Fredrik lingvall <fredrik.lingvall@@gmail.com>\n\n" "Bitmaps by Ralf Brunner\n" "Many thanks to Martin Bj�rnsen, Matthias Carstens and Paul Davis\n\n" "This Program is free software; you can redistribute it and/or modify\n" diff --git a/hdspmixer/src/HDSPMixerCard.cxx b/hdspmixer/src/HDSPMixerCard.cxx index c0d38b8..eb51155 100644 --- a/hdspmixer/src/HDSPMixerCard.cxx +++ b/hdspmixer/src/HDSPMixerCard.cxx @@ -2,6 +2,9 @@ * HDSPMixer * * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) + * + * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de) + * Fredrik Lingvall (fredrik.lingvall@gmail.com) * * 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 @@ -21,144 +24,6 @@ #pragma implementation #include "HDSPMixerCard.h"
-static char channel_map_df_ss[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25 -}; - -static char channel_map_mf_ss[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char meter_map_ds[26] = { - 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char channel_map_ds[26] = { - 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char dest_map_madi_ss[32] = { - 0, 2, 4, 6, 8, 10, 12, 14, - 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, - 48, 50, 52, 54, 56, 58, 60, 62 -}; - -static char channel_map_aes[16] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 9, 10, 11, 12, 13, 14, 15 -}; - - -static char dest_map_aes[8] = { - 0, 2, 4, 6, 8, 10, 12, 14 -}; - - -static char dest_map_raydat_ss[18] = { - 4, 6, 8, 10, - 12, 14, 16, 18, - 20, 22, 24, 26, - 28, 30, 32, 34, - 0, 2 -}; - -static char dest_map_raydat_ds[10] = { - 4, 6, - 8, 10, - 12, 14, - 16, 18, - 0, 2 -}; - -static char dest_map_raydat_qs[6] = { - 4, - 6, - 8, - 10, - 0, 2 -}; - - - -static char dest_map_aio_ss[8] = { - 0, // Analogue - 8, // AES - 10, // SPDIF - 12, 14, 16, 18, // ADAT - 6 // Phones -}; - - -static char dest_map_aio_ds[6] = { - 0, // Analogue - 8, // AES - 10, // SPDIF - 12, 16, // ADAT - 6 // Phones -}; - -static char dest_map_aio_qs[5] = { - 0, // Analogue - 8, // AES - 10, // SPDIF - 12, // ADAT - 6 // Phone -}; - - -static char dest_map_mf_ss[10] = { - 0, 2, 4, 6, 16, 18, 20, 22, 24, 26 -}; - -static char dest_map_ds[8] = { - 0, 2, 8, 10, 16, 18, 24, 26 -}; - -static char dest_map_df_ss[14] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 -}; - -static char dest_map_h9652_ss[13] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 -}; - -static char dest_map_h9652_ds[7] = { - 0, 2, 8, 10, 16, 18, 24 -}; - -static char dest_map_h9632_ss[8] = { - 0, 2, 4, 6, 8, 10, 12, 14 -}; - -static char dest_map_h9632_ds[6] = { - 0, 2, 8, 10, 12, 14 -}; - -static char dest_map_h9632_qs[4] = { - 8, 10, 12, 14 -}; - -static char channel_map_h9632_ss[16] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -static char channel_map_h9632_ds[12] = { - 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -static char channel_map_h9632_qs[8] = { - 8, 9, 10, 11, 12, 13, 14, 15 -}; - static void alsactl_cb(snd_async_handler_t *handler) { int err, clock_value; @@ -426,19 +291,19 @@ void HDSPMixerCard::adjustSettings() { case 0: // SS channels_input = channels_playback = 64; channel_map_input = channel_map_playback = channel_map_unity_ss; - dest_map = dest_map_madi_ss; + dest_map = dest_map_unity; meter_map_input = meter_map_playback = channel_map_unity_ss; break; case 1: // DS channels_input = channels_playback = 32; channel_map_input = channel_map_playback = channel_map_unity_ss; - dest_map = dest_map_madi_ss; + dest_map = dest_map_unity; meter_map_input = meter_map_playback = channel_map_unity_ss; break; case 2: // QS channels_input = channels_playback = 16; channel_map_input = channel_map_playback = channel_map_unity_ss; - dest_map = dest_map_madi_ss; + dest_map = dest_map_unity; meter_map_input = meter_map_playback = channel_map_unity_ss; break; } @@ -467,7 +332,7 @@ void HDSPMixerCard::adjustSettings() { break; case 2: // QS channels_input = 8; - channels_playback =10; + channels_playback = 10; channel_map_input = channel_map_aio_in_qs; channel_map_playback = channel_map_aio_out_qs; dest_map = dest_map_aio_qs; @@ -477,16 +342,16 @@ void HDSPMixerCard::adjustSettings() { }
} else if (HDSP_AES == type) { - playbacks_offset = 64; /* FL not sure about this one? */ + playbacks_offset = 64; /* not sure about this one? */
/* 16 channels for all modes */ channels_input = 16; channels_playback = 16; - channel_map_input = channel_map_aes; - channel_map_playback = channel_map_aes; - dest_map = dest_map_aes; - meter_map_input = channel_map_aes; - meter_map_playback = channel_map_aes; + channel_map_input = channel_map_aes32; + channel_map_playback = channel_map_aes32; + dest_map = dest_map_aes32; + meter_map_input = channel_map_aes32; + meter_map_playback = channel_map_aes32;
} else if (HDSPeRayDAT == type) { playbacks_offset = 64; @@ -508,7 +373,7 @@ void HDSPMixerCard::adjustSettings() { break; case 2: // QS channels_input = 12; - channels_playback =12; + channels_playback = 12; channel_map_input = channel_map_playback = channel_map_raydat_qs; dest_map = dest_map_raydat_qs; meter_map_input = meter_map_playback = channel_map_raydat_qs; diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx index cd9122f..dd0c9f8 100644 --- a/hdspmixer/src/HDSPMixerOutput.cxx +++ b/hdspmixer/src/HDSPMixerOutput.cxx @@ -45,7 +45,7 @@ static char *labels_madi_qs[16] = { };
-static char *labels_aes[16] = { +static char *labels_aes32[16] = { "AES 1", "AES 2", "AES 3", "AES 4", "AES 5", "AES 6", "AES 7", "AES 8", "AES 9", "AES 10", "AES 11", "AES 12", "AES 13", "AES 14", "AES 15", "AES 16" }; @@ -232,7 +232,7 @@ void HDSPMixerOutput::setLabels() break; } } else if (HDSP_AES == type) { - labels_input = labels_playback = labels_aes; + labels_input = labels_playback = labels_aes32; } else if (HDSPeAIO == type) { switch (sm) { case 0: diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx index bc18f60..a4156b0 100644 --- a/hdspmixer/src/HDSPMixerSelector.cxx +++ b/hdspmixer/src/HDSPMixerSelector.cxx @@ -3,6 +3,9 @@ * * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) * + * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de) + * Fredrik Lingvall (fredrik.lingvall@gmail.com) + * * 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 @@ -44,7 +47,7 @@ static char *destinations_madi_qs[8] = { "9+10", "11+12", "13+14", "15+16" };
-static char *destinations_aes[8] = { +static char *destinations_aes32[8] = { "AES 1+2", "AES 3+4", "AES 5+6", "AES 7+8", "AES 9+10", "AES 11+12", "AES 13+14", "AES 15+16", }; @@ -304,7 +307,7 @@ void HDSPMixerSelector::setLabels() } } else if (HDSP_AES == type) { max_dest = 8; - destinations = destinations_aes; + destinations = destinations_aes32; } else if (HDSPeAIO == type) { switch (sm) { case 0: diff --git a/hdspmixer/src/channelmap.h b/hdspmixer/src/channelmap.h index de89140..8939b78 100644 --- a/hdspmixer/src/channelmap.h +++ b/hdspmixer/src/channelmap.h @@ -1,6 +1,132 @@ +/* + * HDSPMixer + * + * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de) + * Fredrik Lingvall (fredrik.lingvall@gmail.com) + * + * 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 channelmap_H #define channelmap_H
+/*** + * + * hdsp cards + * + ***/ + +// Digiface + +static char dest_map_df_ss[14] = { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 +}; + +static char channel_map_df_ss[26] = { + 0, 1, 2, 3, 4, 5, 6, 7, /* ADAT 1 */ + 8, 9, 10, 11, 12, 13, 14, 15, /* ADAT 2 */ + 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT 3 */ + 24, 25 /* SPDIF */ +}; + +// Multiface + +static char dest_map_mf_ss[10] = { + 0, 2, 4, 6, 16, 18, 20, 22, 24, 26 +}; + +static char channel_map_mf_ss[26] = { + 0, 1, 2, 3, 4, 5, 6, 7, /* Line in */ + 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */ + 24, 25, /* SPDIF */ + -1, -1, -1, -1, -1, -1, -1, -1 +}; + +// Digiface/Multiface + +static char meter_map_ds[26] = { + 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, + 24, 25, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +static char channel_map_ds[26] = { + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, + 24, 25, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +static char dest_map_ds[8] = { + 0, 2, 8, 10, 16, 18, 24, 26 +}; + +// HDSP 9652 + +static char dest_map_h9652_ss[13] = { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 +}; + +static char dest_map_h9652_ds[7] = { + 0, 2, 8, 10, 16, 18, 24 +}; + +// HDSP 9632 + +static char dest_map_h9632_ss[8] = { + 0, 2, 4, 6, 8, 10, 12, 14 +}; + +static char dest_map_h9632_ds[6] = { + 0, 2, 8, 10, 12, 14 +}; + +static char dest_map_h9632_qs[4] = { + 8, 10, 12, 14 +}; + +static char channel_map_h9632_ss[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static char channel_map_h9632_ds[12] = { + 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static char channel_map_h9632_qs[8] = { + 8, 9, 10, 11, 12, 13, 14, 15 +}; + + +/*** + * + * hdspm cards + * + ***/ + +// HDSPe MADI and MADIface + +static char dest_map_unity[32] = { + 0, 2, 4, 6, 8, 10, 12, 14, + 16, 18, 20, 22, 24, 26, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, + 48, 50, 52, 54, 56, 58, 60, 62 +}; + static char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, @@ -34,6 +160,32 @@ static char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = { -1, -1, -1, -1, -1, -1, -1, -1, };
+// HDSPe RayDAT + +static char dest_map_raydat_ss[18] = { + 4, 6, 8, 10, + 12, 14, 16, 18, + 20, 22, 24, 26, + 28, 30, 32, 34, + 0, 2 +}; + +static char dest_map_raydat_ds[10] = { + 4, 6, + 8, 10, + 12, 14, + 16, 18, + 0, 2 +}; + +static char dest_map_raydat_qs[6] = { + 4, + 6, + 8, + 10, + 0, 2 +}; + static char channel_map_raydat_ss[HDSPM_MAX_CHANNELS] = { 4, 5, 6, 7, 8, 9, 10, 11, /* ADAT 1 */ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT 2 */ @@ -78,10 +230,37 @@ static char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = { -1, -1, -1, -1, -1, -1, -1, -1, };
+// HDSPe AIO + +static char dest_map_aio_ss[8] = { + 0, // Analogue + 8, // AES + 10, // SPDIF + 12, 14, 16, 18, // ADAT + 6 // Phones +}; + + +static char dest_map_aio_ds[6] = { + 0, // Analogue + 8, // AES + 10, // SPDIF + 12, 16, // ADAT + 6 // Phones +}; + +static char dest_map_aio_qs[5] = { + 0, // Analogue + 8, // AES + 10, // SPDIF + 12, // ADAT + 6 // Phone +}; + static char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = { 0, 1, /* line in */ - 8, 9, /* aes in, */ - 10, 11, /* spdif in */ + 8, 9, /* AES in, */ + 10, 11, /* SPDIF in */ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -94,8 +273,8 @@ static char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = {
static char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = { 0, 1, /* line out */ - 8, 9, /* aes out */ - 10, 11, /* spdif out */ + 8, 9, /* AES out */ + 10, 11, /* SPDIF out */ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */ 6, 7, /* phone out */ -1, -1, -1, -1, -1, -1, -1, -1, @@ -108,9 +287,9 @@ static char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
static char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = { 0, 1, /* line in */ - 8, 9, /* aes in */ - 10, 11, /* spdif in */ - 12, 14, 16, 18, /* adat in */ + 8, 9, /* AES in */ + 10, 11, /* SPDIF in */ + 12, 14, 16, 18, /* ADAT in */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -122,9 +301,9 @@ static char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
static char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = { 0, 1, /* line out */ - 8, 9, /* aes out */ - 10, 11, /* spdif out */ - 12, 14, 16, 18, /* adat out */ + 8, 9, /* AES out */ + 10, 11, /* SPDIF out */ + 12, 14, 16, 18, /* ADAT out */ 6, 7, /* phone out */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -137,9 +316,9 @@ static char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
static char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = { 0, 1, /* line in */ - 8, 9, /* aes in */ - 10, 11, /* spdif in */ - 12, 16, /* adat in */ + 8, 9, /* AES in */ + 10, 11, /* SPDIF in */ + 12, 16, /* ADAT in */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -151,9 +330,9 @@ static char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
static char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = { 0, 1, /* line out */ - 8, 9, /* aes out */ - 10, 11, /* spdif out */ - 12, 16, /* adat out */ + 8, 9, /* AES out */ + 10, 11, /* SPDIF out */ + 12, 16, /* ADAT out */ 6, 7, /* phone out */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -164,4 +343,27 @@ static char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
+// HDSP AES32 and HDSPe AES + +static char dest_map_aes32[8] = { + 0, 2, 4, 6, 8, 10, 12, 14 +}; + +static char channel_map_aes32[HDSPM_MAX_CHANNELS] = { + 0, 1, /* AES 1 */ + 2, 3, /* AES 2 */ + 4, 5, /* AES 3 */ + 6, 7, /* AES 4 */ + 8, 9, /* AES 5 */ + 10, 11, /* AES 6 */ + 12, 13, /* AES 7 */ + 14, 15, /* AES 8 */ + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 +}; + #endif /* channelmap_H */ diff --git a/hdspmixer/src/defines.h b/hdspmixer/src/defines.h index 7fcb4d3..2065620 100644 --- a/hdspmixer/src/defines.h +++ b/hdspmixer/src/defines.h @@ -27,7 +27,7 @@ #define HDSPeMADI 10 #define HDSPeRayDAT 11 #define HDSPeAIO 12 -#define HDSP_AES 13 /* both AES32 and HDSPeAES? */ +#define HDSP_AES 13 /* both HDSP AES32 and HDSPe AES */
#define HDSP_MAX_CHANNELS 64 #define HDSP_MAX_DEST 32 diff --git a/hdspmixer/src/hdspmixer.cxx b/hdspmixer/src/hdspmixer.cxx index a020b93..d57fe4c 100644 --- a/hdspmixer/src/hdspmixer.cxx +++ b/hdspmixer/src/hdspmixer.cxx @@ -3,6 +3,9 @@ * * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) * + * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de) + * Fredrik Lingvall (fredrik.lingvall@gmail.com) + * * 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 diff --git a/hdspmixer/src/mappings.h b/hdspmixer/src/mappings.h deleted file mode 100644 index 9589a22..0000000 --- a/hdspmixer/src/mappings.h +++ /dev/null @@ -1,93 +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. - */ - -#ifndef mappings_H -#define mappings_H - -static char channel_map_df_ss[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25 -}; - -static char channel_map_mf_ss[26] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char meter_map_ds[26] = { - 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char channel_map_ds[26] = { - 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, - 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -static char dest_map_mf_ss[10] = { - 0, 2, 4, 6, 16, 18, 20, 22, 24, 26 -}; - -static char dest_map_ds[8] = { - 0, 2, 8, 10, 16, 18, 24, 26 -}; - -static char dest_map_df_ss[14] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26 -}; - -static char dest_map_h9652_ss[13] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 -}; - -static char dest_map_h9652_ds[7] = { - 0, 2, 8, 10, 16, 18, 24 -}; - -static char dest_map_h9632_ss[8] = { - 0, 2, 4, 6, 8, 10, 12, 14 -}; - -static char dest_map_h9632_ds[6] = { - 0, 2, 8, 10, 12, 14 -}; - -static char dest_map_h9632_qs[4] = { - 8, 10, 12, 14 -}; - -static char channel_map_h9632_ss[16] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -static char channel_map_h9632_ds[12] = { - 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 -}; - -static char channel_map_h9632_qs[8] = { - 8, 9, 10, 11, 12, 13, 14, 15 -}; - -#endif -
The FSF has moved, so reflect this change in the about dialogue.
See also http://www.fsf.org/about/contact/
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerAboutText.cxx b/hdspmixer/src/HDSPMixerAboutText.cxx index 40bd862..c8c9b1a 100644 --- a/hdspmixer/src/HDSPMixerAboutText.cxx +++ b/hdspmixer/src/HDSPMixerAboutText.cxx @@ -41,8 +41,9 @@ HDSPMixerAboutText::HDSPMixerAboutText(int x, int y, int w, int h):Fl_Widget(x, "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" "See the GNU General Public License for more details.\n\n" "You should have received a copy of the GNU General Public License\n" - "along with this program; if not, write to the Free Software\n" - "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n"; + "along with this program; if not, write to the\n" + "Free Software Foundation, Inc., 51 Franklin Street, Suite 500,\n" + "Boston, MA 02110-1335, USA.\n"; }
void HDSPMixerAboutText::draw()
The copyright list got longer, so we need more vertical space.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx index 5ac3794..38e7b61 100644 --- a/hdspmixer/src/HDSPMixerWindow.cxx +++ b/hdspmixer/src/HDSPMixerWindow.cxx @@ -716,7 +716,7 @@ HDSPMixerWindow::HDSPMixerWindow(int x, int y, int w, int h, const char *label, scroll->end(); end(); setup = new HDSPMixerSetup(400, 260, "Level Meters Setup", this); - about = new HDSPMixerAbout(360, 260, "About HDSPMixer", this); + about = new HDSPMixerAbout(360, 300, "About HDSPMixer", this); i = 0; while (cards[i] != NULL) { cards[i++]->initializeCard(this);
Florian Faber's last hdspmixer64 version was 1.9, so let's make this the successor (contains everything that was in 1.9 and also Fredrik's work on AES(32) support)
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/configure.in b/hdspmixer/configure.in index 8f2c498..1b43bc9 100644 --- a/hdspmixer/configure.in +++ b/hdspmixer/configure.in @@ -1,5 +1,5 @@ AC_INIT(src/hdspmixer.cxx) -AM_INIT_AUTOMAKE(hdspmixer, 1.6) +AM_INIT_AUTOMAKE(hdspmixer, 1.10)
AC_PROG_CXX AC_PROG_MAKE_SET
If three (or more) RME cards are installed in one box, hdspmixer will try to open a non-existing 4th card, causing an error in snd_ctl_open and finally terminates itself.
cards[] is a static array, and one must not read beyond the last element. The solution is far from elegant, however, it's a rather unintrusive change.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx index 38e7b61..a2e3db8 100644 --- a/hdspmixer/src/HDSPMixerWindow.cxx +++ b/hdspmixer/src/HDSPMixerWindow.cxx @@ -219,7 +219,7 @@ static void restore_defaults_cb(Fl_Widget *widget, void *arg) snprintf(w->window_title, FL_PATH_MAX, "HDSPMixer"); w->label(w->window_title); w->resetMixer(); - while (w->cards[i] != NULL) { + while (i < MAX_CARDS && w->cards[i] != NULL) { w->restoreDefaults(i++); } w->inputs->buttons->presets->preset_change(1); @@ -408,7 +408,7 @@ void HDSPMixerWindow::load() if ((file = fopen(file_name, "r")) == NULL) { int i = 0; fl_alert("Error opening file %s for reading", file_name); - while (cards[i] != NULL) { + while (i < MAX_CARDS && cards[i] != NULL) { restoreDefaults(i++); } inputs->buttons->presets->preset_change(1); @@ -718,7 +718,7 @@ HDSPMixerWindow::HDSPMixerWindow(int x, int y, int w, int h, const char *label, setup = new HDSPMixerSetup(400, 260, "Level Meters Setup", this); about = new HDSPMixerAbout(360, 300, "About HDSPMixer", this); i = 0; - while (cards[i] != NULL) { + while (i < MAX_CARDS && cards[i] != NULL) { cards[i++]->initializeCard(this); } size_range(MIN_WIDTH, MIN_HEIGHT, cards[current_card]->window_width, cards[current_card]->window_height); @@ -729,7 +729,7 @@ HDSPMixerWindow::HDSPMixerWindow(int x, int y, int w, int h, const char *label, } else { printf("Initializing default presets\n"); i = 0; - while (cards[i] != NULL) { + while (i < MAX_CARDS && cards[i] != NULL) { restoreDefaults(i++); } inputs->buttons->presets->preset_change(1); @@ -738,7 +738,7 @@ HDSPMixerWindow::HDSPMixerWindow(int x, int y, int w, int h, const char *label, Fl::add_handler(handler_cb); Fl::add_timeout(0.030, readregisters_cb, this); i = 0; - while (cards[i] != NULL) + while (i < MAX_CARDS && cards[i] != NULL) inputs->buttons->cardselector->ActivateCard (i++); }
diff --git a/hdspmixer/src/HDSPMixerWindow.h b/hdspmixer/src/HDSPMixerWindow.h index f10b729..0eb6f1a 100644 --- a/hdspmixer/src/HDSPMixerWindow.h +++ b/hdspmixer/src/HDSPMixerWindow.h @@ -73,8 +73,8 @@ public: Fl_Scroll *scroll; HDSPMixerSetup *setup; HDSPMixerAbout *about; - HDSPMixerPresetData *data[3][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */ - HDSPMixerCard *cards[3]; + HDSPMixerPresetData *data[MAX_CARDS][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */ + HDSPMixerCard *cards[MAX_CARDS]; HDSPMixerInputs *inputs; HDSPMixerPlaybacks *playbacks; HDSPMixerOutputs *outputs; diff --git a/hdspmixer/src/defines.h b/hdspmixer/src/defines.h index 2065620..d29c37c 100644 --- a/hdspmixer/src/defines.h +++ b/hdspmixer/src/defines.h @@ -47,6 +47,8 @@
#define PAN_WIDTH 28
+#define MAX_CARDS 3 + typedef unsigned long long int int64;
#endif
Currently, hdsp and hdspm use different ioctls. Consequently, the metering is wrong. To avoid code duplication, use pointers to the corresponding struct members.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx index a2e3db8..27003a0 100644 --- a/hdspmixer/src/HDSPMixerWindow.cxx +++ b/hdspmixer/src/HDSPMixerWindow.cxx @@ -31,6 +31,9 @@ static void readregisters_cb(void *arg) snd_hwdep_t *hw; hdsp_peak_rms_t hdsp_peak_rms; struct hdspm_peak_rms hdspm_peak_rms; + bool isMADI = false; + uint32_t *input_peaks, *playback_peaks, *output_peaks; + uint64_t *input_rms, *playback_rms, *output_rms;
HDSPMixerWindow *w = (HDSPMixerWindow *)arg;
@@ -48,6 +51,7 @@ static void readregisters_cb(void *arg) (HDSPeAIO == w->cards[w->current_card]->type) || (HDSP_AES == w->cards[w->current_card]->type) || (HDSPeRayDAT == w->cards[w->current_card]->type)) { + isMADI = true; if ((err = snd_hwdep_ioctl(hw, SNDRV_HDSPM_IOCTL_GET_PEAK_RMS, (void *)&hdspm_peak_rms)) < 0) { fprintf(stderr, "HwDep ioctl failed. Metering stopped\n"); snd_hwdep_close(hw); @@ -62,33 +66,54 @@ static void readregisters_cb(void *arg) } snd_hwdep_close(hw);
- // check for speed change - if (hdspm_peak_rms.speed != w->cards[w->current_card]->speed_mode) { - w->cards[w->current_card]->setMode(hdspm_peak_rms.speed); + if (isMADI) { + // check for speed change + if (hdspm_peak_rms.speed != w->cards[w->current_card]->speed_mode) { + w->cards[w->current_card]->setMode(hdspm_peak_rms.speed); + } + input_peaks = hdspm_peak_rms.input_peaks; + playback_peaks = hdspm_peak_rms.playback_peaks; + output_peaks = hdspm_peak_rms.output_peaks; + + input_rms = hdspm_peak_rms.input_rms; + playback_rms = hdspm_peak_rms.playback_rms; + output_rms = hdspm_peak_rms.output_rms; + } else { + /* speed changes on non-MADI are already handled via alsactl_cb and + * getSpeed(), but the metering structs differ. + */ + input_peaks = hdsp_peak_rms.input_peaks; + playback_peaks = hdsp_peak_rms.playback_peaks; + output_peaks = hdsp_peak_rms.output_peaks; + + input_rms = hdsp_peak_rms.input_rms; + playback_rms = hdsp_peak_rms.playback_rms; + output_rms = hdsp_peak_rms.output_rms; }
+ /* update the meter */ if (w->inputs->buttons->input) { - for (int i = 0; i < w->cards[w->current_card]->channels_input; ++i) { - w->inputs->strips[i]->meter->update(hdspm_peak_rms.input_peaks[(w->cards[w->current_card]->meter_map_input[i])] & 0xffffff00, - hdspm_peak_rms.input_peaks[(w->cards[w->current_card]->meter_map_input[i])] & 0xf, - hdspm_peak_rms.input_rms[(w->cards[w->current_card]->meter_map_input[i])]); - } + for (int i = 0; i < w->cards[w->current_card]->channels_input; ++i) { + w->inputs->strips[i]->meter->update(input_peaks[(w->cards[w->current_card]->meter_map_input[i])] & 0xffffff00, + input_peaks[(w->cards[w->current_card]->meter_map_input[i])] & 0xf, + input_rms[(w->cards[w->current_card]->meter_map_input[i])]); + } } - + if (w->inputs->buttons->playback) { - for (int i = 0; i < w->cards[w->current_card]->channels_playback; ++i) { - w->playbacks->strips[i]->meter->update(hdspm_peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xffffff00, - hdspm_peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xf, - hdspm_peak_rms.playback_rms[(w->cards[w->current_card]->meter_map_playback[i])]); - } + for (int i = 0; i < w->cards[w->current_card]->channels_playback; ++i) { + w->playbacks->strips[i]->meter->update(playback_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xffffff00, + playback_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xf, + playback_rms[(w->cards[w->current_card]->meter_map_playback[i])]); + } }
if (w->inputs->buttons->output) { - for (int i = 0; i < w->cards[w->current_card]->channels_playback; ++i) { - w->outputs->strips[i]->meter->update(hdspm_peak_rms.output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xffffff00, - hdspm_peak_rms.output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xf, - hdspm_peak_rms.output_rms[(w->cards[w->current_card]->meter_map_playback[i])]); - } + for (int i = 0; i < w->cards[w->current_card]->channels_playback; ++i) { + w->outputs->strips[i]->meter->update(output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xffffff00, + output_peaks[(w->cards[w->current_card]->meter_map_playback[i])] & 0xf, + output_rms[(w->cards[w->current_card]->meter_map_playback[i])]); + } }
Fl::add_timeout(0.03, readregisters_cb, w);
At Thu, 24 Feb 2011 21:33:25 +0100, Adrian Knoth wrote:
Hi!
Here's a collection of fixes to hdspmixer. Besides style fixes, it re-enables support for Multiface/Digiface and other non-MADI cards.
The support was accidently lost when merging hdspmixer64 with hdspmixer. Today, RME has provided me with two cards (Multiface and AES32), so I had the opportunity to fix the broken bits.
Also, the old code never handled three cards correctly, but that's fixed, too. (and tested against the three RME cards currently in my workstation)
Thanks, applied now to alsa-tools git tree.
Though, the static definitions in channel_mapping.h aren't ideal. If these are referred from difference places, they should be external and defined only once. Currently, you'll get tons of compile warnings.
Care to fix these?
Takashi
All compiler warnings were caused by a conversion from "foo" to a char pointer. Given that the string itself really is constant, simply add the keyword to make g++ happy.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/pixmaps/Slider1.xpm b/hdspmixer/pixmaps/Slider1.xpm index 017f4d2..7c24161 100644 --- a/hdspmixer/pixmaps/Slider1.xpm +++ b/hdspmixer/pixmaps/Slider1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Slider1_xpm[] = { +char const * Slider1_xpm[] = { "13 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/Slider2.xpm b/hdspmixer/pixmaps/Slider2.xpm index f7d76b1..743b5cf 100644 --- a/hdspmixer/pixmaps/Slider2.xpm +++ b/hdspmixer/pixmaps/Slider2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Slider2_xpm[] = { +char const * Slider2_xpm[] = { "2 13 257 2", " c None", ". c #7DF846", diff --git a/hdspmixer/pixmaps/Zlmloop2.xpm b/hdspmixer/pixmaps/Zlmloop2.xpm index 42377c9..f27f075 100644 --- a/hdspmixer/pixmaps/Zlmloop2.xpm +++ b/hdspmixer/pixmaps/Zlmloop2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Zlmloop2_xpm[] = { +char const * Zlmloop2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/Zlmloopm2.xpm b/hdspmixer/pixmaps/Zlmloopm2.xpm index 55b121f..77d7dab 100644 --- a/hdspmixer/pixmaps/Zlmloopm2.xpm +++ b/hdspmixer/pixmaps/Zlmloopm2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Zlmloopm2_xpm[] = { +char const * Zlmloopm2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/b_blank.xpm b/hdspmixer/pixmaps/b_blank.xpm index c0374d2..bafadd7 100644 --- a/hdspmixer/pixmaps/b_blank.xpm +++ b/hdspmixer/pixmaps/b_blank.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_blank_xpm[] = { +char const * b_blank_xpm[] = { "13 13 13 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_card1.xpm b/hdspmixer/pixmaps/b_card1.xpm index c832a10..d818674 100644 --- a/hdspmixer/pixmaps/b_card1.xpm +++ b/hdspmixer/pixmaps/b_card1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card1_xpm[] = { +char const * b_card1_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_card2.xpm b/hdspmixer/pixmaps/b_card2.xpm index 5dd8da8..9a27ce6 100644 --- a/hdspmixer/pixmaps/b_card2.xpm +++ b/hdspmixer/pixmaps/b_card2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card2_xpm[] = { +char const * b_card2_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_card3.xpm b/hdspmixer/pixmaps/b_card3.xpm index 10e9e30..05961a0 100644 --- a/hdspmixer/pixmaps/b_card3.xpm +++ b/hdspmixer/pixmaps/b_card3.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card3_xpm[] = { +char const * b_card3_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_mute.xpm b/hdspmixer/pixmaps/b_mute.xpm index dcdc8cd..86bec57 100644 --- a/hdspmixer/pixmaps/b_mute.xpm +++ b/hdspmixer/pixmaps/b_mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_mute_xpm[] = { +char const * b_mute_xpm[] = { "30 22 52 1", " c None", ". c #DE8C00", diff --git a/hdspmixer/pixmaps/b_pre1.xpm b/hdspmixer/pixmaps/b_pre1.xpm index b81f85a..62b8874 100644 --- a/hdspmixer/pixmaps/b_pre1.xpm +++ b/hdspmixer/pixmaps/b_pre1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre1_xpm[] = { +char const * b_pre1_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre2.xpm b/hdspmixer/pixmaps/b_pre2.xpm index 731c030..4c33101 100644 --- a/hdspmixer/pixmaps/b_pre2.xpm +++ b/hdspmixer/pixmaps/b_pre2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre2_xpm[] = { +char const * b_pre2_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre3.xpm b/hdspmixer/pixmaps/b_pre3.xpm index 77162c2..0b14cb2 100644 --- a/hdspmixer/pixmaps/b_pre3.xpm +++ b/hdspmixer/pixmaps/b_pre3.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre3_xpm[] = { +char const * b_pre3_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre4.xpm b/hdspmixer/pixmaps/b_pre4.xpm index 30ab560..c22909b 100644 --- a/hdspmixer/pixmaps/b_pre4.xpm +++ b/hdspmixer/pixmaps/b_pre4.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre4_xpm[] = { +char const * b_pre4_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre5.xpm b/hdspmixer/pixmaps/b_pre5.xpm index f563537..bfc2784 100644 --- a/hdspmixer/pixmaps/b_pre5.xpm +++ b/hdspmixer/pixmaps/b_pre5.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre5_xpm[] = { +char const * b_pre5_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre6.xpm b/hdspmixer/pixmaps/b_pre6.xpm index 2d47537..b5ab0f5 100644 --- a/hdspmixer/pixmaps/b_pre6.xpm +++ b/hdspmixer/pixmaps/b_pre6.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre6_xpm[] = { +char const * b_pre6_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre7.xpm b/hdspmixer/pixmaps/b_pre7.xpm index 8de4470..4690875 100644 --- a/hdspmixer/pixmaps/b_pre7.xpm +++ b/hdspmixer/pixmaps/b_pre7.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre7_xpm[] = { +char const * b_pre7_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre8.xpm b/hdspmixer/pixmaps/b_pre8.xpm index 895263f..aa4073a 100644 --- a/hdspmixer/pixmaps/b_pre8.xpm +++ b/hdspmixer/pixmaps/b_pre8.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre8_xpm[] = { +char const * b_pre8_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_save.xpm b/hdspmixer/pixmaps/b_save.xpm index a984e28..c39529b 100644 --- a/hdspmixer/pixmaps/b_save.xpm +++ b/hdspmixer/pixmaps/b_save.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_save_xpm[] = { +char const * b_save_xpm[] = { "13 13 14 1", " c None", ". c #5C7B1B", diff --git a/hdspmixer/pixmaps/b_solo.xpm b/hdspmixer/pixmaps/b_solo.xpm index f678b19..ad6c9f5 100644 --- a/hdspmixer/pixmaps/b_solo.xpm +++ b/hdspmixer/pixmaps/b_solo.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_solo_xpm[] = { +char const * b_solo_xpm[] = { "30 22 53 1", " c None", ". c #7C2000", diff --git a/hdspmixer/pixmaps/b_zlm.xpm b/hdspmixer/pixmaps/b_zlm.xpm index c44e75b..6e9c6e9 100644 --- a/hdspmixer/pixmaps/b_zlm.xpm +++ b/hdspmixer/pixmaps/b_zlm.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_zlm_xpm[] = { +char const * b_zlm_xpm[] = { "13 13 11 1", " c None", ". c #000D00", diff --git a/hdspmixer/pixmaps/buttons.xpm b/hdspmixer/pixmaps/buttons.xpm index 7cbe5f1..3e3f44f 100644 --- a/hdspmixer/pixmaps/buttons.xpm +++ b/hdspmixer/pixmaps/buttons.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * buttons_xpm[] = { +char const * buttons_xpm[] = { "76 253 257 2", " c None", ". c #C08480", diff --git a/hdspmixer/pixmaps/empty.xpm b/hdspmixer/pixmaps/empty.xpm index 284abc1..c86fe46 100644 --- a/hdspmixer/pixmaps/empty.xpm +++ b/hdspmixer/pixmaps/empty.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_xpm[] = { +char const * empty_xpm[] = { "76 253 402 2", " c None", ". c #404840", diff --git a/hdspmixer/pixmaps/empty_2.xpm b/hdspmixer/pixmaps/empty_2.xpm index 31ff7b2..fb40d88 100644 --- a/hdspmixer/pixmaps/empty_2.xpm +++ b/hdspmixer/pixmaps/empty_2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_2_xpm[] = { +char const * empty_2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/empty_linux.xpm b/hdspmixer/pixmaps/empty_linux.xpm index e74ff51..10088d6 100644 --- a/hdspmixer/pixmaps/empty_linux.xpm +++ b/hdspmixer/pixmaps/empty_linux.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_linux_xpm[] = { +char const * empty_linux_xpm[] = { "76 253 1535 2", " c None", ". c #404840", diff --git a/hdspmixer/pixmaps/iomixer.xpm b/hdspmixer/pixmaps/iomixer.xpm index 31a4b16..15b7536 100644 --- a/hdspmixer/pixmaps/iomixer.xpm +++ b/hdspmixer/pixmaps/iomixer.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * iomixer_xpm[] = { +char const * iomixer_xpm[] = { "36 253 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/iomixer_r.xpm b/hdspmixer/pixmaps/iomixer_r.xpm index 6428cd4..cac66c9 100644 --- a/hdspmixer/pixmaps/iomixer_r.xpm +++ b/hdspmixer/pixmaps/iomixer_r.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * iomixer_r_xpm[] = { +char const * iomixer_r_xpm[] = { "36 253 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/level.xpm b/hdspmixer/pixmaps/level.xpm index a92fe26..3b776a5 100644 --- a/hdspmixer/pixmaps/level.xpm +++ b/hdspmixer/pixmaps/level.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * level_xpm[] = { +char const * level_xpm[] = { "8 139 257 2", " c None", ". c #149003", diff --git a/hdspmixer/pixmaps/matrix_black.xpm b/hdspmixer/pixmaps/matrix_black.xpm index e96c3cf..69e1e50 100644 --- a/hdspmixer/pixmaps/matrix_black.xpm +++ b/hdspmixer/pixmaps/matrix_black.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_black_xpm[] = { +char const * matrix_black_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/matrix_grey.xpm b/hdspmixer/pixmaps/matrix_grey.xpm index 40d0a34..ad5b369 100644 --- a/hdspmixer/pixmaps/matrix_grey.xpm +++ b/hdspmixer/pixmaps/matrix_grey.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_xpm[] = { +char const * matrix_grey_xpm[] = { "32 12 22 1", " c None", ". c #A0A0A0", diff --git a/hdspmixer/pixmaps/matrix_grey_l.xpm b/hdspmixer/pixmaps/matrix_grey_l.xpm index b1a434e..5eeedbe 100644 --- a/hdspmixer/pixmaps/matrix_grey_l.xpm +++ b/hdspmixer/pixmaps/matrix_grey_l.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_l_xpm[] = { +char const * matrix_grey_l_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_grey_o.xpm b/hdspmixer/pixmaps/matrix_grey_o.xpm index 8dce291..033e00b 100644 --- a/hdspmixer/pixmaps/matrix_grey_o.xpm +++ b/hdspmixer/pixmaps/matrix_grey_o.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_o_xpm[] = { +char const * matrix_grey_o_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_grey_ol.xpm b/hdspmixer/pixmaps/matrix_grey_ol.xpm index 64c6c40..4ced7f4 100644 --- a/hdspmixer/pixmaps/matrix_grey_ol.xpm +++ b/hdspmixer/pixmaps/matrix_grey_ol.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_ol_xpm[] = { +char const * matrix_grey_ol_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_mute.xpm b/hdspmixer/pixmaps/matrix_mute.xpm index 3c917d8..fcc30b2 100644 --- a/hdspmixer/pixmaps/matrix_mute.xpm +++ b/hdspmixer/pixmaps/matrix_mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_mute_xpm[] = { +char const * matrix_mute_xpm[] = { "32 12 25 1", " c None", ". c #C5C5BD", diff --git a/hdspmixer/pixmaps/matrix_white.xpm b/hdspmixer/pixmaps/matrix_white.xpm index c741b5b..ab5808a 100644 --- a/hdspmixer/pixmaps/matrix_white.xpm +++ b/hdspmixer/pixmaps/matrix_white.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_white_xpm[] = { +char const * matrix_white_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/matrix_yellow.xpm b/hdspmixer/pixmaps/matrix_yellow.xpm index c4ab7f7..6a6565c 100644 --- a/hdspmixer/pixmaps/matrix_yellow.xpm +++ b/hdspmixer/pixmaps/matrix_yellow.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_yellow_xpm[] = { +char const * matrix_yellow_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/monitor.xpm b/hdspmixer/pixmaps/monitor.xpm index 4d84ef6..8c29898 100644 --- a/hdspmixer/pixmaps/monitor.xpm +++ b/hdspmixer/pixmaps/monitor.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * monitor_xpm[] = { +char const * monitor_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/mute.xpm b/hdspmixer/pixmaps/mute.xpm index 83c71e4..fbc4707 100644 --- a/hdspmixer/pixmaps/mute.xpm +++ b/hdspmixer/pixmaps/mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * mute_xpm[] = { +char const * mute_xpm[] = { "13 26 30 1", " c None", ". c #1B7B1B", diff --git a/hdspmixer/pixmaps/output.xpm b/hdspmixer/pixmaps/output.xpm index 3fc334f..a9ccb80 100644 --- a/hdspmixer/pixmaps/output.xpm +++ b/hdspmixer/pixmaps/output.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * output_xpm[] = { +char const * output_xpm[] = { "36 208 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/output_r.xpm b/hdspmixer/pixmaps/output_r.xpm index 78fc61b..2e73c7f 100644 --- a/hdspmixer/pixmaps/output_r.xpm +++ b/hdspmixer/pixmaps/output_r.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * output_r_xpm[] = { +char const * output_r_xpm[] = { "36 208 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/over.xpm b/hdspmixer/pixmaps/over.xpm index 6b0e7e3..5918170 100644 --- a/hdspmixer/pixmaps/over.xpm +++ b/hdspmixer/pixmaps/over.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * over_xpm[] = { +char const * over_xpm[] = { "30 13 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/peak.xpm b/hdspmixer/pixmaps/peak.xpm index 88b20e3..19d46be 100644 --- a/hdspmixer/pixmaps/peak.xpm +++ b/hdspmixer/pixmaps/peak.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * peak_xpm[] = { +char const * peak_xpm[] = { "8 5 257 2", " c None", ". c #61FF48", diff --git a/hdspmixer/pixmaps/solo.xpm b/hdspmixer/pixmaps/solo.xpm index 1bfb438..42f3aca 100644 --- a/hdspmixer/pixmaps/solo.xpm +++ b/hdspmixer/pixmaps/solo.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * solo_xpm[] = { +char const * solo_xpm[] = { "13 26 28 1", " c None", ". c #3C3E2D", diff --git a/hdspmixer/src/HDSPMixerAbout.cxx b/hdspmixer/src/HDSPMixerAbout.cxx index 709529a..39587d0 100644 --- a/hdspmixer/src/HDSPMixerAbout.cxx +++ b/hdspmixer/src/HDSPMixerAbout.cxx @@ -22,7 +22,7 @@ #include "HDSPMixerAbout.h"
-HDSPMixerAbout::HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) +HDSPMixerAbout::HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) { basew = win; text = new HDSPMixerAboutText(10,10,w-20,h-20); diff --git a/hdspmixer/src/HDSPMixerAbout.h b/hdspmixer/src/HDSPMixerAbout.h index f59b256..e539935 100644 --- a/hdspmixer/src/HDSPMixerAbout.h +++ b/hdspmixer/src/HDSPMixerAbout.h @@ -36,7 +36,7 @@ private: HDSPMixerAboutText *text; HDSPMixerWindow *basew; public: - HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win); + HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win); int handle(int e); };
diff --git a/hdspmixer/src/HDSPMixerAboutText.h b/hdspmixer/src/HDSPMixerAboutText.h index 75b96ce..7ccac25 100644 --- a/hdspmixer/src/HDSPMixerAboutText.h +++ b/hdspmixer/src/HDSPMixerAboutText.h @@ -32,7 +32,7 @@ public: HDSPMixerAboutText(int x, int y, int w, int h); void draw(); private: - char *text; + char const *text; };
#endif diff --git a/hdspmixer/src/HDSPMixerGain.cxx b/hdspmixer/src/HDSPMixerGain.cxx index 9d43a73..fd6339e 100644 --- a/hdspmixer/src/HDSPMixerGain.cxx +++ b/hdspmixer/src/HDSPMixerGain.cxx @@ -33,7 +33,7 @@ void HDSPMixerGain::draw() fl_draw(text, x(), y(), w(), h(), FL_ALIGN_CENTER); }
-void HDSPMixerGain::setText(char *txt) +void HDSPMixerGain::setText(char const *txt) { strncpy(text, txt, 10); redraw(); diff --git a/hdspmixer/src/HDSPMixerGain.h b/hdspmixer/src/HDSPMixerGain.h index 9f70778..a5ab55a 100644 --- a/hdspmixer/src/HDSPMixerGain.h +++ b/hdspmixer/src/HDSPMixerGain.h @@ -39,7 +39,7 @@ public: char text[10]; HDSPMixerGain(int x, int y, int parenttype); void draw(); - void setText(char *txt); + void setText(char const *txt); };
#endif diff --git a/hdspmixer/src/HDSPMixerIOMixer.h b/hdspmixer/src/HDSPMixerIOMixer.h index a9a35de..b440007 100644 --- a/hdspmixer/src/HDSPMixerIOMixer.h +++ b/hdspmixer/src/HDSPMixerIOMixer.h @@ -51,7 +51,7 @@ class HDSPMixerMeter; class HDSPMixerIOMixer:public Fl_Group { private: - char **p_iomixer_xpm; + char const **p_iomixer_xpm; int channel_num, relative_num, mixer_type; std::stringstream channel_name; void update_child(Fl_Widget &widget); diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx index dd0c9f8..05a126c 100644 --- a/hdspmixer/src/HDSPMixerOutput.cxx +++ b/hdspmixer/src/HDSPMixerOutput.cxx @@ -21,7 +21,7 @@ #pragma implementation #include "HDSPMixerOutput.h"
-static char *labels_madi_ss[64] = { +static char const *labels_madi_ss[64] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", @@ -32,25 +32,25 @@ static char *labels_madi_ss[64] = { "57", "58", "59", "60", "61", "62", "63", "64" };
-static char *labels_madi_ds[64] = { +static char const *labels_madi_ds[64] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", };
-static char *labels_madi_qs[16] = { +static char const *labels_madi_qs[16] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", };
-static char *labels_aes32[16] = { +static char const *labels_aes32[16] = { "AES 1", "AES 2", "AES 3", "AES 4", "AES 5", "AES 6", "AES 7", "AES 8", "AES 9", "AES 10", "AES 11", "AES 12", "AES 13", "AES 14", "AES 15", "AES 16" };
-static char *labels_raydat_ss[36] = { +static char const *labels_raydat_ss[36] = { "A1.1", "A1.2", "A1.3", "A1.4", "A1.5", "A1.6", "A1.7", "A1.8", "A2.1", "A2.2", "A2.3", "A2.4", "A2.5", "A2.6", "A2.7", "A2.8", "A3.1", "A3.2", "A3.3", "A3.4", "A3.5", "A3.6", "A3.7", "A3.8", @@ -59,7 +59,7 @@ static char *labels_raydat_ss[36] = { "SP.L", "SP.R" };
-static char *labels_raydat_ds[20] = { +static char const *labels_raydat_ds[20] = { "A1.1", "A1.2", "A1.3", "A1.4", "A2.1", "A2.2", "A2.3", "A2.4", "A3.1", "A3.2", "A3.3", "A3.4", @@ -68,7 +68,7 @@ static char *labels_raydat_ds[20] = { "SP.L", "SP.R" };
-static char *labels_raydat_qs[12] = { +static char const *labels_raydat_qs[12] = { "A1.1", "A1.2", "A2.1", "A2.2", "A3.1", "A3.2", @@ -78,7 +78,7 @@ static char *labels_raydat_qs[12] = { };
-static char *labels_aio_ss_input[14] = { +static char const *labels_aio_ss_input[14] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -86,7 +86,7 @@ static char *labels_aio_ss_input[14] = { "A 5", "A 6", "A 7", "A 8" };
-static char *labels_aio_ss_playback[16] = { +static char const *labels_aio_ss_playback[16] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -95,14 +95,14 @@ static char *labels_aio_ss_playback[16] = { "PH.L", "PH.R" };
-static char *labels_aio_ds_input[10] = { +static char const *labels_aio_ds_input[10] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", "A 1", "A 2", "A 3", "A 4" };
-static char *labels_aio_ds_playback[12] = { +static char const *labels_aio_ds_playback[12] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -110,14 +110,14 @@ static char *labels_aio_ds_playback[12] = { "PH.L", "PH.R" };
-static char *labels_aio_qs_input[8] = { +static char const *labels_aio_qs_input[8] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", "A 1", "A 2" };
-static char *labels_aio_qs_playback[10] = { +static char const *labels_aio_qs_playback[10] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -126,44 +126,44 @@ static char *labels_aio_qs_playback[10] = { };
-static char *labels_mf_ss[20] = { +static char const *labels_mf_ss[20] = { "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8", "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_mf_ds[16] = { +static char const *labels_mf_ds[16] = { "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8", "A 1", "A 2", "A 3", "A 4", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_df_ss[28] = { +static char const *labels_df_ss[28] = { "A1 1", "A1 2", "A1 3", "A1 4", "A1 5", "A1 6", "A1 7", "A1 8", "A2 1", "A2 2", "A2 3", "A2 4", "A2 5", "A2 6", "A2 7", "A2 8", "A3 1", "A3 2", "A3 3", "A3 4", "A3 5", "A3 6", "A3 7", "A3 8", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_df_ds[16] = { +static char const *labels_df_ds[16] = { "A1 1", "A1 2", "A1 3", "A1 4", "A2 1", "A2 2", "A2 3", "A2 4", "A3 1", "A3 2", "A3 3", "A3 4", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_9632_ss[16] = { +static char const *labels_9632_ss[16] = { "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
-static char *labels_9632_ds[12] = { +static char const *labels_9632_ds[12] = { "A 1", "A 2", "A 3", "A 4", "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
-static char *labels_9632_qs[8] = { +static char const *labels_9632_qs[8] = { "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
diff --git a/hdspmixer/src/HDSPMixerOutput.h b/hdspmixer/src/HDSPMixerOutput.h index 2e7fb09..f38d263 100644 --- a/hdspmixer/src/HDSPMixerOutput.h +++ b/hdspmixer/src/HDSPMixerOutput.h @@ -46,8 +46,8 @@ class HDSPMixerOutput:public Fl_Group { private: int out_num; - char **labels_input, **labels_playback; - char **p_output_xpm; + char const **labels_input, **labels_playback; + char const **p_output_xpm; HDSPMixerPeak *peak; HDSPMixerWindow *basew; void update_child(Fl_Widget& widget); diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx index a4156b0..098658f 100644 --- a/hdspmixer/src/HDSPMixerSelector.cxx +++ b/hdspmixer/src/HDSPMixerSelector.cxx @@ -24,7 +24,7 @@ #pragma implementation #include "HDSPMixerSelector.h"
-static char *destinations_madi_ss[32] = { +static char const *destinations_madi_ss[32] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16", "17+18", "19+20", "21+22", "23+24", @@ -35,24 +35,24 @@ static char *destinations_madi_ss[32] = { "57+58", "59+60", "61+62", "63+64" };
-static char *destinations_madi_ds[16] = { +static char const *destinations_madi_ds[16] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16", "17+18", "19+20", "21+22", "23+24", "25+26", "27+28", "29+30", "31+32" };
-static char *destinations_madi_qs[8] = { +static char const *destinations_madi_qs[8] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16" };
-static char *destinations_aes32[8] = { +static char const *destinations_aes32[8] = { "AES 1+2", "AES 3+4", "AES 5+6", "AES 7+8", "AES 9+10", "AES 11+12", "AES 13+14", "AES 15+16", };
-static char *destinations_raydat_ss[18] = { +static char const *destinations_raydat_ss[18] = {
"A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", @@ -62,7 +62,7 @@ static char *destinations_raydat_ss[18] = { "SPDIF" };
-static char *destinations_raydat_ds[10] = { +static char const *destinations_raydat_ds[10] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", @@ -71,7 +71,7 @@ static char *destinations_raydat_ds[10] = { "SPDIF" };
-static char *destinations_raydat_qs[6] = { +static char const *destinations_raydat_qs[6] = { "A1 1+2", "A2 1+2", "A3 1+2", @@ -81,7 +81,7 @@ static char *destinations_raydat_qs[6] = { };
-static char *destinations_aio_ss[8] = { +static char const *destinations_aio_ss[8] = { "AN 1+2", "AES", "SPDIF", @@ -89,7 +89,7 @@ static char *destinations_aio_ss[8] = { "Phones" };
-static char *destinations_aio_ds[6] = { +static char const *destinations_aio_ds[6] = { "AN 1+2", "AES", "SPDIF", @@ -97,7 +97,7 @@ static char *destinations_aio_ds[6] = { "Phones" };
-static char *destinations_aio_qs[5] = { +static char const *destinations_aio_qs[5] = { "AN 1+2", "AES", "SPDIF", @@ -105,57 +105,57 @@ static char *destinations_aio_qs[5] = { "Phones" };
-static char *destinations_mf_ss[10] = { +static char const *destinations_mf_ss[10] = { "AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8", "A 1+2", "A 3+4", "A 5+6", "A 7+8", "SPDIF", "Analog" };
-static char *destinations_mf_ds[8] = { +static char const *destinations_mf_ds[8] = { "AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8", "A 1+2", "A 3+4", "SPDIF", "Analog" };
-static char *destinations_df_ss[14] = { +static char const *destinations_df_ss[14] = { "A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", "A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8", "SPDIF", "Analog" };
-static char *destinations_df_ds[8] = { +static char const *destinations_df_ds[8] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", "SPDIF", "Analog" };
-static char *destinations_h9652_ss[13] = { +static char const *destinations_h9652_ss[13] = { "A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", "A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8", "SPDIF" };
-static char *destinations_h9652_ds[7] = { +static char const *destinations_h9652_ds[7] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", "SPDIF" };
-static char *destinations_h9632_ss[8] = { +static char const *destinations_h9632_ss[8] = { "A 1+2", "A 3+4", "A 5+6", "A 7+8", "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
-static char *destinations_h9632_ds[6] = { +static char const *destinations_h9632_ds[6] = { "A 1+2", "A 3+4", "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
-static char *destinations_h9632_qs[4] = { +static char const *destinations_h9632_qs[4] = { "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
diff --git a/hdspmixer/src/HDSPMixerSelector.h b/hdspmixer/src/HDSPMixerSelector.h index 6f232cf..7994305 100644 --- a/hdspmixer/src/HDSPMixerSelector.h +++ b/hdspmixer/src/HDSPMixerSelector.h @@ -39,7 +39,7 @@ class HDSPMixerIOMixer; class HDSPMixerSelector:public Fl_Menu_ { private: - char **destinations; + char const **destinations; HDSPMixerWindow *basew; public: int max_dest; diff --git a/hdspmixer/src/HDSPMixerSetup.cxx b/hdspmixer/src/HDSPMixerSetup.cxx index 6fa3551..593ee70 100644 --- a/hdspmixer/src/HDSPMixerSetup.cxx +++ b/hdspmixer/src/HDSPMixerSetup.cxx @@ -91,7 +91,7 @@ static void rmsplus3_cb(Fl_Widget *widget, void *arg) }
-HDSPMixerSetup::HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) +HDSPMixerSetup::HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) { basew = win; plm = new Fl_Group(10, 25, 380, 60, "Peak Level Meters"); diff --git a/hdspmixer/src/HDSPMixerSetup.h b/hdspmixer/src/HDSPMixerSetup.h index 21ffbb2..ba95951 100644 --- a/hdspmixer/src/HDSPMixerSetup.h +++ b/hdspmixer/src/HDSPMixerSetup.h @@ -54,7 +54,7 @@ public: int level_val; int numbers_val; int rmsplus3_val; - HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win); + HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win); HDSPMixerWindow *basew; void updateValues(); }; diff --git a/hdspmixer/src/pixmaps.h b/hdspmixer/src/pixmaps.h index 624bd28..b980a62 100644 --- a/hdspmixer/src/pixmaps.h +++ b/hdspmixer/src/pixmaps.h @@ -21,44 +21,44 @@ #ifndef pixmaps_H #define pixmaps_H
-extern char * Slider1_xpm[]; -extern char * Slider2_xpm[]; -extern char * b_blank_xpm[]; -extern char * b_card1_xpm[]; -extern char * b_card2_xpm[]; -extern char * b_card3_xpm[]; -extern char * b_mute_xpm[]; -extern char * b_pre1_xpm[]; -extern char * b_pre2_xpm[]; -extern char * b_pre3_xpm[]; -extern char * b_pre4_xpm[]; -extern char * b_pre5_xpm[]; -extern char * b_pre6_xpm[]; -extern char * b_pre7_xpm[]; -extern char * b_pre8_xpm[]; -extern char * b_save_xpm[]; -extern char * b_solo_xpm[]; -extern char * buttons_xpm[]; -extern char * empty_xpm[]; -extern char * empty_linux_xpm[]; -extern char * iomixer_xpm[]; -extern char * level_xpm[]; -extern char * monitor_xpm[]; -extern char * mute_xpm[]; -extern char * output_xpm[]; -extern char * over_xpm[]; -extern char * peak_xpm[]; -extern char * solo_xpm[]; -extern char * iomixer_r_xpm[]; -extern char * output_r_xpm[]; -extern char * matrix_white_xpm[]; -extern char * matrix_black_xpm[]; -extern char * matrix_yellow_xpm[]; -extern char * matrix_mute_xpm[]; -extern char * matrix_grey_xpm[]; -extern char * matrix_grey_l_xpm[]; -extern char * matrix_grey_ol_xpm[]; -extern char * matrix_grey_o_xpm[]; +extern char const * Slider1_xpm[]; +extern char const * Slider2_xpm[]; +extern char const * b_blank_xpm[]; +extern char const * b_card1_xpm[]; +extern char const * b_card2_xpm[]; +extern char const * b_card3_xpm[]; +extern char const * b_mute_xpm[]; +extern char const * b_pre1_xpm[]; +extern char const * b_pre2_xpm[]; +extern char const * b_pre3_xpm[]; +extern char const * b_pre4_xpm[]; +extern char const * b_pre5_xpm[]; +extern char const * b_pre6_xpm[]; +extern char const * b_pre7_xpm[]; +extern char const * b_pre8_xpm[]; +extern char const * b_save_xpm[]; +extern char const * b_solo_xpm[]; +extern char const * buttons_xpm[]; +extern char const * empty_xpm[]; +extern char const * empty_linux_xpm[]; +extern char const * iomixer_xpm[]; +extern char const * level_xpm[]; +extern char const * monitor_xpm[]; +extern char const * mute_xpm[]; +extern char const * output_xpm[]; +extern char const * over_xpm[]; +extern char const * peak_xpm[]; +extern char const * solo_xpm[]; +extern char const * iomixer_r_xpm[]; +extern char const * output_r_xpm[]; +extern char const * matrix_white_xpm[]; +extern char const * matrix_black_xpm[]; +extern char const * matrix_yellow_xpm[]; +extern char const * matrix_mute_xpm[]; +extern char const * matrix_grey_xpm[]; +extern char const * matrix_grey_l_xpm[]; +extern char const * matrix_grey_ol_xpm[]; +extern char const * matrix_grey_o_xpm[];
#endif
We have introduced MAX_CARDS before to make the code more safe and extendable, so it's just sane to use it all over the place.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
diff --git a/hdspmixer/src/HDSPMixerIOMixer.h b/hdspmixer/src/HDSPMixerIOMixer.h index b440007..2ec7f05 100644 --- a/hdspmixer/src/HDSPMixerIOMixer.h +++ b/hdspmixer/src/HDSPMixerIOMixer.h @@ -56,7 +56,7 @@ private: std::stringstream channel_name; void update_child(Fl_Widget &widget); public: - HDSPMixerStripData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */ + HDSPMixerStripData *data[MAX_CARDS][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */ HDSPMixerPan *pan; HDSPMixerFader *fader; HDSPMixerPeak *peak;
At Mon, 28 Feb 2011 14:56:07 +0100, Adrian Knoth wrote:
All compiler warnings were caused by a conversion from "foo" to a char pointer. Given that the string itself really is constant, simply add the keyword to make g++ happy.
Signed-off-by: Adrian Knoth adi@drcomp.erfurt.thur.de
Applied both patches now. Thanks.
Takashi
diff --git a/hdspmixer/pixmaps/Slider1.xpm b/hdspmixer/pixmaps/Slider1.xpm index 017f4d2..7c24161 100644 --- a/hdspmixer/pixmaps/Slider1.xpm +++ b/hdspmixer/pixmaps/Slider1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Slider1_xpm[] = { +char const * Slider1_xpm[] = { "13 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/Slider2.xpm b/hdspmixer/pixmaps/Slider2.xpm index f7d76b1..743b5cf 100644 --- a/hdspmixer/pixmaps/Slider2.xpm +++ b/hdspmixer/pixmaps/Slider2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Slider2_xpm[] = { +char const * Slider2_xpm[] = { "2 13 257 2", " c None", ". c #7DF846", diff --git a/hdspmixer/pixmaps/Zlmloop2.xpm b/hdspmixer/pixmaps/Zlmloop2.xpm index 42377c9..f27f075 100644 --- a/hdspmixer/pixmaps/Zlmloop2.xpm +++ b/hdspmixer/pixmaps/Zlmloop2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Zlmloop2_xpm[] = { +char const * Zlmloop2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/Zlmloopm2.xpm b/hdspmixer/pixmaps/Zlmloopm2.xpm index 55b121f..77d7dab 100644 --- a/hdspmixer/pixmaps/Zlmloopm2.xpm +++ b/hdspmixer/pixmaps/Zlmloopm2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * Zlmloopm2_xpm[] = { +char const * Zlmloopm2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/b_blank.xpm b/hdspmixer/pixmaps/b_blank.xpm index c0374d2..bafadd7 100644 --- a/hdspmixer/pixmaps/b_blank.xpm +++ b/hdspmixer/pixmaps/b_blank.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_blank_xpm[] = { +char const * b_blank_xpm[] = { "13 13 13 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_card1.xpm b/hdspmixer/pixmaps/b_card1.xpm index c832a10..d818674 100644 --- a/hdspmixer/pixmaps/b_card1.xpm +++ b/hdspmixer/pixmaps/b_card1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card1_xpm[] = { +char const * b_card1_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_card2.xpm b/hdspmixer/pixmaps/b_card2.xpm index 5dd8da8..9a27ce6 100644 --- a/hdspmixer/pixmaps/b_card2.xpm +++ b/hdspmixer/pixmaps/b_card2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card2_xpm[] = { +char const * b_card2_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_card3.xpm b/hdspmixer/pixmaps/b_card3.xpm index 10e9e30..05961a0 100644 --- a/hdspmixer/pixmaps/b_card3.xpm +++ b/hdspmixer/pixmaps/b_card3.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_card3_xpm[] = { +char const * b_card3_xpm[] = { "13 13 14 1", " c None", ". c #8D8F0F", diff --git a/hdspmixer/pixmaps/b_mute.xpm b/hdspmixer/pixmaps/b_mute.xpm index dcdc8cd..86bec57 100644 --- a/hdspmixer/pixmaps/b_mute.xpm +++ b/hdspmixer/pixmaps/b_mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_mute_xpm[] = { +char const * b_mute_xpm[] = { "30 22 52 1", " c None", ". c #DE8C00", diff --git a/hdspmixer/pixmaps/b_pre1.xpm b/hdspmixer/pixmaps/b_pre1.xpm index b81f85a..62b8874 100644 --- a/hdspmixer/pixmaps/b_pre1.xpm +++ b/hdspmixer/pixmaps/b_pre1.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre1_xpm[] = { +char const * b_pre1_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre2.xpm b/hdspmixer/pixmaps/b_pre2.xpm index 731c030..4c33101 100644 --- a/hdspmixer/pixmaps/b_pre2.xpm +++ b/hdspmixer/pixmaps/b_pre2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre2_xpm[] = { +char const * b_pre2_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre3.xpm b/hdspmixer/pixmaps/b_pre3.xpm index 77162c2..0b14cb2 100644 --- a/hdspmixer/pixmaps/b_pre3.xpm +++ b/hdspmixer/pixmaps/b_pre3.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre3_xpm[] = { +char const * b_pre3_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre4.xpm b/hdspmixer/pixmaps/b_pre4.xpm index 30ab560..c22909b 100644 --- a/hdspmixer/pixmaps/b_pre4.xpm +++ b/hdspmixer/pixmaps/b_pre4.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre4_xpm[] = { +char const * b_pre4_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre5.xpm b/hdspmixer/pixmaps/b_pre5.xpm index f563537..bfc2784 100644 --- a/hdspmixer/pixmaps/b_pre5.xpm +++ b/hdspmixer/pixmaps/b_pre5.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre5_xpm[] = { +char const * b_pre5_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre6.xpm b/hdspmixer/pixmaps/b_pre6.xpm index 2d47537..b5ab0f5 100644 --- a/hdspmixer/pixmaps/b_pre6.xpm +++ b/hdspmixer/pixmaps/b_pre6.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre6_xpm[] = { +char const * b_pre6_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre7.xpm b/hdspmixer/pixmaps/b_pre7.xpm index 8de4470..4690875 100644 --- a/hdspmixer/pixmaps/b_pre7.xpm +++ b/hdspmixer/pixmaps/b_pre7.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre7_xpm[] = { +char const * b_pre7_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_pre8.xpm b/hdspmixer/pixmaps/b_pre8.xpm index 895263f..aa4073a 100644 --- a/hdspmixer/pixmaps/b_pre8.xpm +++ b/hdspmixer/pixmaps/b_pre8.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_pre8_xpm[] = { +char const * b_pre8_xpm[] = { "13 13 14 1", " c None", ". c #1AA00D", diff --git a/hdspmixer/pixmaps/b_save.xpm b/hdspmixer/pixmaps/b_save.xpm index a984e28..c39529b 100644 --- a/hdspmixer/pixmaps/b_save.xpm +++ b/hdspmixer/pixmaps/b_save.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_save_xpm[] = { +char const * b_save_xpm[] = { "13 13 14 1", " c None", ". c #5C7B1B", diff --git a/hdspmixer/pixmaps/b_solo.xpm b/hdspmixer/pixmaps/b_solo.xpm index f678b19..ad6c9f5 100644 --- a/hdspmixer/pixmaps/b_solo.xpm +++ b/hdspmixer/pixmaps/b_solo.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_solo_xpm[] = { +char const * b_solo_xpm[] = { "30 22 53 1", " c None", ". c #7C2000", diff --git a/hdspmixer/pixmaps/b_zlm.xpm b/hdspmixer/pixmaps/b_zlm.xpm index c44e75b..6e9c6e9 100644 --- a/hdspmixer/pixmaps/b_zlm.xpm +++ b/hdspmixer/pixmaps/b_zlm.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * b_zlm_xpm[] = { +char const * b_zlm_xpm[] = { "13 13 11 1", " c None", ". c #000D00", diff --git a/hdspmixer/pixmaps/buttons.xpm b/hdspmixer/pixmaps/buttons.xpm index 7cbe5f1..3e3f44f 100644 --- a/hdspmixer/pixmaps/buttons.xpm +++ b/hdspmixer/pixmaps/buttons.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * buttons_xpm[] = { +char const * buttons_xpm[] = { "76 253 257 2", " c None", ". c #C08480", diff --git a/hdspmixer/pixmaps/empty.xpm b/hdspmixer/pixmaps/empty.xpm index 284abc1..c86fe46 100644 --- a/hdspmixer/pixmaps/empty.xpm +++ b/hdspmixer/pixmaps/empty.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_xpm[] = { +char const * empty_xpm[] = { "76 253 402 2", " c None", ". c #404840", diff --git a/hdspmixer/pixmaps/empty_2.xpm b/hdspmixer/pixmaps/empty_2.xpm index 31ff7b2..fb40d88 100644 --- a/hdspmixer/pixmaps/empty_2.xpm +++ b/hdspmixer/pixmaps/empty_2.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_2_xpm[] = { +char const * empty_2_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/empty_linux.xpm b/hdspmixer/pixmaps/empty_linux.xpm index e74ff51..10088d6 100644 --- a/hdspmixer/pixmaps/empty_linux.xpm +++ b/hdspmixer/pixmaps/empty_linux.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * empty_linux_xpm[] = { +char const * empty_linux_xpm[] = { "76 253 1535 2", " c None", ". c #404840", diff --git a/hdspmixer/pixmaps/iomixer.xpm b/hdspmixer/pixmaps/iomixer.xpm index 31a4b16..15b7536 100644 --- a/hdspmixer/pixmaps/iomixer.xpm +++ b/hdspmixer/pixmaps/iomixer.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * iomixer_xpm[] = { +char const * iomixer_xpm[] = { "36 253 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/iomixer_r.xpm b/hdspmixer/pixmaps/iomixer_r.xpm index 6428cd4..cac66c9 100644 --- a/hdspmixer/pixmaps/iomixer_r.xpm +++ b/hdspmixer/pixmaps/iomixer_r.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * iomixer_r_xpm[] = { +char const * iomixer_r_xpm[] = { "36 253 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/level.xpm b/hdspmixer/pixmaps/level.xpm index a92fe26..3b776a5 100644 --- a/hdspmixer/pixmaps/level.xpm +++ b/hdspmixer/pixmaps/level.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * level_xpm[] = { +char const * level_xpm[] = { "8 139 257 2", " c None", ". c #149003", diff --git a/hdspmixer/pixmaps/matrix_black.xpm b/hdspmixer/pixmaps/matrix_black.xpm index e96c3cf..69e1e50 100644 --- a/hdspmixer/pixmaps/matrix_black.xpm +++ b/hdspmixer/pixmaps/matrix_black.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_black_xpm[] = { +char const * matrix_black_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/matrix_grey.xpm b/hdspmixer/pixmaps/matrix_grey.xpm index 40d0a34..ad5b369 100644 --- a/hdspmixer/pixmaps/matrix_grey.xpm +++ b/hdspmixer/pixmaps/matrix_grey.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_xpm[] = { +char const * matrix_grey_xpm[] = { "32 12 22 1", " c None", ". c #A0A0A0", diff --git a/hdspmixer/pixmaps/matrix_grey_l.xpm b/hdspmixer/pixmaps/matrix_grey_l.xpm index b1a434e..5eeedbe 100644 --- a/hdspmixer/pixmaps/matrix_grey_l.xpm +++ b/hdspmixer/pixmaps/matrix_grey_l.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_l_xpm[] = { +char const * matrix_grey_l_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_grey_o.xpm b/hdspmixer/pixmaps/matrix_grey_o.xpm index 8dce291..033e00b 100644 --- a/hdspmixer/pixmaps/matrix_grey_o.xpm +++ b/hdspmixer/pixmaps/matrix_grey_o.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_o_xpm[] = { +char const * matrix_grey_o_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_grey_ol.xpm b/hdspmixer/pixmaps/matrix_grey_ol.xpm index 64c6c40..4ced7f4 100644 --- a/hdspmixer/pixmaps/matrix_grey_ol.xpm +++ b/hdspmixer/pixmaps/matrix_grey_ol.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_grey_ol_xpm[] = { +char const * matrix_grey_ol_xpm[] = { "32 12 22 1", " c None", ". c #6F776F", diff --git a/hdspmixer/pixmaps/matrix_mute.xpm b/hdspmixer/pixmaps/matrix_mute.xpm index 3c917d8..fcc30b2 100644 --- a/hdspmixer/pixmaps/matrix_mute.xpm +++ b/hdspmixer/pixmaps/matrix_mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_mute_xpm[] = { +char const * matrix_mute_xpm[] = { "32 12 25 1", " c None", ". c #C5C5BD", diff --git a/hdspmixer/pixmaps/matrix_white.xpm b/hdspmixer/pixmaps/matrix_white.xpm index c741b5b..ab5808a 100644 --- a/hdspmixer/pixmaps/matrix_white.xpm +++ b/hdspmixer/pixmaps/matrix_white.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_white_xpm[] = { +char const * matrix_white_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/matrix_yellow.xpm b/hdspmixer/pixmaps/matrix_yellow.xpm index c4ab7f7..6a6565c 100644 --- a/hdspmixer/pixmaps/matrix_yellow.xpm +++ b/hdspmixer/pixmaps/matrix_yellow.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * matrix_yellow_xpm[] = { +char const * matrix_yellow_xpm[] = { "32 12 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/monitor.xpm b/hdspmixer/pixmaps/monitor.xpm index 4d84ef6..8c29898 100644 --- a/hdspmixer/pixmaps/monitor.xpm +++ b/hdspmixer/pixmaps/monitor.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * monitor_xpm[] = { +char const * monitor_xpm[] = { "76 253 257 2", " c None", ". c #D1E0E5", diff --git a/hdspmixer/pixmaps/mute.xpm b/hdspmixer/pixmaps/mute.xpm index 83c71e4..fbc4707 100644 --- a/hdspmixer/pixmaps/mute.xpm +++ b/hdspmixer/pixmaps/mute.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * mute_xpm[] = { +char const * mute_xpm[] = { "13 26 30 1", " c None", ". c #1B7B1B", diff --git a/hdspmixer/pixmaps/output.xpm b/hdspmixer/pixmaps/output.xpm index 3fc334f..a9ccb80 100644 --- a/hdspmixer/pixmaps/output.xpm +++ b/hdspmixer/pixmaps/output.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * output_xpm[] = { +char const * output_xpm[] = { "36 208 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/output_r.xpm b/hdspmixer/pixmaps/output_r.xpm index 78fc61b..2e73c7f 100644 --- a/hdspmixer/pixmaps/output_r.xpm +++ b/hdspmixer/pixmaps/output_r.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * output_r_xpm[] = { +char const * output_r_xpm[] = { "36 208 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/over.xpm b/hdspmixer/pixmaps/over.xpm index 6b0e7e3..5918170 100644 --- a/hdspmixer/pixmaps/over.xpm +++ b/hdspmixer/pixmaps/over.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * over_xpm[] = { +char const * over_xpm[] = { "30 13 257 2", " c None", ". c #000000", diff --git a/hdspmixer/pixmaps/peak.xpm b/hdspmixer/pixmaps/peak.xpm index 88b20e3..19d46be 100644 --- a/hdspmixer/pixmaps/peak.xpm +++ b/hdspmixer/pixmaps/peak.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * peak_xpm[] = { +char const * peak_xpm[] = { "8 5 257 2", " c None", ". c #61FF48", diff --git a/hdspmixer/pixmaps/solo.xpm b/hdspmixer/pixmaps/solo.xpm index 1bfb438..42f3aca 100644 --- a/hdspmixer/pixmaps/solo.xpm +++ b/hdspmixer/pixmaps/solo.xpm @@ -1,5 +1,5 @@ /* XPM */ -char * solo_xpm[] = { +char const * solo_xpm[] = { "13 26 28 1", " c None", ". c #3C3E2D", diff --git a/hdspmixer/src/HDSPMixerAbout.cxx b/hdspmixer/src/HDSPMixerAbout.cxx index 709529a..39587d0 100644 --- a/hdspmixer/src/HDSPMixerAbout.cxx +++ b/hdspmixer/src/HDSPMixerAbout.cxx @@ -22,7 +22,7 @@ #include "HDSPMixerAbout.h"
-HDSPMixerAbout::HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) +HDSPMixerAbout::HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) { basew = win; text = new HDSPMixerAboutText(10,10,w-20,h-20); diff --git a/hdspmixer/src/HDSPMixerAbout.h b/hdspmixer/src/HDSPMixerAbout.h index f59b256..e539935 100644 --- a/hdspmixer/src/HDSPMixerAbout.h +++ b/hdspmixer/src/HDSPMixerAbout.h @@ -36,7 +36,7 @@ private: HDSPMixerAboutText *text; HDSPMixerWindow *basew; public:
- HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win);
- HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win); int handle(int e);
};
diff --git a/hdspmixer/src/HDSPMixerAboutText.h b/hdspmixer/src/HDSPMixerAboutText.h index 75b96ce..7ccac25 100644 --- a/hdspmixer/src/HDSPMixerAboutText.h +++ b/hdspmixer/src/HDSPMixerAboutText.h @@ -32,7 +32,7 @@ public: HDSPMixerAboutText(int x, int y, int w, int h); void draw(); private:
- char *text;
- char const *text;
};
#endif diff --git a/hdspmixer/src/HDSPMixerGain.cxx b/hdspmixer/src/HDSPMixerGain.cxx index 9d43a73..fd6339e 100644 --- a/hdspmixer/src/HDSPMixerGain.cxx +++ b/hdspmixer/src/HDSPMixerGain.cxx @@ -33,7 +33,7 @@ void HDSPMixerGain::draw() fl_draw(text, x(), y(), w(), h(), FL_ALIGN_CENTER); }
-void HDSPMixerGain::setText(char *txt) +void HDSPMixerGain::setText(char const *txt) { strncpy(text, txt, 10); redraw(); diff --git a/hdspmixer/src/HDSPMixerGain.h b/hdspmixer/src/HDSPMixerGain.h index 9f70778..a5ab55a 100644 --- a/hdspmixer/src/HDSPMixerGain.h +++ b/hdspmixer/src/HDSPMixerGain.h @@ -39,7 +39,7 @@ public: char text[10]; HDSPMixerGain(int x, int y, int parenttype); void draw();
- void setText(char *txt);
- void setText(char const *txt);
};
#endif diff --git a/hdspmixer/src/HDSPMixerIOMixer.h b/hdspmixer/src/HDSPMixerIOMixer.h index a9a35de..b440007 100644 --- a/hdspmixer/src/HDSPMixerIOMixer.h +++ b/hdspmixer/src/HDSPMixerIOMixer.h @@ -51,7 +51,7 @@ class HDSPMixerMeter; class HDSPMixerIOMixer:public Fl_Group { private:
- char **p_iomixer_xpm;
- char const **p_iomixer_xpm; int channel_num, relative_num, mixer_type; std::stringstream channel_name; void update_child(Fl_Widget &widget);
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx index dd0c9f8..05a126c 100644 --- a/hdspmixer/src/HDSPMixerOutput.cxx +++ b/hdspmixer/src/HDSPMixerOutput.cxx @@ -21,7 +21,7 @@ #pragma implementation #include "HDSPMixerOutput.h"
-static char *labels_madi_ss[64] = { +static char const *labels_madi_ss[64] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", @@ -32,25 +32,25 @@ static char *labels_madi_ss[64] = { "57", "58", "59", "60", "61", "62", "63", "64" };
-static char *labels_madi_ds[64] = { +static char const *labels_madi_ds[64] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", };
-static char *labels_madi_qs[16] = { +static char const *labels_madi_qs[16] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", };
-static char *labels_aes32[16] = { +static char const *labels_aes32[16] = { "AES 1", "AES 2", "AES 3", "AES 4", "AES 5", "AES 6", "AES 7", "AES 8", "AES 9", "AES 10", "AES 11", "AES 12", "AES 13", "AES 14", "AES 15", "AES 16" };
-static char *labels_raydat_ss[36] = { +static char const *labels_raydat_ss[36] = { "A1.1", "A1.2", "A1.3", "A1.4", "A1.5", "A1.6", "A1.7", "A1.8", "A2.1", "A2.2", "A2.3", "A2.4", "A2.5", "A2.6", "A2.7", "A2.8", "A3.1", "A3.2", "A3.3", "A3.4", "A3.5", "A3.6", "A3.7", "A3.8", @@ -59,7 +59,7 @@ static char *labels_raydat_ss[36] = { "SP.L", "SP.R" };
-static char *labels_raydat_ds[20] = { +static char const *labels_raydat_ds[20] = { "A1.1", "A1.2", "A1.3", "A1.4", "A2.1", "A2.2", "A2.3", "A2.4", "A3.1", "A3.2", "A3.3", "A3.4", @@ -68,7 +68,7 @@ static char *labels_raydat_ds[20] = { "SP.L", "SP.R" };
-static char *labels_raydat_qs[12] = { +static char const *labels_raydat_qs[12] = { "A1.1", "A1.2", "A2.1", "A2.2", "A3.1", "A3.2", @@ -78,7 +78,7 @@ static char *labels_raydat_qs[12] = { };
-static char *labels_aio_ss_input[14] = { +static char const *labels_aio_ss_input[14] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -86,7 +86,7 @@ static char *labels_aio_ss_input[14] = { "A 5", "A 6", "A 7", "A 8" };
-static char *labels_aio_ss_playback[16] = { +static char const *labels_aio_ss_playback[16] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -95,14 +95,14 @@ static char *labels_aio_ss_playback[16] = { "PH.L", "PH.R" };
-static char *labels_aio_ds_input[10] = { +static char const *labels_aio_ds_input[10] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", "A 1", "A 2", "A 3", "A 4" };
-static char *labels_aio_ds_playback[12] = { +static char const *labels_aio_ds_playback[12] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -110,14 +110,14 @@ static char *labels_aio_ds_playback[12] = { "PH.L", "PH.R" };
-static char *labels_aio_qs_input[8] = { +static char const *labels_aio_qs_input[8] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", "A 1", "A 2" };
-static char *labels_aio_qs_playback[10] = { +static char const *labels_aio_qs_playback[10] = { "AN 1", "AN 2", "SP.L", "SP.R", "AES.L", "AES.R", @@ -126,44 +126,44 @@ static char *labels_aio_qs_playback[10] = { };
-static char *labels_mf_ss[20] = { +static char const *labels_mf_ss[20] = { "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8", "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_mf_ds[16] = { +static char const *labels_mf_ds[16] = { "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8", "A 1", "A 2", "A 3", "A 4", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_df_ss[28] = { +static char const *labels_df_ss[28] = { "A1 1", "A1 2", "A1 3", "A1 4", "A1 5", "A1 6", "A1 7", "A1 8", "A2 1", "A2 2", "A2 3", "A2 4", "A2 5", "A2 6", "A2 7", "A2 8", "A3 1", "A3 2", "A3 3", "A3 4", "A3 5", "A3 6", "A3 7", "A3 8", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_df_ds[16] = { +static char const *labels_df_ds[16] = { "A1 1", "A1 2", "A1 3", "A1 4", "A2 1", "A2 2", "A2 3", "A2 4", "A3 1", "A3 2", "A3 3", "A3 4", "SP.L", "SP.R", "AN.L", "AN.R" };
-static char *labels_9632_ss[16] = { +static char const *labels_9632_ss[16] = { "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
-static char *labels_9632_ds[12] = { +static char const *labels_9632_ds[12] = { "A 1", "A 2", "A 3", "A 4", "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
-static char *labels_9632_qs[8] = { +static char const *labels_9632_qs[8] = { "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" };
diff --git a/hdspmixer/src/HDSPMixerOutput.h b/hdspmixer/src/HDSPMixerOutput.h index 2e7fb09..f38d263 100644 --- a/hdspmixer/src/HDSPMixerOutput.h +++ b/hdspmixer/src/HDSPMixerOutput.h @@ -46,8 +46,8 @@ class HDSPMixerOutput:public Fl_Group { private: int out_num;
- char **labels_input, **labels_playback;
- char **p_output_xpm;
- char const **labels_input, **labels_playback;
- char const **p_output_xpm; HDSPMixerPeak *peak; HDSPMixerWindow *basew; void update_child(Fl_Widget& widget);
diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx index a4156b0..098658f 100644 --- a/hdspmixer/src/HDSPMixerSelector.cxx +++ b/hdspmixer/src/HDSPMixerSelector.cxx @@ -24,7 +24,7 @@ #pragma implementation #include "HDSPMixerSelector.h"
-static char *destinations_madi_ss[32] = { +static char const *destinations_madi_ss[32] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16", "17+18", "19+20", "21+22", "23+24", @@ -35,24 +35,24 @@ static char *destinations_madi_ss[32] = { "57+58", "59+60", "61+62", "63+64" };
-static char *destinations_madi_ds[16] = { +static char const *destinations_madi_ds[16] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16", "17+18", "19+20", "21+22", "23+24", "25+26", "27+28", "29+30", "31+32" };
-static char *destinations_madi_qs[8] = { +static char const *destinations_madi_qs[8] = { "1+2", "3+4", "5+6", "7+8", "9+10", "11+12", "13+14", "15+16" };
-static char *destinations_aes32[8] = { +static char const *destinations_aes32[8] = { "AES 1+2", "AES 3+4", "AES 5+6", "AES 7+8", "AES 9+10", "AES 11+12", "AES 13+14", "AES 15+16", };
-static char *destinations_raydat_ss[18] = { +static char const *destinations_raydat_ss[18] = {
"A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", @@ -62,7 +62,7 @@ static char *destinations_raydat_ss[18] = { "SPDIF" };
-static char *destinations_raydat_ds[10] = { +static char const *destinations_raydat_ds[10] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", @@ -71,7 +71,7 @@ static char *destinations_raydat_ds[10] = { "SPDIF" };
-static char *destinations_raydat_qs[6] = { +static char const *destinations_raydat_qs[6] = { "A1 1+2", "A2 1+2", "A3 1+2", @@ -81,7 +81,7 @@ static char *destinations_raydat_qs[6] = { };
-static char *destinations_aio_ss[8] = { +static char const *destinations_aio_ss[8] = { "AN 1+2", "AES", "SPDIF", @@ -89,7 +89,7 @@ static char *destinations_aio_ss[8] = { "Phones" };
-static char *destinations_aio_ds[6] = { +static char const *destinations_aio_ds[6] = { "AN 1+2", "AES", "SPDIF", @@ -97,7 +97,7 @@ static char *destinations_aio_ds[6] = { "Phones" };
-static char *destinations_aio_qs[5] = { +static char const *destinations_aio_qs[5] = { "AN 1+2", "AES", "SPDIF", @@ -105,57 +105,57 @@ static char *destinations_aio_qs[5] = { "Phones" };
-static char *destinations_mf_ss[10] = { +static char const *destinations_mf_ss[10] = { "AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8", "A 1+2", "A 3+4", "A 5+6", "A 7+8", "SPDIF", "Analog" };
-static char *destinations_mf_ds[8] = { +static char const *destinations_mf_ds[8] = { "AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8", "A 1+2", "A 3+4", "SPDIF", "Analog" };
-static char *destinations_df_ss[14] = { +static char const *destinations_df_ss[14] = { "A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", "A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8", "SPDIF", "Analog" };
-static char *destinations_df_ds[8] = { +static char const *destinations_df_ds[8] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", "SPDIF", "Analog" };
-static char *destinations_h9652_ss[13] = { +static char const *destinations_h9652_ss[13] = { "A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8", "A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8", "A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8", "SPDIF" };
-static char *destinations_h9652_ds[7] = { +static char const *destinations_h9652_ds[7] = { "A1 1+2", "A1 3+4", "A2 1+2", "A2 3+4", "A3 1+2", "A3 3+4", "SPDIF" };
-static char *destinations_h9632_ss[8] = { +static char const *destinations_h9632_ss[8] = { "A 1+2", "A 3+4", "A 5+6", "A 7+8", "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
-static char *destinations_h9632_ds[6] = { +static char const *destinations_h9632_ds[6] = { "A 1+2", "A 3+4", "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
-static char *destinations_h9632_qs[4] = { +static char const *destinations_h9632_qs[4] = { "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" };
diff --git a/hdspmixer/src/HDSPMixerSelector.h b/hdspmixer/src/HDSPMixerSelector.h index 6f232cf..7994305 100644 --- a/hdspmixer/src/HDSPMixerSelector.h +++ b/hdspmixer/src/HDSPMixerSelector.h @@ -39,7 +39,7 @@ class HDSPMixerIOMixer; class HDSPMixerSelector:public Fl_Menu_ { private:
- char **destinations;
- char const **destinations; HDSPMixerWindow *basew;
public: int max_dest; diff --git a/hdspmixer/src/HDSPMixerSetup.cxx b/hdspmixer/src/HDSPMixerSetup.cxx index 6fa3551..593ee70 100644 --- a/hdspmixer/src/HDSPMixerSetup.cxx +++ b/hdspmixer/src/HDSPMixerSetup.cxx @@ -91,7 +91,7 @@ static void rmsplus3_cb(Fl_Widget *widget, void *arg) }
-HDSPMixerSetup::HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) +HDSPMixerSetup::HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) { basew = win; plm = new Fl_Group(10, 25, 380, 60, "Peak Level Meters"); diff --git a/hdspmixer/src/HDSPMixerSetup.h b/hdspmixer/src/HDSPMixerSetup.h index 21ffbb2..ba95951 100644 --- a/hdspmixer/src/HDSPMixerSetup.h +++ b/hdspmixer/src/HDSPMixerSetup.h @@ -54,7 +54,7 @@ public: int level_val; int numbers_val; int rmsplus3_val;
- HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win);
- HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win); HDSPMixerWindow *basew; void updateValues();
}; diff --git a/hdspmixer/src/pixmaps.h b/hdspmixer/src/pixmaps.h index 624bd28..b980a62 100644 --- a/hdspmixer/src/pixmaps.h +++ b/hdspmixer/src/pixmaps.h @@ -21,44 +21,44 @@ #ifndef pixmaps_H #define pixmaps_H
-extern char * Slider1_xpm[]; -extern char * Slider2_xpm[]; -extern char * b_blank_xpm[]; -extern char * b_card1_xpm[]; -extern char * b_card2_xpm[]; -extern char * b_card3_xpm[]; -extern char * b_mute_xpm[]; -extern char * b_pre1_xpm[]; -extern char * b_pre2_xpm[]; -extern char * b_pre3_xpm[]; -extern char * b_pre4_xpm[]; -extern char * b_pre5_xpm[]; -extern char * b_pre6_xpm[]; -extern char * b_pre7_xpm[]; -extern char * b_pre8_xpm[]; -extern char * b_save_xpm[]; -extern char * b_solo_xpm[]; -extern char * buttons_xpm[]; -extern char * empty_xpm[]; -extern char * empty_linux_xpm[]; -extern char * iomixer_xpm[]; -extern char * level_xpm[]; -extern char * monitor_xpm[]; -extern char * mute_xpm[]; -extern char * output_xpm[]; -extern char * over_xpm[]; -extern char * peak_xpm[]; -extern char * solo_xpm[]; -extern char * iomixer_r_xpm[]; -extern char * output_r_xpm[]; -extern char * matrix_white_xpm[]; -extern char * matrix_black_xpm[]; -extern char * matrix_yellow_xpm[]; -extern char * matrix_mute_xpm[]; -extern char * matrix_grey_xpm[]; -extern char * matrix_grey_l_xpm[]; -extern char * matrix_grey_ol_xpm[]; -extern char * matrix_grey_o_xpm[]; +extern char const * Slider1_xpm[]; +extern char const * Slider2_xpm[]; +extern char const * b_blank_xpm[]; +extern char const * b_card1_xpm[]; +extern char const * b_card2_xpm[]; +extern char const * b_card3_xpm[]; +extern char const * b_mute_xpm[]; +extern char const * b_pre1_xpm[]; +extern char const * b_pre2_xpm[]; +extern char const * b_pre3_xpm[]; +extern char const * b_pre4_xpm[]; +extern char const * b_pre5_xpm[]; +extern char const * b_pre6_xpm[]; +extern char const * b_pre7_xpm[]; +extern char const * b_pre8_xpm[]; +extern char const * b_save_xpm[]; +extern char const * b_solo_xpm[]; +extern char const * buttons_xpm[]; +extern char const * empty_xpm[]; +extern char const * empty_linux_xpm[]; +extern char const * iomixer_xpm[]; +extern char const * level_xpm[]; +extern char const * monitor_xpm[]; +extern char const * mute_xpm[]; +extern char const * output_xpm[]; +extern char const * over_xpm[]; +extern char const * peak_xpm[]; +extern char const * solo_xpm[]; +extern char const * iomixer_r_xpm[]; +extern char const * output_r_xpm[]; +extern char const * matrix_white_xpm[]; +extern char const * matrix_black_xpm[]; +extern char const * matrix_yellow_xpm[]; +extern char const * matrix_mute_xpm[]; +extern char const * matrix_grey_xpm[]; +extern char const * matrix_grey_l_xpm[]; +extern char const * matrix_grey_ol_xpm[]; +extern char const * matrix_grey_o_xpm[];
#endif
-- 1.7.4.1
On Mon, Feb 28, 2011 at 11:14:40AM +0100, Takashi Iwai wrote:
Also, the old code never handled three cards correctly, but that's fixed, too. (and tested against the three RME cards currently in my workstation)
Thanks, applied now to alsa-tools git tree.
TNX.
Though, the static definitions in channel_mapping.h aren't ideal. If these are referred from difference places, they should be external and defined only once.
I'm not sure what you mean. Do you suggest to make them external inside hdspmixer? Like with pixmaps.h? Or are you contemplating to put them somewhere else, let's say hdspm.h? (Uh, let's not say hdspm.h ;) )
Currently, you'll get tons of compile warnings. Care to fix these?
Fixed now.
Cheers
At Mon, 28 Feb 2011 15:03:45 +0100, Adrian Knoth wrote:
On Mon, Feb 28, 2011 at 11:14:40AM +0100, Takashi Iwai wrote:
Also, the old code never handled three cards correctly, but that's fixed, too. (and tested against the three RME cards currently in my workstation)
Thanks, applied now to alsa-tools git tree.
TNX.
Though, the static definitions in channel_mapping.h aren't ideal. If these are referred from difference places, they should be external and defined only once.
I'm not sure what you mean. Do you suggest to make them external inside hdspmixer? Like with pixmaps.h?
Yes.
The static array definitions shouldn't be included in multiple files. Otherwise you'll have multiple instances for the very same contents.
Move all static char xxx[] definitions into some *.c file, and make them not static but global. Then create channelmap.h like
extern char dest_map_dd_ss[]; extern char channel_map_df_ss[]; ...
Takashi
On Mon, Feb 28, 2011 at 03:07:45PM +0100, Takashi Iwai wrote:
Though, the static definitions in channel_mapping.h aren't ideal. If these are referred from difference places, they should be external and defined only once.
I'm not sure what you mean. Do you suggest to make them external inside hdspmixer? Like with pixmaps.h?
Yes.
The static array definitions shouldn't be included in multiple files.
The patch was half ready when I noticed that the static arrays are only referenced exactly once in the whole code.
I could complete the patch, though there seems to be no real benefit from it at the moment.
Cheers
At Mon, 28 Feb 2011 15:24:58 +0100, Adrian Knoth wrote:
On Mon, Feb 28, 2011 at 03:07:45PM +0100, Takashi Iwai wrote:
Though, the static definitions in channel_mapping.h aren't ideal. If these are referred from difference places, they should be external and defined only once.
I'm not sure what you mean. Do you suggest to make them external inside hdspmixer? Like with pixmaps.h?
Yes.
The static array definitions shouldn't be included in multiple files.
The patch was half ready when I noticed that the static arrays are only referenced exactly once in the whole code.
I could complete the patch, though there seems to be no real benefit from it at the moment.
In that case, it's fine. Just remove other references in *.c files.
Takashi
participants (2)
-
Adrian Knoth
-
Takashi Iwai