Use comptime for fully declarative LV2 and Custom commands #14

Merged
luna merged 69 commits from declarative-commands into master 2020-06-02 21:37:47 +00:00
Showing only changes of commit aeb76fe6c0 - Show all commits

View file

@ -75,7 +75,7 @@ pub fn sseek(file: *c.SNDFILE, offset: usize) void {
/// Caller owns the returned memory.
pub fn temporaryName(allocator: *std.mem.Allocator) ![]u8 {
const template_start = "/temp/temp_";
const template = "/tmp/temp_XXXXXXXXXXX";
const template = "/tmp/temp_XXXXXXXXXXXXXXXXXXXXX";
var nam = try allocator.alloc(u8, template.len);
std.mem.copy(u8, nam, template);
@ -86,7 +86,6 @@ pub fn temporaryName(allocator: *std.mem.Allocator) ![]u8 {
var i: usize = 0;
while (i < 100) : (i += 1) {
// generate a random uppercase letter, that is, 65 + random number.
for (fill) |_, f_idx| {
var idx = @intCast(u8, r.random.uintLessThan(u5, 24));