Thomas Charbonnel <thomas@undata.org>:

updated to version 1.4.
This commit is contained in:
Takashi Iwai 2003-11-03 19:10:38 +00:00
parent 6498fd396f
commit cd8875932e
39 changed files with 2859 additions and 579 deletions

View file

@ -25,8 +25,17 @@
HDSPMixerAbout::HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label)
{
basew = win;
text = new HDSPMixerAboutText(0,0,w,h);
text = new HDSPMixerAboutText(10,10,w-20,h-20);
end();
set_modal();
}
int HDSPMixerAbout::handle(int e) {
switch (e) {
case FL_PUSH:
hide();
return 1;
default:
return Fl_Window::handle(e);
}
}

View file

@ -37,6 +37,7 @@ private:
HDSPMixerWindow *basew;
public:
HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *w);
int handle(int e);
};
#endif

View file

@ -23,7 +23,7 @@
HDSPMixerAboutText::HDSPMixerAboutText(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "About Text")
{
text = "HDSPMixer (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n\n"
text = "HDSPMixer " VERSION " (C) 2003 Thomas Charbonnel <thomas@@undata.org>\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"

View file

@ -57,12 +57,14 @@ static void alsactl_cb(snd_async_handler_t *handler)
clock_value = snd_ctl_elem_value_get_enumerated(elemval, 0);
if (clock_value == 0) {
int new_speed = card->getAutosyncSpeed();
if (new_speed >= 0 && new_speed != card->double_speed) card->setMode(new_speed);
if (new_speed >= 0 && new_speed != card->speed_mode) card->setMode(new_speed);
}
if (clock_value > 3 && !card->double_speed) {
if (clock_value > 3 && clock_value < 7 && card->speed_mode != 1) {
card->setMode(1);
} else if (clock_value < 4 && card->double_speed) {
} else if (clock_value < 4 && card->speed_mode != 0) {
card->setMode(0);
} else if (clock_value > 6 && card->speed_mode != 2) {
card->setMode(2);
}
}
snd_ctl_event_clear(event);
@ -103,7 +105,9 @@ int HDSPMixerCard::getAutosyncSpeed()
if (external_rate > 2 && external_rate < 6) {
return 1;
} else if (external_rate < 2) {
} else if (external_rate > 6) {
return 2;
} else if (external_rate <= 2) {
return 0;
}
}
@ -143,9 +147,13 @@ int HDSPMixerCard::getSpeed()
case 4:
case 5:
case 6:
/* SR > 48000 kHz - double speed */
/* SR > 48000 Hz - double speed */
return 1;
break;
case 7:
case 8:
case 9:
/* SR > 96000 Hz - quad speed */
return 2;
default:
/* Should never happen */
return 0;
@ -158,8 +166,11 @@ HDSPMixerCard::HDSPMixerCard(HDSP_IO_Type cardtype, int id)
type = cardtype;
card_id = id;
snprintf(name, 6, "hw:%i", card_id);
double_speed = getSpeed();
if (double_speed < 0) {
h9632_aeb.aebi = 0;
h9632_aeb.aebo = 0;
if (type == H9632) getAeb();
speed_mode = getSpeed();
if (speed_mode < 0) {
fprintf(stderr, "Error trying to determine speed mode for card %s, exiting.\n", name);
exit(EXIT_FAILURE);
}
@ -170,53 +181,117 @@ HDSPMixerCard::HDSPMixerCard(HDSP_IO_Type cardtype, int id)
basew = NULL;
}
void HDSPMixerCard::getAeb() {
int err, i;
snd_hwdep_t *hw;
snd_hwdep_info_t *info;
snd_hwdep_info_alloca(&info);
if ((err = snd_hwdep_open(&hw, name, SND_HWDEP_OPEN_DUPLEX)) != 0) {
fprintf(stderr, "Error opening hwdep device on card %s.\n", name);
return;
}
if ((err = snd_hwdep_ioctl(hw, SNDRV_HDSP_IOCTL_GET_9632_AEB, &h9632_aeb)) < 0) {
fprintf(stderr, "Hwdep ioctl error on card %s : %s.\n", name, snd_strerror(err));
snd_hwdep_close(hw);
return;
}
}
void HDSPMixerCard::adjustSettings() {
if (type == Multiface && !double_speed) {
channels = 18;
channel_map = channel_map_mf_ss;
dest_map = dest_map_mf_ss;
meter_map = channel_map_mf_ss;
lineouts = 2;
} else if (type == Multiface && double_speed) {
channels = 14;
/* FIXME : this is a workaround because the driver is wrong */
channel_map = meter_map_ds;
dest_map = dest_map_ds;
meter_map = meter_map_ds;
lineouts = 2;
} else if (type == Digiface && !double_speed) {
channels = 26;
channel_map = channel_map_df_ss;
dest_map = dest_map_df_ss;
meter_map = channel_map_df_ss;
lineouts = 2;
} else if (type == Digiface && double_speed) {
channels = 14;
channel_map = channel_map_ds;
dest_map = dest_map_ds;
meter_map = meter_map_ds;
lineouts = 2;
} else if (type == H9652 && !double_speed) {
channels = 26;
channel_map = channel_map_df_ss;
dest_map = dest_map_h9652_ss;
meter_map = channel_map_df_ss;
lineouts = 0;
} else if (type == H9652 && double_speed) {
channels = 14;
channel_map = channel_map_ds;
dest_map = dest_map_h9652_ds;
meter_map = meter_map_ds;
lineouts = 0;
}
if (type == Multiface) {
switch (speed_mode) {
case 0:
channels = 18;
channel_map = channel_map_mf_ss;
dest_map = dest_map_mf_ss;
meter_map = channel_map_mf_ss;
lineouts = 2;
break;
case 1:
channels = 14;
channel_map = meter_map_ds;
dest_map = dest_map_ds;
meter_map = meter_map_ds;
lineouts = 2;
break;
case 2:
/* should never happen */
break;
}
} else if (type == Digiface) {
switch (speed_mode) {
case 0:
channels = 26;
channel_map = channel_map_df_ss;
dest_map = dest_map_df_ss;
meter_map = channel_map_df_ss;
lineouts = 2;
break;
case 1:
channels = 14;
channel_map = channel_map_ds;
dest_map = dest_map_ds;
meter_map = meter_map_ds;
lineouts = 2;
break;
case 2:
/* should never happen */
break;
}
} else if (type == H9652) {
switch (speed_mode) {
case 0:
channels = 26;
channel_map = channel_map_df_ss;
dest_map = dest_map_h9652_ss;
meter_map = channel_map_df_ss;
lineouts = 0;
break;
case 1:
channels = 14;
channel_map = channel_map_ds;
dest_map = dest_map_h9652_ds;
meter_map = meter_map_ds;
lineouts = 0;
break;
case 2:
break;
}
} else if (type == H9632) {
/* FIXME : mapping values are my first guess here
this needs to be tested
*/
switch (speed_mode) {
case 0:
channels = 12 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0;
channel_map = channel_map_h9632_ss;
dest_map = dest_map_h9632_ss;
meter_map = channel_map_h9632_ss;
lineouts = 0;
break;
case 1:
channels = 8 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0;
channel_map = channel_map_h9632_ds;
dest_map = dest_map_h9632_ds;
meter_map = meter_map_h9632_ds;
lineouts = 0;
break;
case 2:
channels = 4 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0;
channel_map = channel_map_h9632_qs;
dest_map = dest_map_h9632_qs;
meter_map = dest_map_h9632_qs;
lineouts = 0;
break;
}
}
window_width = (channels+2)*STRIP_WIDTH;
window_height = FULLSTRIP_HEIGHT*2+SMALLSTRIP_HEIGHT+MENU_HEIGHT;
}
void HDSPMixerCard::setMode(int mode)
{
double_speed = mode;
speed_mode = mode;
adjustSettings();
actualizeStrips();
@ -228,7 +303,15 @@ void HDSPMixerCard::setMode(int mode)
for (int i = channels; i < channels+lineouts; ++i) {
basew->outputs->strips[i]->setLabels();
}
if (h9632_aeb.aebo && !h9632_aeb.aebi) {
basew->inputs->empty_aebi[0]->position(STRIP_WIDTH*(channels-4), basew->inputs->empty_aebi[0]->y());
basew->inputs->empty_aebi[1]->position(STRIP_WIDTH*(channels-2), basew->inputs->empty_aebi[1]->y());
} else if (h9632_aeb.aebi && !h9632_aeb.aebo) {
basew->playbacks->empty_aebo[0]->position(STRIP_WIDTH*(channels-4), basew->playbacks->empty_aebo[0]->y());
basew->playbacks->empty_aebo[1]->position(STRIP_WIDTH*(channels-2), basew->playbacks->empty_aebo[1]->y());
basew->outputs->empty_aebo[0]->position(STRIP_WIDTH*(channels-4), basew->outputs->empty_aebo[0]->y());
basew->outputs->empty_aebo[1]->position(STRIP_WIDTH*(channels-2), basew->outputs->empty_aebo[1]->y());
}
basew->inputs->buttons->position(STRIP_WIDTH*channels, basew->inputs->buttons->y());
basew->inputs->init_sizes();
basew->playbacks->empty->position(STRIP_WIDTH*channels, basew->playbacks->empty->y());
@ -260,10 +343,33 @@ void HDSPMixerCard::actualizeStrips()
basew->outputs->strips[i]->hide();
}
}
for (int i = channels; i < channels+lineouts; ++i) {
basew->outputs->strips[i]->show();
for (int i = channels; i < channels+2; ++i) {
if (i < channels+lineouts) {
basew->outputs->strips[i]->show();
} else {
basew->outputs->strips[i]->hide();
}
}
if (type != H9652) basew->outputs->empty->hide();
if (h9632_aeb.aebi && !h9632_aeb.aebo) {
for (int i = 0; i < 2; ++i) {
basew->inputs->empty_aebi[i]->hide();
basew->playbacks->empty_aebo[i]->show();
basew->outputs->empty_aebo[i]->show();
}
} else if (h9632_aeb.aebo && !h9632_aeb.aebi) {
for (int i = 0; i < 2; ++i) {
basew->inputs->empty_aebi[i]->show();
basew->playbacks->empty_aebo[i]->hide();
basew->outputs->empty_aebo[i]->hide();
}
} else {
for (int i = 0; i < 2; ++i) {
basew->inputs->empty_aebi[i]->hide();
basew->playbacks->empty_aebo[i]->hide();
basew->outputs->empty_aebo[i]->hide();
}
}
if (type != H9652 && type != H9632) basew->outputs->empty->hide();
}
int HDSPMixerCard::initializeCard(HDSPMixerWindow *w)

View file

@ -46,13 +46,15 @@ public:
char *channel_map;
char *dest_map;
char *meter_map;
int double_speed;
int speed_mode;
void setMode(int mode);
int initializeCard(HDSPMixerWindow *w);
int getSpeed();
int getAutosyncSpeed();
void actualizeStrips();
void adjustSettings();
void getAeb();
hdsp_9632_aeb_t h9632_aeb;
};
#endif

View file

@ -32,13 +32,16 @@ HDSPMixerIOMixer::HDSPMixerIOMixer(int x, int y, int w, int h, int ch, int type)
channel_num = ch;
if (channel_num%2) {
relative_num = channel_num+1;
p_iomixer_xpm = iomixer_xpm;
} else {
relative_num = channel_num-1;
p_iomixer_xpm = iomixer_r_xpm;
}
for (int j = 0; j < 3; ++j) {
for (int i = 0; i < 8; ++i) {
data[j][0][i] = new HDSPMixerStripData();
data[j][1][i] = new HDSPMixerStripData();
data[j][2][i] = new HDSPMixerStripData();
}
}
mutesolo = new HDSPMixerMuteSolo(x+3, y+3, 0, 0, channel_num, type);
@ -59,7 +62,7 @@ void HDSPMixerIOMixer::draw_background()
void HDSPMixerIOMixer::draw_background(int xpos, int ypos, int w, int h)
{
fl_push_clip(xpos, ypos, w, h);
fl_draw_pixmap(iomixer_xpm, x(), y());
fl_draw_pixmap(p_iomixer_xpm, x(), y());
fl_pop_clip();
}

View file

@ -50,11 +50,12 @@ class HDSPMixerMeter;
class HDSPMixerIOMixer:public Fl_Group
{
private:
char **p_iomixer_xpm;
int channel_num, relative_num, mixer_type;
char channel_name[6];
void update_child(Fl_Widget &widget);
public:
HDSPMixerStripData *data[3][2][8]; /* data[card][mode(ds/ss)][preset number] */
HDSPMixerStripData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
HDSPMixerPan *pan;
HDSPMixerFader *fader;
HDSPMixerPeak *peak;

View file

@ -39,6 +39,8 @@ HDSPMixerInputs::HDSPMixerInputs(int x, int y, int w, int h, int nchans):Fl_Grou
strips[i]->gain->relative = strips[i+1]->gain;
strips[i+1]->gain->relative = strips[i]->gain;
}
empty_aebi[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, STRIP_WIDTH*2, FULLSTRIP_HEIGHT, 0);
empty_aebi[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, STRIP_WIDTH*2, FULLSTRIP_HEIGHT, 0);
buttons = new HDSPMixerButtons(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT);
end();
resizable(NULL);

View file

@ -25,9 +25,11 @@
#include <FL/Fl_Group.H>
#include "HDSPMixerIOMixer.h"
#include "HDSPMixerButtons.h"
#include "HDSPMixerEmpty.h"
class HDSPMixerButtons;
class HDSPMixerIOMixer;
class HDSPMixerEmpty;
class HDSPMixerInputs:public Fl_Group
{
@ -35,6 +37,7 @@ public:
HDSPMixerButtons *buttons;
HDSPMixerIOMixer *strips[26];
HDSPMixerInputs(int x, int y, int w, int h, int nchannels);
HDSPMixerEmpty *empty_aebi[2];
};
#endif

View file

@ -32,6 +32,9 @@ HDSPMixerMeter::HDSPMixerMeter(int x, int y, bool not_output, HDSPMixerPeak *p):
fast_peak_level = 1000.0;
slow_peak_level = 1000.0;
max_level = 1000.0;
/* this is no more as simple :
H9652 cards do have both peak and rms data for outputs
*/
peak_rms = not_output;
}
@ -58,7 +61,7 @@ void HDSPMixerMeter::draw()
}
rms_height = new_rms_height;
if ((new_peak_height != peak_height || !fine_draw) && peak_rms) {
if ((new_peak_height != peak_height || !fine_draw) && (peak_rms || basew->cards[basew->current_card]->type == H9652)) {
if ((rms_height <= (peak_height - PEAK_HEIGHT)) || rms_height == 0) {
fl_push_clip(x(), y()+(METER_HEIGHT - peak_height), w(), PEAK_HEIGHT+1);
if (peak_rms) {
@ -162,7 +165,7 @@ void HDSPMixerMeter::update(int peak, int overs, int64 rms)
fr /= ((double)(1125899638407184.0)*(double)(8191.0));
fr = sqrt(fr);
if (!peak_rms) {
if (!peak_rms && (basew->cards[basew->current_card]->type != H9652)) {
new_rms_height = new_peak_height;
} else {
fr = -20 * log10(fr);
@ -175,7 +178,7 @@ void HDSPMixerMeter::update(int peak, int overs, int64 rms)
}
if (new_rms_height != rms_height || (new_peak_height != peak_height && peak_rms)) {
if (new_rms_height != rms_height || (new_peak_height != peak_height && (peak_rms || basew->cards[basew->current_card]->type == H9652))) {
/* FIXME: may not be SMP safe */
redraw();
}

View file

@ -28,8 +28,14 @@ HDSPMixerOutput::HDSPMixerOutput(int x, int y, int w, int h, int num):Fl_Group(x
for (int i = 0; i < 8; ++i) {
data[j][0][i] = new HDSPMixerOutputData();
data[j][1][i] = new HDSPMixerOutputData();
data[j][2][i] = new HDSPMixerOutputData();
}
}
if (num%2) {
p_output_xpm = output_r_xpm;
} else {
p_output_xpm = output_xpm;
}
basew = (HDSPMixerWindow *)window();
setLabels();
out_num = num;
@ -43,15 +49,29 @@ HDSPMixerOutput::HDSPMixerOutput(int x, int y, int w, int h, int num):Fl_Group(x
void HDSPMixerOutput::setLabels()
{
HDSP_IO_Type type = basew->cards[basew->current_card]->type;
int ds = basew->cards[basew->current_card]->double_speed;
if (type == Multiface && !ds) {
labels = labels_mf_ss;
} else if (type == Multiface && ds) {
labels = labels_mf_ds;
} else if (!ds) {
labels = labels_df_ss;
} else if (ds) {
labels = labels_df_ds;
int sm = basew->cards[basew->current_card]->speed_mode;
if (type == H9632) {
switch (sm) {
case 0:
labels = labels_9632_ss;
break;
case 1:
labels = labels_9632_ds;
break;
case 2:
labels = labels_9632_qs;
break;
}
} else if (type == Multiface) {
if (sm)
labels = labels_mf_ds;
else
labels = labels_mf_ss;
} else {
if (sm)
labels = labels_df_ds;
else
labels = labels_df_ss;
}
}
@ -63,7 +83,7 @@ void HDSPMixerOutput::draw_background()
void HDSPMixerOutput::draw_background(int xpos, int ypos, int w, int h)
{
fl_push_clip(xpos, ypos, w, h);
fl_draw_pixmap(output_xpm, x(), y());
fl_draw_pixmap(p_output_xpm, x(), y());
fl_pop_clip();
}

View file

@ -67,16 +67,31 @@ static char *labels_df_ds[16] = {
"SP.L", "SP.R", "AN.L", "AN.R"
};
static char *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] = {
"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] = {
"SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6"
};
class HDSPMixerOutput:public Fl_Group
{
private:
int out_num;
char **labels;
char **p_output_xpm;
HDSPMixerPeak *peak;
HDSPMixerWindow *basew;
void update_child(Fl_Widget& widget);
public:
HDSPMixerOutputData *data[3][2][8]; /* data[card][mode(ds/ss)][preset number] */
HDSPMixerOutputData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
HDSPMixerFader *fader;
HDSPMixerGain *gain;
HDSPMixerMeter *meter;

View file

@ -32,7 +32,10 @@ HDSPMixerOutputs::HDSPMixerOutputs(int x, int y, int w, int h, int nchans):Fl_Gr
strips[i+1]->fader->relative = strips[i]->fader;
strips[i]->fader->gain = strips[i]->gain;
strips[i+1]->fader->gain = strips[i+1]->gain;
}
empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0);
empty_aebo[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0);
empty = new HDSPMixerEmpty(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0);
end();
resizable(NULL);

View file

@ -33,6 +33,7 @@ class HDSPMixerEmpty;
class HDSPMixerOutputs:public Fl_Group
{
public:
HDSPMixerEmpty *empty_aebo[2];
HDSPMixerEmpty *empty;
HDSPMixerOutput *strips[28];
HDSPMixerOutputs(int x, int y, int w, int h, int nchannels);

View file

@ -39,6 +39,8 @@ HDSPMixerPlaybacks::HDSPMixerPlaybacks(int x, int y, int w, int h, int nchans):F
strips[i]->gain->relative = strips[i+1]->gain;
strips[i+1]->gain->relative = strips[i]->gain;
}
empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 0);
empty_aebo[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 0);
empty = new HDSPMixerEmpty(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 1);
end();
resizable(NULL);

View file

@ -32,6 +32,7 @@ class HDSPMixerIOMixer;
class HDSPMixerPlaybacks:public Fl_Group
{
public:
HDSPMixerEmpty *empty_aebo[2];
HDSPMixerEmpty *empty;
HDSPMixerIOMixer *strips[26];
HDSPMixerPlaybacks(int x, int y, int w, int h, int nchannels);

View file

@ -122,7 +122,7 @@ int HDSPMixerPresets::handle(int e)
}
void HDSPMixerPresets::save_preset(int prst) {
int speed = basew->cards[basew->current_card]->double_speed;
int speed = basew->cards[basew->current_card]->speed_mode;
int card = basew->current_card;
int p = prst-1;
basew->dirty = 0;
@ -164,7 +164,7 @@ void HDSPMixerPresets::save_preset(int prst) {
}
void HDSPMixerPresets::restore_preset(int prst) {
int speed = basew->cards[basew->current_card]->double_speed;
int speed = basew->cards[basew->current_card]->speed_mode;
int card = basew->current_card;
int p = prst-1;
basew->dirty = 0;

View file

@ -91,29 +91,71 @@ int HDSPMixerSelector::handle(int e) {
void HDSPMixerSelector::setLabels()
{
HDSP_IO_Type type;
int ds;
hdsp_9632_aeb_t *aeb;
int sm;
clear();
type = basew->cards[basew->current_card]->type;
ds = basew->cards[basew->current_card]->double_speed;
if (type == Multiface && !ds) {
max_dest = 10;
destinations = destinations_mf_ss;
} else if (type == Multiface && ds) {
max_dest = 8;
destinations = destinations_mf_ds;
} else if (type == Digiface && !ds) {
max_dest = 14;
destinations = destinations_df_ss;
} else if (type == Digiface && ds) {
max_dest = 8;
destinations = destinations_df_ds;
} else if (type == H9652 && !ds) {
max_dest = 13;
destinations = destinations_h9652_ss;
} else if (type == H9652 && ds) {
max_dest = 7;
destinations = destinations_h9652_ds;
aeb = &basew->cards[basew->current_card]->h9632_aeb;
sm = basew->cards[basew->current_card]->speed_mode;
if (type == Multiface) {
switch (sm) {
case 0:
max_dest = 10;
destinations = destinations_mf_ss;
break;
case 1:
max_dest = 8;
destinations = destinations_mf_ds;
break;
case 2:
/* should never happen */
break;
}
} else if (type == Digiface) {
switch (sm) {
case 0:
max_dest = 14;
destinations = destinations_df_ss;
break;
case 1:
max_dest = 8;
destinations = destinations_df_ds;
break;
case 2:
/* should never happen */
break;
}
} else if (type == H9652) {
switch (sm) {
case 0:
max_dest = 13;
destinations = destinations_h9652_ss;
break;
case 1:
max_dest = 7;
destinations = destinations_h9652_ds;
break;
case 2:
/* should never happen */
break;
}
} else if (type == H9632) {
switch (sm) {
case 0:
max_dest = 6 + (aeb->aebo) ? 2 : 0;
destinations = destinations_h9632_ss;
break;
case 1:
max_dest = 4 + (aeb->aebo) ? 2 : 0;
destinations = destinations_h9632_ds;
break;
case 2:
max_dest = 2 + (aeb->aebo) ? 2 : 0;
destinations = destinations_h9632_qs;
break;
}
}
for (int i = 0; i < max_dest; ++i) {
add(destinations[i], 0, 0, 0, FL_MENU_TOGGLE);
}

View file

@ -75,6 +75,20 @@ static char *destinations_h9652_ds[7] = {
"SPDIF"
};
static char *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] = {
"A 1+2", "A 3+4",
"SPDIF", "AN 1+2", "AN 3+4", "AN 5+6"
};
static char *destinations_h9632_qs[4] = {
"SPDIF", "AN 1+2", "AN 3+4", "AN 5+6"
};
class HDSPMixerSelector:public Fl_Menu_
{
private:

View file

@ -20,14 +20,6 @@
#pragma implementation
#include "HDSPMixerWindow.h"
inline int64 swap_rms(int64 *rms)
{
unsigned int *base = (unsigned int *)rms;
int64 ret = *base;
ret = (ret<<32) | *(base+1);
return ret;
}
static void readregisters_cb(void *arg)
{
@ -59,27 +51,35 @@ static void readregisters_cb(void *arg)
for (int i = 0; i < w->cards[w->current_card]->channels; ++i) {
w->inputs->strips[i]->meter->update(peak_rms.input_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00,
peak_rms.input_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf,
swap_rms(&peak_rms.input_rms[(w->cards[w->current_card]->meter_map[i])]) );
peak_rms.input_rms[(w->cards[w->current_card]->meter_map[i])]);
}
}
if (w->inputs->buttons->playback) {
for (int i = 0; i < w->cards[w->current_card]->channels; ++i) {
w->playbacks->strips[i]->meter->update(peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00,
peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf,
swap_rms(&peak_rms.playback_rms[(w->cards[w->current_card]->meter_map[i])]) );
peak_rms.playback_rms[(w->cards[w->current_card]->meter_map[i])]);
}
}
if (w->inputs->buttons->output) {
for (int i = 0; i < w->cards[w->current_card]->channels; ++i) {
w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00,
peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf,
0 );
if (w->cards[w->current_card]->type != H9652) {
for (int i = 0; i < w->cards[w->current_card]->channels; ++i) {
w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00,
peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf,
0 );
}
for (int i = 0; i < w->cards[w->current_card]->lineouts; ++i) {
w->outputs->strips[w->cards[w->current_card]->channels+i]->meter->update(peak_rms.output_peaks[26+i] & 0xffffff00,
peak_rms.output_peaks[26+i] & 0xf,
0 );
}
} else {
for (int i = 0; i < w->cards[w->current_card]->channels; ++i) {
w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00,
peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf,
peak_rms.output_rms[(w->cards[w->current_card]->meter_map[i])] );
}
}
for (int i = 0; i < w->cards[w->current_card]->lineouts; ++i) {
w->outputs->strips[w->cards[w->current_card]->channels+i]->meter->update(peak_rms.output_peaks[26+i] & 0xffffff00,
peak_rms.output_peaks[26+i] & 0xf,
0 );
}
}
Fl::add_timeout(0.03, readregisters_cb, w);
@ -614,7 +614,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(340, 230, "About HDSPMixer", this);
about = new HDSPMixerAbout(360, 260, "About HDSPMixer", this);
i = 0;
while (cards[i] != NULL) {
cards[i++]->initializeCard(this);
@ -689,7 +689,7 @@ void HDSPMixerWindow::reorder()
void HDSPMixerWindow::checkState()
{
int speed = cards[current_card]->double_speed;
int speed = cards[current_card]->speed_mode;
int p = inputs->buttons->presets->preset-1;
int corrupt = 0;
/* Mixer strips */

View file

@ -70,7 +70,7 @@ public:
Fl_Scroll *scroll;
HDSPMixerSetup *setup;
HDSPMixerAbout *about;
HDSPMixerPresetData *data[3][2][8]; /* data[card number][mode(ds/ss)][preset number] */
HDSPMixerPresetData *data[3][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */
HDSPMixerCard *cards[3];
HDSPMixerInputs *inputs;
HDSPMixerPlaybacks *playbacks;

View file

@ -49,7 +49,6 @@ int main(int argc, char **argv)
if (card < 0) {
break;
} else {
snd_card_get_longname(card, &name);
printf("Card %d : %s\n", card, name);
if (!strncmp(name, "RME Hammerfall DSP + Multiface", 30)) {
@ -64,6 +63,12 @@ int main(int argc, char **argv)
printf("HDSP 9652 found !\n");
hdsp_cards[cards] = new HDSPMixerCard(H9652, card);
cards++;
} else if (!strncmp(name, "RME Hammerfall HDSP 9632", 24)) {
printf("HDSP 9632 found !\n");
hdsp_cards[cards] = new HDSPMixerCard(H9632, card);
cards++;
} else if (!strncmp(name, "RME Hammerfall DSP", 18)) {
printf("Uninitialized HDSP card found.\nUse hdsploader to upload configuration data to the card.\n");
}
}
}

View file

@ -65,5 +65,33 @@ 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] = {
1, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15
};
static char meter_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

View file

@ -42,10 +42,18 @@
#include "../pixmaps/empty_linux.xpm"
#include "../pixmaps/iomixer.xpm"
#include "../pixmaps/level.xpm"
#include "../pixmaps/monitor.xpm"
#include "../pixmaps/mute.xpm"
#include "../pixmaps/output.xpm"
#include "../pixmaps/over.xpm"
#include "../pixmaps/peak.xpm"
#include "../pixmaps/solo.xpm"
#include "../pixmaps/iomixer_r.xpm"
#include "../pixmaps/output_r.xpm"
#include "../pixmaps/matrix_black.xpm"
#include "../pixmaps/matrix_white.xpm"
#include "../pixmaps/matrix_yellow.xpm"
#include "../pixmaps/matrix_mute.xpm"
#include "../pixmaps/matrix_grey.xpm"
#include "../pixmaps/matrix_grey_o.xpm"
#include "../pixmaps/matrix_grey_l.xpm"
#include "../pixmaps/matrix_grey_ol.xpm"

View file

@ -49,6 +49,16 @@ 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[];
#endif