triggerbox: do not try to set the {segment} tempo if there is no region
* divide-by-zero was resulting in NaNs in the snapshot file
This commit is contained in:
parent
2eb286eb76
commit
7321248916
@ -1189,6 +1189,11 @@ AudioTrigger::set_stretch_mode (Trigger::StretchMode sm)
|
||||
void
|
||||
AudioTrigger::set_segment_tempo (double t)
|
||||
{
|
||||
if (!_region) {
|
||||
_segment_tempo = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (t<=0.) {
|
||||
/*special case: we're told the file has no defined tempo.
|
||||
* this can happen from crazy user input (0 beat length or somesuch), or if estimate_tempo() fails entirely
|
||||
|
Loading…
Reference in New Issue
Block a user