mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
Format boolean parameter values
This commit is contained in:
parent
86dea93299
commit
9f37396315
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,8 @@
|
||||||
#include "ardour/dB.h"
|
#include "ardour/dB.h"
|
||||||
#include "ardour/parameter_descriptor.h"
|
#include "ardour/parameter_descriptor.h"
|
||||||
|
|
||||||
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
inline std::string
|
inline std::string
|
||||||
|
|
@ -45,6 +47,10 @@ value_as_string(const ARDOUR::ParameterDescriptor& desc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (desc.toggled) {
|
||||||
|
return v >= 0 ? _("on") : _("off");
|
||||||
|
}
|
||||||
|
|
||||||
// Value is not a scale point, print it normally
|
// Value is not a scale point, print it normally
|
||||||
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
|
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
|
||||||
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());
|
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue