summaryrefslogtreecommitdiff
path: root/src/host/overlay.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/overlay.zig')
-rw-r--r--src/host/overlay.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host/overlay.zig b/src/host/overlay.zig
index e1fc45d..ec040e7 100644
--- a/src/host/overlay.zig
+++ b/src/host/overlay.zig
@@ -111,7 +111,7 @@ pub fn drawMemory(out: *List, arena: std.mem.Allocator, layout: memory.Layout, s
}
}
-pub fn drawScope(out: *List, arena: std.mem.Allocator, samples: []const f32, rate: u32, canvas: [2]u32) !void {
+pub fn drawScope(out: *List, arena: std.mem.Allocator, samples: []const f32, rate: u32, pull: u32, canvas: [2]u32) !void {
const green: abi.Color = .{ .r = 105, .g = 245, .b = 160 };
const x = @as(f32, @floatFromInt(canvas[0])) - 526;
const top = @as(f32, @floatFromInt(canvas[1])) - 130;
@@ -119,7 +119,7 @@ pub fn drawScope(out: *List, arena: std.mem.Allocator, samples: []const f32, rat
try out.append(arena, .{ .rect = .{ .dst = .{ .x = x, .y = top, .w = 514, .h = 118 }, .color = .{ .r = 24, .g = 24, .b = 24 } } });
try out.append(arena, .{ .rect = .{ .dst = .{ .x = x + 1, .y = mid, .w = 512, .h = 1 }, .color = .{ .r = 60, .g = 85, .b = 65 } } });
const ms = @as(f32, @floatFromInt(samples.len * 1000)) / @as(f32, @floatFromInt(@max(rate, 1)));
- try out.append(arena, .{ .text = .{ .x = x + 8, .y = top + 10, .scale = 1, .color = green, .bytes = try std.fmt.allocPrint(arena, "OUTPUT ch1 / {d:.1}ms / overlay sound to hide", .{ms}) } });
+ try out.append(arena, .{ .text = .{ .x = x + 8, .y = top + 10, .scale = 1, .color = green, .bytes = try std.fmt.allocPrint(arena, "OUTPUT ch1 / {d:.1}ms / pull {d} / overlay sound to hide", .{ ms, pull }) } });
for (samples, 0..) |sample, i| {
const a = std.math.clamp(if (std.math.isFinite(sample)) sample else 0, -1, 1);
const previous = samples[i -| 1];