1 |
/* |
/* |
2 |
* Copyright (C) 2006-2014 Andreas Persson |
* Copyright (C) 2006-2015 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
230 |
eMSDecode(_("Decode Mid/Side Recordings")), |
eMSDecode(_("Decode Mid/Side Recordings")), |
231 |
eSampleStartOffset(_("Sample start offset"), 0, 2000), |
eSampleStartOffset(_("Sample start offset"), 0, 2000), |
232 |
eUnityNote(_("Unity note")), |
eUnityNote(_("Unity note")), |
233 |
|
eSampleFormatInfo(_("Sample Format")), |
234 |
|
eSampleID("Sample ID"), |
235 |
eFineTune(_("Fine tune"), -49, 50), |
eFineTune(_("Fine tune"), -49, 50), |
236 |
eGain(_("Gain"), -96, 0, 2, -655360), |
eGain(_("Gain"), -96, 0, 2, -655360), |
237 |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
eGainPlus6(_("Gain +6dB"), eGain, 6 * -655360), |
451 |
wSample->set_tooltip_text(_("Drag & drop a sample here")); |
wSample->set_tooltip_text(_("Drag & drop a sample here")); |
452 |
#endif |
#endif |
453 |
addProp(eUnityNote); |
addProp(eUnityNote); |
454 |
|
addProp(eSampleFormatInfo); |
455 |
|
addProp(eSampleID); |
456 |
addHeader(_("Optional Settings")); |
addHeader(_("Optional Settings")); |
457 |
addProp(eSampleStartOffset); |
addProp(eSampleStartOffset); |
458 |
addProp(eChannelOffset); |
addProp(eChannelOffset); |
976 |
eMSDecode.set_value(d->MSDecode); |
eMSDecode.set_value(d->MSDecode); |
977 |
eSampleStartOffset.set_value(d->SampleStartOffset); |
eSampleStartOffset.set_value(d->SampleStartOffset); |
978 |
eUnityNote.set_value(d->UnityNote); |
eUnityNote.set_value(d->UnityNote); |
979 |
|
// assemble sample format info string |
980 |
|
{ |
981 |
|
Glib::ustring s; |
982 |
|
if (d->pSample) { |
983 |
|
switch (d->pSample->Channels) { |
984 |
|
case 1: s = _("Mono"); break; |
985 |
|
case 2: s = _("Stereo"); break; |
986 |
|
default: |
987 |
|
s = ToString(d->pSample->Channels) + _(" audio channels"); |
988 |
|
break; |
989 |
|
} |
990 |
|
s += " " + ToString(d->pSample->BitDepth) + " Bits"; |
991 |
|
s += " " + ToString(d->pSample->SamplesPerSecond/1000) + "." |
992 |
|
+ ToString((d->pSample->SamplesPerSecond%1000)/100) + " kHz"; |
993 |
|
} else { |
994 |
|
s = _("No sample assigned to this dimension region."); |
995 |
|
} |
996 |
|
eSampleFormatInfo.text.set_text(s); |
997 |
|
} |
998 |
|
// generate sample's memory address pointer string |
999 |
|
{ |
1000 |
|
Glib::ustring s; |
1001 |
|
if (d->pSample) { |
1002 |
|
char buf[64] = {}; |
1003 |
|
snprintf(buf, sizeof(buf), "%p", d->pSample); |
1004 |
|
s = buf; |
1005 |
|
} else { |
1006 |
|
s = "---"; |
1007 |
|
} |
1008 |
|
eSampleID.text.set_text(s); |
1009 |
|
} |
1010 |
eFineTune.set_value(d->FineTune); |
eFineTune.set_value(d->FineTune); |
1011 |
eGain.set_value(d->Gain); |
eGain.set_value(d->Gain); |
1012 |
eGainPlus6.set_value(d->Gain); |
eGainPlus6.set_value(d->Gain); |