Browse Source

Remove empty patch message. Add oversample multipliers to engine sample rate toolbar items.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
dc8c317d9f
2 changed files with 12 additions and 16 deletions
  1. +0
    -13
      src/app/RackScrollWidget.cpp
  2. +12
    -3
      src/app/Toolbar.cpp

+ 0
- 13
src/app/RackScrollWidget.cpp View File

@@ -29,19 +29,6 @@ void RackScrollWidget::step() {

void RackScrollWidget::draw(const DrawContext &ctx) {
ScrollWidget::draw(ctx);

if (app()->scene->rackWidget->isEmpty()) {
math::Rect b;
b.size = math::Vec(600, 300);
b.pos = box.size.minus(b.size).div(2);
NVGcolor bg = nvgRGBAf(0, 0, 0, 0.4);
bndInnerBox(ctx.vg, b.pos.x, b.pos.y, b.size.x, b.size.y,
0, 0, 0, 0, bg, bg);

NVGcolor fg = nvgRGBAf(1, 1, 1, 0.25);
std::string text = "Right-click or press Enter to add modules";
bndIconLabelValue(ctx.vg, b.pos.x, b.pos.y + 80, b.size.x, b.size.y, -1, fg, BND_CENTER, 80, text.c_str(), NULL);
}
}




+ 12
- 3
src/app/Toolbar.cpp View File

@@ -290,10 +290,19 @@ struct SampleRateItem : MenuItem {

menu->addChild(new EnginePauseItem);

std::vector<float> sampleRates = {44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000, 705600, 768000};
for (float sampleRate : sampleRates) {
for (int i = 0; i <= 4; i++) {
int oversample = 1 << i;

SampleRateValueItem *item = new SampleRateValueItem;
item->setSampleRate(sampleRate);
item->setSampleRate(44100.f * oversample);
if (oversample > 1)
item->text += string::f(" (%dx)", oversample);
menu->addChild(item);

item = new SampleRateValueItem;
item->setSampleRate(48000.f * oversample);
if (oversample > 1)
item->text += string::f(" (%dx)", oversample);
menu->addChild(item);
}
return menu;


Loading…
Cancel
Save