mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-12 14:12:49 +00:00
reverb:: option to change and auto-change sample length
This commit is contained in:
parent
96d5309743
commit
e6743fc478
@ -348,6 +348,24 @@ auto hchook = addHook(hooks_drawcell, 100, draw_bird)
|
|||||||
/* disable the frustum culling (we need sound from every direction) */
|
/* disable the frustum culling (we need sound from every direction) */
|
||||||
frustum_culling = false;
|
frustum_culling = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* auto-sync sample length with animation period */
|
||||||
|
else if(argis("-rev-length-auto")) {
|
||||||
|
int ap = anims::period / 1000. * freq;
|
||||||
|
ld d = ap / isize(orig);
|
||||||
|
println(hlog, "d = ", d);
|
||||||
|
int di = d;
|
||||||
|
if(di) {
|
||||||
|
int size_to = ap / di;
|
||||||
|
orig.resize(size_to);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sample length in seconds */
|
||||||
|
else if(argis("-rev-length")) {
|
||||||
|
shift();
|
||||||
|
orig.resize(argi() * freq);
|
||||||
|
}
|
||||||
else return 1;
|
else return 1;
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user